I'm trying to write a code that does the equivelant of selecting and object and pressing Ctrl+V. Which brings up the Clone Options dialog.
I want to copy a selection of objects with the option of either copying or instancing the controllers of any possible objects.
In the max help I came across a few things and this was the closest which still did not have the option of the controllers.
maxOps.CloneNodes <&node array>nodes offset: expandHierarchy: cloneType: actualNodeList: newNodes:
I'm ultimately trying to copy a rig. My example scene consists of 3 spheres all just linked one to another so Sphere01 > Sphere02 > Sphere03.
Selecting all of them and then copying the rig with instanced controllers
function selectHierarchy = --//Selects both children/parents of obj's heirarchy
(
for obj in selection do
(
if obj.children != undefined do
(
selectmore obj.children
)
)
)
for obj in selection do (
CON = selection[1]
selectHierarchy()
newObj = copy obj
newController = obj.controller
newObj.controller = newController
)
By JokerMartini · 2011-10-07
Anubis · 2011-10-07