Results 1 to 7 of 7

Thread: Disable 3dsmax UI redraw

  1. #1
    Project Manager anoon's Avatar
    Join Date
    Aug 2008
    Location
    Chicago
    Posts
    21

    Default 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?

  2. #2
    Tech-Art Lead, Amazon.com ObsidianPC's Avatar
    Join Date
    Nov 2008
    Location
    Seattle, WA
    Posts
    50

    Default This might 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...
    Alexander Hogan
    Technical Art Lead, Amazon Game Studios
    alex at alex hogan dot com

    "A tech artist looks at the glass and says 'I don't know about full or empty, but you're definitely using twice as much glass as you need. . .' "

  3. #3
    Project Manager anoon's Avatar
    Join Date
    Aug 2008
    Location
    Chicago
    Posts
    21

    Default

    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.

  4. #4
    undefined
    Join Date
    Sep 2009
    Posts
    9

    Default

    There's also "with redraw off"

    From the maxscript help:

    Code:
    with redraw off 
    
    for t=0 to 10 do
    
    (
    
    sliderTime=t
    
    exportFile ("outfile_"+(t as string)+".dxf") #noPrompt selectedOnly:true
    
    )

  5. #5
    Tools Developer KramSurfer's Avatar
    Join Date
    Jul 2008
    Location
    San Diego, CA
    Posts
    17

    Default

    disableSceneRedraw()
    enableSceneRedraw()

    Are huge timesavers, the stack can still run, but no updates are drawn to the viewport.
    ________
    Honda VT750CD
    Last edited by KramSurfer; 01-22-2011 at 08:20 PM.

  6. #6
    Project Manager anoon's Avatar
    Join Date
    Aug 2008
    Location
    Chicago
    Posts
    21

    Default

    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.

  7. #7
    Administrator Rob Galanakis's Avatar
    Join Date
    Jun 2008
    Location
    Reykjavik, Iceland
    Posts
    1,242

    Default

    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.
    Forum Administrator
    www.robg3d.com

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •