I've put this in a few of my scripts disableSceneredraw() -- STUFF HERE enableSceneredraw() redrawViews() Its a good idea to have this as a standalone script too enableSceneredraw() redrawViews()
One weird thing we have is with our Skin-weights-adjustment script, it has to flash back and forth through the modifier stacks of different objects while it goes. Apparently Skin doesn't let us change weight assignments unless the mod stack is open. The script basically adjusts the bone assignments of various models to…
For the viewport problem, a script can disable redraw, do its stuff, then enable it again at the end. Don't have the code handy, but I remember it being pretty straightforward.
Huh, I hadn't noticed that, but it does make Max sense. It'd be a good idea to include a switch away from the Modifier panel at the beginning of export/prep/fix scripts ... Thanks for the tip!
Saving scene states (right click > quad menu > display > Save Scene State) in conjuntion with a good setup for layers is another good way to keep the modifier stack collapsed. I've been to lazy to fix the script I started writing that triggers auto backup, saves a scene state, and collapses the modifier stack. Some day…