Problem with C4DAtom.CopyTo()-Flags

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 17/07/2012 at 00:05, xxxxxxxx wrote:

Hi everybody,

I've a problem with the flags of the C4DAtom.CopyTo()-function.
The Python SDK says that there are a few optional flags for this function. But always I'm trying to use one of them I get the error message: 'module' object has no attribute 'COPY_NO_HIERARCHY'.

So I thougt: ok, then try it without using a flag. But the result was the error message: Required argument 'flags' (pos2) not found.

?? I thougt this parameter is optional?? Don't understand, how I can get this function working.

Does anybody else have an idea?

Here a small code snippet:

childs = obj[0].GetChildren()  
  
splineSegment = c4d.BaseObject(c4d.Ospline)  
  
if childs[seg].GetType() == splineSegment.GetType() :  
              childs[seg].CopyTo(splineSegment,flags=c4d.COPY_NO_HIERARCHY)

cheers,
sven

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 17/07/2012 at 00:23, xxxxxxxx wrote:

Hi, the flag is indeed undefined in R13. Please use
COPYFLAGS_ instead of COPY_.

COPYFLAGS_NO_HIERARCHY_<_h4_>_

Will be fixed soon.

Cheers,
Sebastian

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 17/07/2012 at 00:48, xxxxxxxx wrote:

Hi Sebastian,

this was the first idea of mine, too. 🙂
But then i got the message, that c4d.SplineObject isn't alive anymore a few lines later.

Here are the following lines, that in this case doesn't work as the result:

splineSegment[c4d.ID_BASELIST_NAME] = "aktives Segment"  
splineSegment[c4d.ID_BASEOBJECT_USECOLOR] = True  
splineSegment[c4d.ID_BASEOBJECT_COLOR] = c4d.Vector(1,0,0)

For me it seems that with COPYFLAGS_NO_HIERARCHY not C4DAtom.CopyTo() isn't used but NodeData.CopyTo() instead.

What do you think about it?

Cheers,
Sven

Edit: ah, i see. NodeData.CopyTo() requires more parameters so it must be C4DAtom.CopyTo().
But isn't alive anymore is a strange result to me. Hm, I see it in the object manager...