Maxscript 单选按钮和按钮命令

发布于 2025-01-19 15:47:38 字数 341 浏览 5 评论 0原文

我想问这是如何工作的?在“框”选项中,然后按DO按钮将创建一个框。 我非常感谢任何答复,谢谢您

推出createObj“ createObj”宽度:235 (( radiobuttons radmix“ create:” pos:[8,8]宽度:58高:110标签:#(“ box”,“ spehere”,“锥”,“圆柱”,“圆柱”,“ geospehre”,“ geospehre”,“ plane”)列:1偏移:#([0,0],[0,0],[0,0],[0,0],[0,0],[0,0])Align:#left 按钮btnmix“ do” pos:[136,16]宽度:94高度:104对齐:#left ) Createialog createObj

I want to ask how does this work? in the "box" option then pressing the DO button will create a box.
I really appreciate any reply, thank you

rollout createobj "creatingobj" width:235
(
radiobuttons radmix "Create:" pos:[8,8] width:58 height:110 labels: #("box", "spehere", "cone", "cylinder", "geospehre", "plane") columns:1 offsets:#([0,0], [0,0], [0,0], [0,0], [0,0], [0,0]) align:#left
button btnmix "Do" pos:[136,16] width:94 height:104 align:#left
)
createDialog createobj

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

节枝 2025-01-26 15:47:38

不会,因为没有按钮的处理程序。您应该阅读脚本化实用程序和 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

It won't because there's no handler for the button. You should read the Scripted Utilities and Rollout section of the reference and learn from that, there are many commented examples scattered throughout. Also, when posting code, use the Code button (or indent the codeblock manually). Here's a working code:

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
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文