Notifications
Clear all

[Closed] how to popup a dialog box in modifier plugin

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.

7 Replies
 PEN

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.

getOpenFileName()
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?

 PEN

Thanks jay.

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 [color=Orange]checkbutton [color=#fffffe]can be supported. So I use checkbutton to open the dialogbox to load my file.

[/color][/color]

 PEN

Buttons work fine in a modifier plugin, I use them all the time. Every UI item in Max is supported.

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:
[color=Yellow]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 >

[color=#fffffe]Especailly , only one kind of button supported is [/color][/color]checkbutton.
Referenced from MAXscript Reference
U could search with key word [color=Lime]“Scripted Plug-in Clausespr”[/color]

Finally , during my coding time . I found that button’s event handles can be put inside rollout block. I’m too stupid.