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

    I cant get parameters of TextureTag

    Scheduled Pinned Locked Moved SDK Help
    7 Posts 0 Posters 652 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 22/07/2007 at 11:05, xxxxxxxx wrote:

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

      ---------
      Hi.
      Im trying to get (and set) some parameters of texture tag. And I cant find the way 😞
      This code doesnt work:

          
          
          
          
          BaseObject *obj = doc->GetActiveObject() ;
          
          
          
          
          TextureTag *tg = (TextureTag* )obj->GetTag( Ttexture) ;
          
          
          
          
          BaseContainer bs = tg->GetData() ;
          
          
          
          
          BaseList2D *dd = bs.GetString( TEXTURETAG_RESTRICTION) ;
          
          
          
      

      And this doesnt work too:

          
          
          BaseList2D *dd = bs.GetLink( TEXTURETAG_MATERIAL, doc) ;
      

      and this too:

          
          
          
          
          tg->GetDataInstance()->GetString( TEXTURETAG_RESTRICTION)
          
          
          
      

      It seems like I cant get right BaseContainer of tag 😞
      Pointer to tag is valid, coz

          
          
          tg->GetMaterial()->GetName()
      

      works well.

      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 22/07/2007 at 11:10, xxxxxxxx wrote:

        I just wanted to set "Selection" parameter in texture tag. But then I mentioned that I cant set and GET any parameter through tag's container.
        Help me please. What Im doing wrong?

        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 22/07/2007 at 11:16, xxxxxxxx wrote:

          I tryed to write digits instead a constant names.
          e. g. 1006 instead of TEXTURETAG_RESTRICTION
          It not helped.

          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 22/07/2007 at 11:41, xxxxxxxx wrote:

            BaseList2D \*dd = bs.GetString( TEXTURETAG_RESTRICTION) ;
            
            
            sorry it is just wrong copy paste. Of cource I checked my code very carefully.
            
            
            I meant 
            
            
            String str = bs.GetString( TEXTURETAG_RESTRICTION) ;
            
            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 22/07/2007 at 11:43, xxxxxxxx wrote:

              GeData data;
              TextureTag* ttag = static_cast<TextureTag*>(obj->GetTag(Ttexture);
              if (!ttag) return FALSE; // No texture tags
              ttag->GetParameter(DescID(TEXTURETAG_MATERIAL), data, NULL);
              Material* mat = static_cast<Material*>(data.GetLink(baseDocument, Mbase));
              if (!mat) return FALSE; // No asssociated 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 22/07/2007 at 11:50, xxxxxxxx wrote:

                Thank you a lot !!!
                It is works !!!

                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 22/07/2007 at 15:22, xxxxxxxx wrote:

                  Sometimes you can get data from the BaseContainer (GetDataInstance() is better than GetData()) and sometimes you need to get it from the (Description) parameters (GetParameter() or GetParameterI()). Unless there are examples here or in the cinema4dsdk examples folder, it's mainly trial and error.

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