Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware API
      • ZBrush Python API
      • ZBrush GoZ API
      • Code Examples on Github
    • Forum
    • Downloads
    • Support
      • Support Procedures
      • Registered Developer Program
      • Plugin IDs
      • Contact Us
    • Categories
      • Overview
      • News & Information
      • Cinema 4D SDK Support
      • Cineware SDK Support
      • ZBrush 4D SDK Support
      • Bugs
      • General Talk
    • Unread
    • Recent
    • Tags
    • Users
    • Login

    Problem with C4DAtom.CopyTo()-Flags

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 344 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      Helper
      last edited by

      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

      1 Reply Last reply Reply Quote 0
      • H Offline
        Helper
        last edited by

        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

        1 Reply Last reply Reply Quote 0
        • H Offline
          Helper
          last edited by

          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...

          1 Reply Last reply Reply Quote 0
          • First post
            Last post