View Full Version : how to popup a dialog box in modifier plugin
04-03-2008, 12:15 AM
I am coding a modifier plug-in in maxscript . I have added a button to this modifier . Now I want to implement a function. It is that as long as I click the button ,it would pop up a dialog box to select a file.
The small function likes that pointcache modifier which can load the source file.
Look up file handling in the help, off the top of my head I just can't come up with it and i'm not on a Max ready box.
04-03-2008, 12:22 AM
Returns the path to the chosen file, or undefined if the user cancels. I think the only fall back with this is you can't select multiple files. You do get ability with dotNet though. Is this what you were looking for?
04-03-2008, 03:14 AM
Sorry, everyone . I think I don't explain my question well. Anyway , thanks for everyone's response. Finally I solve my problem. The key is that normal button cannot be supported in plugin modifier , only checkbutton can be supported. So I use checkbutton to open the dialogbox to load my file.
Buttons work fine in a modifier plugin, I use them all the time. Every UI item in Max is supported.
04-03-2008, 06:52 PM
button's event handler are below:
on <button> pressed do <expr>
on <button> rightclick do <expr>
Those events above cannot be implemented in modifier plugin.
Below are Parameter event handlers of Scripted Plug-in:
on <name> set <arg> do <expr>
on <name> get <arg> do <expr>
on <name> set <arg1> [<arg2>] do <expr>
on <name> get <arg1> [<arg2>] do <expr>
on <name> tabChanged < arg1 > < arg2 > < arg3 > do < expr >
Especailly , only one kind of button supported is checkbutton.
Referenced from MAXscript Reference
U could search with key word "Scripted Plug-in Clausespr"
04-04-2008, 08:28 PM
Finally , during my coding time . I found that button's event handles can be put inside rollout block. I'm too stupid.
04-04-2008, 08:28 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2014, Jelsoft Enterprises Ltd.