Notifications
Clear all

[Closed] copy complete group

Hi all.

Does anyone know how to make a straight copy from a group?

I’ve got a group that contains 3 objects and has some user properties.
I need a function that copies this complete group and it’s properties.

Thanks for all your help
R

5 Replies

Basically what i do is, I have a collection of objects grouped together. (box01,box02) and a user property on the group itself.

If I select the whole group, it does copy everything but the grouphead dummy is turned into a dummy resulting in the group objects being ungrouped.

Regrouping is not really an option as I need to retain the rotational and scale data.

Just copying the grouphead results in a copy of the dummy again.

I’ve tried setting the dummy as a grouphead and appending the new objects as children but
that doesnt seem to work.

Thanks for any help
R

This should do the trick.

maxOps.cloneNodes $

wheyhey! Thank you very much.

That worked great but I have another question. I am trying to randomly copy from an array of groups. How do I filter just the groups as a node from a selection? If, for instance I selected 5 groups manually, it would just be shown as a selection containing all of the elements of each group lumped in to one large array.

Thanks in advance for any help.

Hi guys,

Maybe a function something along the lines of:



--Function return an array of objects to be moved from complex group hierarchies
fn GroupLeaders Arr = 	
	(
	Leaders = for o in Arr where ((o.parent == undefined or isopengroupmember o) and (not isOpenGroupHead o)) collect o 
	)--End of Function Group Leaders



Where “Arr” is an array of selected objects from something like “getcurrentselection()”

I havent had a chance to test this on 3DSMax, but I think it should pick out all the closed top group nodes. i.e if you have nested groups then it should just pick the very top level… should

Let us know if it helps, good luck!

Rich