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

    How to clone a character (skin + skeleton) ?

    SDK Help
    0
    3
    301
    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
      Helper
      last edited by

      On 04/02/2013 at 08:11, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:    
      Platform:      
      Language(s) :

      ---------
      Hi,

      I need to make a copy of a character in my plugin.
      But when I use the method
      character2 = character1->GetClone(COPYFLAGS_0, 0);
      the character2's skin is influenced by the character1's skeleton!

      Does anyone know how to get a complete copy of a character like it is done with Ctrl+C & Ctrl+V in the editor (so that the copied skin is influenced by the copied skeleton) ?

      Ben

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

        On 04/02/2013 at 10:01, xxxxxxxx wrote:

        You'll need to allocate, init, and use an AliasTrans so that all of the links in the clone point to the clone and not the original.

        Example from the docs:

        AutoAlloc<AliasTrans> aliastrans;  
        if (!aliastrans || !aliastrans->Init(document)) return FALSE;  
        dup = op->GetClone(COPYFLAGS_0, aliastrans);  
        if (!dup) return FALSE;  
        aliastrans->Translate(TRUE);
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 05/02/2013 at 02:14, xxxxxxxx wrote:

          It was so obvious! I should have tried this. I am so ashamed of myself now.

          Thanks !

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