Maxscript单选按钮和按钮命令



我想问一下这是如何工作的?在";框";选项,然后按下DO按钮将创建一个框。我真的很感激任何回复,谢谢

卷展栏createobj";creationobj";宽度:235(radiobuttons radimix";创建:"位置:[8,8]宽度:58高度:110个标签:#("长方体"、"扇形"、"圆锥体"、"圆柱体"、"geospehre"、"平面"(列:1偏移:#按钮btnmix";Do"位置:[136,16]宽度:94高度:104对齐:#左)createDialog createobj

不会,因为没有按钮的处理程序。您应该阅读参考资料的ScriptedUtilities和Rollout部分,并从中了解到,有许多注释示例散布在各处。此外,在发布代码时,请使用"代码"按钮(或手动缩进代码块(。这是一个工作代码:

rollout createobj "creatingobj" width:235
(
local items = #("box", "sphere", "cone", "cylinder", "geosphere", "plane")
radiobuttons radmix "Create:" pos:[8,8] width:58 height:110 labels:items columns:1 align:#left
button btnmix "Do" pos:[136,16] width:94 height:104 align:#left
on btnmix pressed do (execute items[radmix.state])()
)
createDialog createobj