Notifications
Clear all

[Closed] How to reset state sets via maxscript?

Hi all!

In order to save to max 2012 format and prevent error poping on opening, we have to reset the state sets before saving from max 2015 for example. (Rendering=>State Sets…=>States=>Options=>Reset State Sets) I’m looking for a way to do it via maxscript command to be able to do it in one click instead of 5 clicks!. I looked in the help and around and I still haven’t found… If anyone knows please tell me!

thanks

3 Replies

I finally found something that works, we need to call a dotnet object first:


stateSetsDotNetObject = dotNetObject "Autodesk.Max.StateSets.Plugin" --Get StateSets dotNet object. 
stateSets = stateSetsDotNetObject.Instance
stateSets.ResetAndDelete()

That’s how I access it. I reduced the code to a one-liner

(dotNetObject "Autodesk.Max.StateSets.Plugin").Instance.ResetAndDelete()
1 Reply
(@strob)
Joined: 10 months ago

Posts: 0

That’s neat thanks!