Notifications
Clear all

[Closed] NoRedraw for Interface Elements?

Hey MXS-Gurus out there…

I was wondering if there is any chance to deactivate interface-redraws.
When I run a huge script and deactivate viewport redrawing it already gets much faster.
Is this possible for rollouts or the whole max-ui?

For instance if you need to select a bone in a skin-modifier it always redraws the ui. Now if you need this multiple times the script updates the UI every bone-select which makes it quite slow…

Cheers,

Marcus

18 Replies

Maybe this method:

disableSceneRedraw()
code
enableSceneRedraw()

or

with redraw off
(
code
)

1 Reply
(@tarcus)
Joined: 11 months ago

Posts: 0

Thanks for the fast answer, this method is only for viewport redrawing, but I mean specifically for rollouts.

Hi Tarcus,
you got:

suspendEditing which:<panel_name> alwaysSuspend:<bool>
resumeEditing which:<panel_name> alwaysSuspend:<bool>

but I never had much luck using them, because many commands need Command Panel in #Modify mode in order to work.

Take a look at “Command Panels” in MaxScript Reference.

  • Enrico

for the max interface I don’t know any methods to stop redrawing ,
but you can insert in begin of this operation a switch

Max create mode

or you can be a bit more radical …


(
WM_SETREDRAW=0xB
windows.sendmessage (windows.getmaxhwnd()) WM_SETREDRAW 0 0
sleep 1
windows.sendmessage (windows.getmaxhwnd()) WM_SETREDRAW 1 0
)

but, well humm…it’s a bit excessive

@SyncViewS: Thanks a lot, seems its good for some things, but yeah for skinning operations you have to be in the modify panel. I will just play around with that.

@martroyx: Thats really radical, but speeds up the script enormously… thanks a lot!

i’m using this trick too… maybe not soo radical way …


WM_SETREDRAW=0xB
commandHWND = windows.getChildHWND #max "Command Panel"
 
windows.sendmessage commandHWND[1]  WM_SETREDRAW 0 0
...
windows.sendmessage commandHWND[1]  WM_SETREDRAW 1 0
 
 

yes I use it all the time in fact , with .net controls like richtextbox where you want to do stuff but dont want the user to see

it’s easier to handle .NET controls… any .NET control has methods BeginUpdate and EndUpdate …

well, yes your right

but I get a customized to using it this way, since it was the first way of doing it that I found

Page 1 / 2