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

    moving a texture tag

    SDK Help
    0
    4
    385
    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 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

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

        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;  
        }
        
        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

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

          Hi Robert,

          Thanks + thanks + thanks.

          Jean

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

            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.

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