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

    Retrieving wrong Texture Tag name

    Scheduled Pinned Locked Moved PYTHON Development
    5 Posts 0 Posters 469 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

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

      On 12/12/2012 at 12:13, xxxxxxxx wrote:

      I posted this on C4dcafe earlier, but thought it would be good to post here too.

      From what I've read in the documentation and researched online, the following code should retrieve the name of my texture tags. BUT...I'm only getting "Texture" as a name regardless of what I've named the tags. So, I must be doing something wrong, yes?

      FYI, there are multiple tags on the object, but only three texture tags, which are recognized by this code (what I want). Plus, I've also tried using < tag[c4d.ID_BASELIST_NAME] > without success.

      for tag in pl.GetTags() :  
              if (tag.CheckType(c4d.Ttexture)) :  
                      print(tag.GetName())
      

      Thanks,

      Jim

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

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

        On 12/12/2012 at 12:27, xxxxxxxx wrote:

        Texture IS the default name of each Ttexture. You are mixing up a BaseTag and 
        BaseMaterial i guess. so for your example the correct ids would be :

        tag[c4d.TEXTURETAG_MATERIAL][c4d.ID_BASELIST_NAME]

        the first id grabs the BaseMaterial from the tag, the second gets the name out of this material.

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

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

          On 12/12/2012 at 12:38, xxxxxxxx wrote:

          Thanks Ferdinand  🍺

          Jim

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

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

            On 12/12/2012 at 12:43, xxxxxxxx wrote:

            FYI, You could also do tag[c4d.TEXTURETAG_MATERIAL].GetName().

            Best,
            Niklas

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

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

              On 12/12/2012 at 12:55, xxxxxxxx wrote:

              On second pass in my code, it looks like what I had is what I wanted (strangely). But for some reason or another, the tag name (from name field) was not coming out in the console, just the default names ('Texture').

              I haven't really done anything special, but the custom assigned tag names are now printing to the console for some reason. Confused

              Niklas, thanks much. I think I might have tried that earlier, but like I said above, it seems like something weird was happening and my code was correct, but strangely not producing what it should have.

              Jim

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