[Closed] Name group after clone ops
I’m using maxOps.CloneNodes to copy and rotate a selection of objects. However, after copying, the operation selects only the original, but I need both selected in order to rename the group of copies . Seems simple but Haven’t been able to figure this out.
check the help:
maxOps.CloneNodes <&node array>nodes offset:<point3> expandHierarchy:<boolean> cloneType:<enum> actualNodeList:<node array> newNodes:<node array>
the function has two out arguments. the order of new nodes corresponds to the order of actual nodes.
Thanks yes I tried this by creating new nodes array but it yielded undefined
Hi,
you have to pass the “newNodes”-array by reference, it’s not used everyday in MXS but useful sometimes, here is an example:
(
local copiedNodes = #() – new node array
maxOps.CloneNodes (selection) cloneType: #copy newNodes: &copiedNodes
print copiedNodes
– Hurray.
)
-k.
Sorry, was stupid.Didn’t read help properly.There’s really no problemat all ,I just got confused with referring to array with an ampersand,that’sall.Thnx anyways guys.