moving a texture tag



  • On 25/03/2013 at 12:24, xxxxxxxx wrote:

    User Information:
    Cinema 4D Version:   r14 
    Platform:      Mac OSX  ; 
    Language(s) :   C.O.F.F.E.E  ;

    ---------
    Hi,
    Using c.o.f.f.e.e., i need to move a texture tag from one object to another one.
    Any help would be appreciate,
    Thanks a lot,
    Jean



  • On 25/03/2013 at 22:49, xxxxxxxx wrote:

    Assuming that you already have the source object (sobj) and the destination object (dobj), this is all you need to do:

    var ttag;  
    for (ttag = sobj->GetFirstTag(); ttag; ttag = ttag->GetNext())  
    {  
      if (!instanceof(ttag, Ttexture)) continue;  
      ttag->Remove();  
      dobj->InsertTag(ttag);  
      break;  
    }
    


  • On 26/03/2013 at 18:46, xxxxxxxx wrote:

    Hi Robert,

    Thanks + thanks + thanks.

    Jean



  • On 26/03/2013 at 19:19, xxxxxxxx wrote:

    If you want to move multiple texture tags, just remove the "break;" line in the code and all texture tags on the source object will be moved to the destination object.


Log in to reply