CloneNodes

CloneNodes

Anonymous
Not applicable
465 Views
1 Reply
Message 1 of 2

CloneNodes

Anonymous
Not applicable

Hello!

I want to clone a node and use the function CloneNodes, but the max always prompt that there is a unknown system abnormalities. 

How to set the params of that function? Who can give me an example?

0 Likes
466 Views
1 Reply
Reply (1)
Message 2 of 2

Steve_Curley
Mentor
Mentor
Read the Maxscript Help for MaxOps.cloneNodes very carefully. Many of the parameters are In or Out - references (pointers to arrays).
Create one or more objects and select it/them.
(
OldNodesArray = selection as array
ActualNodeArray = #()
NewNodesArray = #()

MaxOps.CloneNodes &OldNodesArray \
                  Offset:[20,0,0] \
                  expandHierarchy:true \
                  cloneType:#reference \
                  actualNodeList:&ActualNodeArray \
                  newNodes:&NewNodesArray
)
Do NOT use within an Undo Off context.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

0 Likes