界面控制,
try ( destroydialog gt_unnamedRollout) catch ()
rollout gt_unnamedRollout "多维材质工具," width:208 height:568
(
local bm = bitmap 50 50 color:red
button name_but "清除没有材质的通道并选择面" pos:[8,60] width:192 height:24
imgTag bmp1 "Bitmap" pos:[8,8] width:192 height:48 bitmap:bm
edittext nameedt1 "前缀:" pos:[8,88] width:192 height:16
edittext nameedt2 "名字:" pos:[8,112] width:192 height:16
edittext nameedt3 "后缀:" pos:[8,136] width:192 height:16
button matbtn2 "子材质命名" pos:[8,160] width:88 height:24
button matbtn3 "子贴图命名" pos:[104,160] width:96 height:24
dropdownList ddl1 "id" pos:[8,184] width:64 height:10
checkbutton metckb1 "收集子材质id" pos:[80,200] width:112 height:24 checked:false
colorPicker cp1 "" pos:[8,240] width:53 height:39
dropdownList metddl4 "id" pos:[72,238] width:56 height:10
button shoujibtn11 "颜色id" pos:[130,248] width:64 height:32
button btn12 "子材质的固有色" pos:[8,288] width:88 height:24
button btn13 "子材质的顶点色" pos:[104,288] width:96 height:24
listBox lbx2 "子材质同贴图列表:" pos:[6,316] width:136 height:16
button btn14 "收集" pos:[148,335] width:56 height:24
button btn15 "执行" pos:[148,368] width:56 height:24
on gt_unnamedRollout open do
(
Callbacks.AddScript #SelectionSetChanged "Fn_CallBack_duoweicazhi()" ID:#gt_mat_met
)---end on
on gt_unnamedRollout close do
(
callbacks.removescripts #selectionSetChanged ID:#gt_mat_met
)---end on
)
createDialog gt_unnamedRollout
callbacks.removescripts #selectionSetChanged ID:#gt_mat_met
fn Fn_CallBack_duoweicazhi =
(
TheSelection = Selection as array
if $== undefined then
(
for i in gt_unnamedRollout.controls do
(
i.enabled =false
)
)else
(
if (classof TheSelection[1].Material) == Multimaterial then
(
for i in gt_unnamedRollout.controls do
(
i.enabled =true
)
)else
(
for i in gt_unnamedRollout.controls do
(
i.enabled =false
)
) --end else
)---end else
)
Callbacks.AddScript #SelectionSetChanged "Fn_CallBack_duoweicazhi()" ID:#gt_mat_met