MaxScript - How can I keep a geometry plugin’s rollout from automatically closing?

MaxScript - How can I keep a geometry plugin’s rollout from automatically closing?

Anonymous
Not applicable
1,349 Views
4 Replies
Message 1 of 5

MaxScript - How can I keep a geometry plugin’s rollout from automatically closing?

Anonymous
Not applicable
I've noticed when I run certain MaxScript functions such as AddModifier, whatever rollout is currently active in the create tab is closed.

You can try this by creating a box, selecting it and then opening any geometry create rollout and running the following script command in the script listener:
xcloth = Cloth()
AddModifier $ xcloth

In my plugin I'm running AddModifier after the user presses a button. Unfortunately it closes the whole thing which isn't the desired effect. So I'm wondering if this can be avoided at all, or if there is some way to reinvoke the plugin causing the rollout to reappear.

thanks in advance
0 Likes
1,350 Views
4 Replies
Replies (4)
Message 2 of 5

Anonymous
Not applicable
Hey, I figured it out while I was waiting on a reply... You can run:

startObjectCreation PLUGIN_NAME

to do it... I deduced this from the Create Panel page in the MaxScript help file where it tells you how to open the box creation (as an example)
startObjectCreation box

I'm posting the solution here in case anyone needs it. I just run this after I do my AddModifier call. It works for me because my creation mode stuff isn't really the same as box etc... For those types, I'm sure there's a way to open the modifier tab... in fact it's:
max modify mode

there you have it. That should solve most problems.
0 Likes
Message 3 of 5

Anonymous
Not applicable
There is now a Maxscript Conference, if that helps 🙂 . Glad you got it figured out.
0 Likes
Message 4 of 5

jeff.hanna
Participant
Participant
Oh, good, the MXS forum is up? MXS questions (and MEL and JavaScript, and etc...) aren't disallowed here but are better suited in specific forums if they exist.
Jeff Hanna
Principal Technical Artist, Volition
0 Likes
Message 5 of 5

Anonymous
Not applicable
Benny,

Also note that there is a method called

modPanel.addModToSelection (modInstanceHere)

which can be used to add a modifier to the current stack selection without removing the previous modifier's sub-object selection. If you want to pass a vertex selection up to your new modifier, you should use that method instead of addModifier. Of course, you would have to make sure you are in modify mode, (max modify mode) and that the modify panel is not disabled and the previous modifier is set correctly.

To switch back to the create panel, you can always use 'max create mode'.
0 Likes