[Closed] Duplicate and then select object
I’m trying to write a script that will duplicate a selected object that’s inside a group, and then remove the resulting clone from the group and select it.
This is what I have ATM:
--/////Clone the object and select the clone/////////////////////////////////////
if selection.count > 0 do with redraw off -- speed up operation doing it with no redraw
(
result = #()
maxOps.CloneNodes selection cloneType:#copy newNodes:&new
select result
)
--/////////////////////////////////////////////////////////////////////////////
actionMan.executeAction 0 "40144" --detach from group
Problem is that all of that code results in the group being selected at the end, not the cloned object
I’m looking for the same thing : auto selecting the cloned node , I hope someone could help us
I got this working:
if selection.count > 0 do with redraw off -- speed up operation doing it with no redraw
(
result = #()
maxOps.CloneNodes selection cloneType:#copy newNodes:&result
select result
detachNodesFromGroup selection[1]
)
Is there any way to do this without using the “detachNodesFromGroup” command. I would like to be able to run this on version of max older than 2010 if possible.
it should begin with “Thank you”
to detach from the group is the same as unlink a group member from the group head.
lol Dennis sorry. THANKS MAN, I was in a hurry this morning and just wanted to share my code. Sorry I forgot to express my undying gratitude
never mind. I just want your to know that the grouping is the same as to link some group of nodes to the node with the specific class ID. Unlink from this node means the detaching from this group.