Retrieving wrong Texture Tag name



  • 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



  • 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.



  • 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



  • 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



  • 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. 

    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


Log in to reply