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

    Getting the material of a material tag

    SDK Help
    0
    2
    279
    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

      THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

      On 03/04/2003 at 07:35, xxxxxxxx wrote:

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

      ---------
      I have an object that I get through the following line of code:

        
      dropped = GetDragObject(msg);  
      

      I know it is a tag, since it passed the following test:

        
      if (instanceof(dropped,BaseTag))  
      

      I also know it is a material tag since it passed the following test:

        
      if(dropped->GetType() == 5616)  
      

      Now, how can I get the name of the material that is assigned to the tag?
      I tried using this code:

        
      matmarker1=dropped->GetMaterial();  
      mat = doc->GetFirstMaterial();  
      while(mat&&(matmarker2=mat->GetMarker())!=matmarker1)mat=mat->GetNext();  
      

      But this NEVER finds anything. What am I doing wrong? Samir as been helping me but we are getting nowhere 😞
      I need to get the name of the material!! Please help.
      Thank you very much in advance.

      Rui Batista

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

        THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

        On 03/04/2003 at 15:46, xxxxxxxx wrote:

        Ok, never mind... after much trial & error, I did it 🙂

        Rui Batista

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