1:最基础的Rollout声明:
rollout rolloutName "Rollout Name" ( button btn1 "Test" )createDialog rolloutName
rollout rolloutName "Rollout Name" --width:280 height:100 ( button btn1 "Test" ) rollout rollout2 "Rollout 2" --width:280 height:100 ( button btn1 "button2" ) -- 声明一个新的Floater: theFolloutFloater = newRolloutFloater "Rollout Floater" 300 220 -- 添加Rollout到Floater上:addRollout rolloutName theFolloutFloateraddRollout rollout2 theFolloutFloater
rollout rolloutName "Rollout Name" -- width:280 height:100 ( button btn1 "Test" ) rollout rollout2 "Rollout 2" --width:280 height:100 ( button btn1 "button2" ) rollout rollout3 "Rollout 3" --width:280 height:100 ( button btn1 "button3" ) -- Floaterrollout Floater "Rollout Floater" ( -- SubRollout控件,用于作为Rollout的载体 subRollout subRoll1 "Sub" width:190 pos:[2,2] height:400 offset:[0,-5] subRollout subRoll2 "Sub" width:190 pos:[194,2] height:400 offset:[0,-5] on Floater open do ( addSubRollout subRoll1 rolloutName rolledUp:false addSubRollout subRoll1 rollout2 rolledUp:true addSubRollout subRoll2 rollout3 rolledUp:false ) ) createDialog Floater 400 400
rci = rolloutCreator "myRollout" "My Rollout" -- 开始更新 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- rci.begin() -- . . . . -- 添加控件: rci.addControl #button #myButton "My Button" -- 添加控件的事件: rci.addHandler #myButton #pressed filter:on codeStr:"MessageBox @Isn't this cool@ title:@Wow@" -- 结束创建: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- createDialog (rci.end())
form = dotNetObject "MaxCustomControls.MaxForm" form.Text = "Max From" form.Size = dotNetObject "System.Drawing.Size" 200 400 -- Wrapper thePtr = DotNetObject "System.IntPtr" (windows.getMAXHWND()) theHwnd = DotNetObject "MaxCustomControls.Win32HandleWrapper" thePtr -- ShowForm form.show(theHwnd)
作者:TAZORN
著作权归作者所有
【相关阅读】:
Maxscript_基础_回调函数:http://tk.v5cg.com/help/246.html
Maxscript_基础_材质处理:http://tk.v5cg.com/help/247.html
Maxscript_基础_修改器操作:http://tk.v5cg.com/help/248.html
Maxscript_基础_创建窗口:http://tk.v5cg.com/help/249.html
Maxscript_基础_遍历与递归:http://tk.v5cg.com/help/250.html
Maxscript_与DotNet交互:http://tk.v5cg.com/help/251.html
【上传发布插件】:
编写3DMAX插件到发布上线全流程:http://tk.v5cg.com/help/147.html
代码上传与工具发布:http://tk.v5cg.com/help/99.html
代码发布,部署实例参考:http://tk.v5cg.com/help/140.html
PS【动作库】代码部署指南:http://tk.v5cg.com/help/141.html
CG云盘 - 开发者使用说明:http://tk.v5cg.com/help/34.html