Notifications
Clear all

[Closed] SkinOps and modPanel very slow ?

Hello,
I am making some skinning operations with script. I have a scene with a lot of object skinned and i have to cycle through these objects to do some operations with skinops.

The problem is that for each object, the modify panel has to be opened and the skin modifier has to be selected with “modPanel.setCurrentObject “

This is slowing my script like a snail :s The time to update is very long.

Here is an example : I have 20+ objects skinned in my scene and when i run this code it take approximatively 3sec… and the max interface bllinks like hell…

( 	
   	Sel = Selection as array
   	for Obj in Sel do
   	(
   		modPanel.setCurrentObject Obj.skin
   	)
   )

I tryed disableSceneRedraw() but it has no effect.

The skinops operations have to be done with the modify panel open and the skin selected :s
Is there another way to perform skinning operations ? to go faster.

Thanks,

4 Replies

if you know the sdk, you can quite easily write a maxscript extension that will allow you to load/edit skin without skin selected or modify panel open.

fn fnMaxRedraw arg =
(
	if arg == 1 then(cui.CommandPanelOpen = true;enableSceneRedraw())else (disableSceneRedraw())	
	WM_SETREDRAW=0xB
	commandHWND = (windows.getChildHWND #max "Command Panel")
	windows.sendmessage (commandHWND[1]) WM_SETREDRAW arg 0
)

Run it with argument 1 to turn redrawing of the commandpanel on or 0 to turn off.

Hope it helps

Hey! Thanks for the replys!
the window handler technique is perfect for me:)

On some skinning functions e.g. adding bones to a skin modifier you also have the option to only update UI on the last operation.