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
    • Recent
    • Tags
    • Users
    • Login

    Read out Texture-Tag restriction [SOLVED]

    Scheduled Pinned Locked Moved PYTHON Development
    3 Posts 0 Posters 299 Views
    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 Offline
      Helper
      last edited by

      On 10/05/2015 at 08:45, xxxxxxxx wrote:

      Hi to all here,

      I want to find the Material-Tag which is corresponding to a polygon-selection-Tag.
      From the polygon-selection-Tag i know the name of the restriction.
      But now i have to find the Material-Tag in whitch the restriction is assigned.

      I try to read out the restrition of a Texture-Tag.
      But i did not find anything about this in the SDK.

      Can anybody help me and tell me how t get the resriction?

      Thanks a lot
      Ronald

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

        On 10/05/2015 at 13:00, xxxxxxxx wrote:

        Hi Ronald,

        In another script I compared all the selection tags in a list with the texturetag restriction by string.like:

          
          TagList = op.GetTags()  
          SelTagList = []      
          
            
          if op.GetTag(c4d.Tpolygonselection) :  
              for x in reversed(TagList) :  
                  if x.GetType() == c4d.Tpolygonselection:  
                      SelTagList.append(x)  
                        
          for t in reversed(TagList) :  
              if t.GetType() == c4d.Ttexture:            
                  if t[c4d.TEXTURETAG_RESTRICTION]:  
                      for s in SelTagList:  
                          if t[c4d.TEXTURETAG_RESTRICTION] ==  s[c4d.ID_BASELIST_NAME]:                               
                              Mat = t.GetMaterial()  
                  else:continue  
          
          print Mat  
          
        

        Hope I could help?
        Best wishes
        Martin

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

          On 11/05/2015 at 03:18, xxxxxxxx wrote:

          Hi Martin,

          thank you verry mutch!
          I think this will help me to solve my problem!

          Ronald

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