[Closed] Exiting Isolation Mode
Friends,
I can’t seem to figure out how to exit Isolation Mode via maxscript. Is there a way via a script or should I write a hodge-podge isolation mode myself?
Thanks a ton,
Colin
Hey. With little tools like this, AutoDesk/Discreet sometimes uses maxscript. This is the case with the isolate selection tool. If you go into your customize->user interface menu, and then find the tool in the list, you can right clickon it and click “edit macro script”. This will show you the source code for the isolation tool. Looks like it’s done in such a way as to make it difficult to undo, as it has alot of error checking and correction code. But you could simply replicate the off state that corresponds to the button being unchecked.
There is another option:
The name of check button that pops up is:
Iso2Roll.C2Iso
where “Iso2Roll” is the name of the rollout in memory, and “C2Iso” is the name of the button.
You could press the button with maxscript like this:
Iso2Roll.C2Iso.changed true --this lets you get the control by name
or
Iso2Roll.controls[2].changed true --this lets you get the control by index
If Iso2Roll was a button, and not a check button, you would use:
Iso2Roll.C2Iso.pressed()
EDIT: For more info on pressing buttons or otherwise instigating rollout event handlers, check the maxscript docs for the article “Rollout Clauses”.
Let me know if this helps.
-Dave
This indeed was the solution. I have some error checking code to make sure the rollout and checkbox is not undefined so if they don’t have Isolate running or there is an error it will brute force isolation mode. I didn’t even think about just changing the button state! Thanks a mil.
-Colin