Python GUI update scene

Python GUI update scene

Anonymous
Not applicable
921 Views
1 Reply
Message 1 of 2

Python GUI update scene

Anonymous
Not applicable

I encountered a small problem in 3ds max. I created a GUI in Python in Pyside. The interaction with maxscript works perfectly except for two small matters. When I update a modifier morpher on a object (add more channels to the morpher), this only shows when the object is selected and the modify tab is open. This is not a big issue, a bigger issue is the problem that, once you selected the head before starting the GUI, it doesn't get visually unselected. To explain it more clearly: lets say I have a cube, I select the cube since I want to add morpher modifier to it and add channels to the morpher instance. After this I want for example select a plane in the scene, I can select it and view its tabs but visually in the scene the cube remains selected. The biggest issue of this lack of update of the scene arrises when I try to add new objects to my scene via my GUI, they are added to the scene but I cannot see them in the scene until I close my GUI. 

 

To summarize, the scene in 3ds is insufficiently being updated. I'm not a modeller, I know very little maxscript and work mainly in python. I googled and there is something in maxscript as

disableSceneRedraw()

 and enabling it again, but that's for viewports and I'm not sure if this is the function that I really need.

Can somebody help please? Thank you in advance

0 Likes
Accepted solutions (1)
922 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Accepted solution
disableSceneRedraw()

and 

enableSceneRedraw()

did the trick.

0 Likes