Disable 3dsmax UI redraw

I’ve been out of the Tech Art game for a while now, so forgive me if this turns out to be super simple…

I have a script that redraws the modifier panel everytime it runs through its loop. I would like to disable this completely in order to gain some performance.

I can’t seem to find the command for this, if it exists.

Any help?

Try setting the panel to the creation tab, or anything but the modifier panel:

setCommandPanelTaskMode #create

You can also try suspending it while you are working, and enabling it again afterwards with:

suspendEditing which:#modify alwaysSuspend:true
resumeEditing which:#modify alwaysSuspend:true

I haven’t used the latter two commands yet - so test them out - you may encounter weird side effects…

Hmmmm. I tried suspendEditing, but it then prevents my script from running as it performs a bunch of operations in the stack.

For the same reason, I suspect setting to the create panel might be problematic.

Thanks, though.

There’s also “with redraw off”

From the maxscript help:


with redraw off 

for t=0 to 10 do

(

sliderTime=t

exportFile ("outfile_"+(t as string)+".dxf") #noPrompt selectedOnly:true

)

disableSceneRedraw()
enableSceneRedraw()

Are huge timesavers, the stack can still run, but no updates are drawn to the viewport.


Honda VT750CD

Ok, I ended up overhauling my script.

I have a large number of edgeloops I was attempting to scale down. I was originally doing this by selecting the verts, applying an xform modifier, scaling the gizmo, collapsing the stack, selecting the verts in the next edgeloop, and so on. This required the modifier panel to be open, and thus, was slow.

Instead, I now just directly translate each vert in an edgeloop through PolyOps.

Even with redraws on, it is now blazingly fast.

Thanks.

It is worth noting that some things need the modifier panel open (this is obvious), but I’ve also run into cases where a script can work, but if the scene is redrawn or I don’t refresh the stack (ie, do a ‘classOf myNode’), I will get the wrong result.