Notifications
Clear all

[Closed] State Sets C#

Hello,

Can anyone help me with a little issue?

I’m trying to access the .CurrentState property from Autodesk.Max.StateSets.dll using C# but I can’t find a solution for this problem.

In MaxScript I can use:

masterState.CurrentState = #(masterState.Children.Item[x])

In C# how can I use the .CurrentState to Ative my State Set? My code is:


var StateSetsObjs = Autodesk.Max.StateSets.Plugin.Instance;
var masterState = StateSetsObjs.EntityManager.RootEntity.MasterStateSet;

for (int i...)
{
 masterState.CurrentState = masterState.Children... ???
}

What I need to use to make my State Set ative by ID?

Thanks

1 Reply

already solved.