Maxon Developers Maxon Developers
    • Documentation
      • Cinema 4D Python API
      • Cinema 4D C++ API
      • Cineware 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

    Get Texture Tag and set RestrictSelection

    SDK Help
    0
    3
    406
    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 17/02/2003 at 21:55, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ;   
      Language(s) :     C++  ;

      ---------
      This one (or two ) has me stumped.  How do I find a Texture Tag associated with a known object, by name?  Currently, I'm just using BaseObject->GetTag(Ttexture, i) in a loop until it finds it (or not) using String == operator.
      Then, how do I set the Texture Tag's "Selection" (formerly known as "Restrict to Selection") to a known String (which equals a PolygonSelection Tag)?
      Thanks much,
      Robert

      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 17/02/2003 at 23:24, xxxxxxxx wrote:

        In C++ this is easy:

            
            
             BaseObject* obj = doc->GetFirstObject();  
             TextureTag* tag = static_cast<TextureTag*>(obj->GetTag(Ttexture, 0));  
             GeData matlink;  
             tag->GetParameter(DescID(TEXTURETAG_MATERIAL), matlink, NULL);  
             BaseMaterial* mat = static_cast<BaseMaterial*>(matlink.GetLink(doc, Mbase));  
             GePrint(mat->GetName());
        

        And for the restriction:

            
            
             tag->SetParameter(DescID(TEXTURETAG_RESTRICTION), GeData("Restriction"), NULL);
        

        All found in Ttexture.res.

        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 18/02/2003 at 06:18, xxxxxxxx wrote:

          And here, I'm searching the lib's .h and .cpp files... :0)
          Thank you, Mikael!
          Robert

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