Announcements

Between mid-October and November, the content on AREA will be relocated to the Autodesk Community M&E Hub and the Autodesk Community Gallery. Learn more HERE.

Anyone know how to render multiple States with MAXScript, like "Render Selected States (Net)" in "State Sets"?

Anyone know how to render multiple States with MAXScript, like "Render Selected States (Net)" in "State Sets"?

a2d4f3s1
Enthusiast Enthusiast
339 Views
0 Replies
Message 1 of 1

Anyone know how to render multiple States with MAXScript, like "Render Selected States (Net)" in "State Sets"?

a2d4f3s1
Enthusiast
Enthusiast

Anyone know how to render multiple States with MAXScript, like "Render Selected States (Net)" in "State Sets"?

 

I want to Submit to Network Render "State06, State05, Staet04, State03" at the same time.

state sets.png

 

I tested this.

stateSetsDotNetObject = dotNetObject "Autodesk.Max.StateSets.Plugin"
stateSets = stateSetsDotNetObject.Instance
masterState = stateSets.EntityManager.RootEntity.MasterStateSet

state2 = masterState.children.item[0]
state6 = state2.children.item[0]
state5 = state2.children.item[1]

masterState.RenderStates #(state5, state6) false

An error will occur.

-- Error occurred in anonymous codeblock; filename: ; position: 338; line: 9
-- Runtime error: No 'RenderStates' method found which matched argument list
-- MAXScript callstack:
--	thread data: threadID:23200
--	------------------------------------------------------
--	[stack level: 0]
--	In top-level

 

I think this is probably the answer in Help. How should I write this?

  .RenderStates <System.Collections.Generic.IEnumerable`1[[System.Collections.Generic.IEnumerable`1[[Autodesk.Max.StateSets.Entities.StateSets.StateSet, Autodesk.Max.StateSets, Version=20.0.966.0, Culture=neutral, PublicKeyToken=null]], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]>stateSetPaths <System.Boolean>useNetworkRender

 

Thanks in advanced.

0 Likes
340 Views
0 Replies
Replies (0)