rollout buttonRol "按钮测试" width:170 height:345
(
mapButton btn1 "物体贴图" pos:[40,30] width:85 height:22
materialButton btn2 "物体材质" pos:[40,70] width:85 height:22
pickbutton btn3 "拾取物体" pos:[40,114] width:85 height:22
checkbutton ckb1 "隐藏设置" pos:[40,152] width:85 height:22
colorPicker cp1 "拾取颜色" pos:[40,192] width:85 height:22
button btn7 "ScenceWireColor" pos:[40,238] width:85 height:22
on btn1 picked texmap do
(
$.material.diffuseMap = texmap
showtexturemap $.material on
)
on btn2 picked mtl do
(
$.material = mtl
)
on btn3 picked obj do
btn3.text = obj.name
on ckb1 changed state do
(
if state==on then hide objects
else unhide objects
)
on cp1 changed col do
(
)
on btn7 pressed do
for a in geometry do a.wirecolor=(color ((cp1.color.r)*(random 0.7 1.3)) ((cp1.color.g)*(random 0.7 1.3)) ((cp1.color.b)*(random 0.7 1.3)))
)
createdialog buttonRol