H2 clone an object without its children
-
On 25/04/2013 at 12:23, xxxxxxxx wrote:
Using GetUp I get my parent object I want to use / copy.
So I use GetClone() to clone that parentHowever that gives me all the children of that parent.
How to get only the parent and not the children?Of course I can clone the parent and then remove all (cloned) children, but I''m sure there is a better way?
-
On 25/04/2013 at 12:30, xxxxxxxx wrote:
Look at the documentation of GetClone(), there's a flag for exactly this.
Best,
-Niklas -
On 25/04/2013 at 12:31, xxxxxxxx wrote:
getclone has an optional flag parameter which covers almost all cases.
-
On 25/04/2013 at 12:56, xxxxxxxx wrote:
Ok, I was looking at
BaseSelect.GetClone
() which has no flags.
I see flags withC4DAtom.GetClone
([ flags=0])However, I''m getting a run time error saying COPY_NO_HIERARCHY is not defined.
Also when using c4d.COPY_NO_HIERARCHY
Importing C4DAtom does not seem to help.What am I missing?
import c4d from c4d import C4DAtom #Welcome to the world of Python def main() : pass #put in your code here obj = op.GetObject() parent = obj.GetUp() source = parent.GetClone(COPY_NO_HIERARCHY) #create clone pass
-
On 25/04/2013 at 13:28, xxxxxxxx wrote:
myobj.GetClone(c4d. COPYFLAGS_NO_HIERARCHY) ** ** is correct.
getclone is a member of c4datom.
-
On 25/04/2013 at 14:49, xxxxxxxx wrote:
Thanks.
The R13 manual needs to be updated, R14 is correct. -
On 26/04/2013 at 01:19, xxxxxxxx wrote:
Originally posted by xxxxxxxx
Thanks.
The R13 manual needs to be updated, R14 is correct.Just like previous releases of CINEMA, manuals aren't updated neither.
Always make sure that you use the latest updated manual for the current version of CINEMA. -
On 26/04/2013 at 07:51, xxxxxxxx wrote:
Yes, I understand.