How to clone a character (skin + skeleton) ?

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

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);

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 !