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

    Material Keys

    SDK Help
    0
    5
    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/08/2004 at 09:04, xxxxxxxx wrote:

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

      ---------
      Hey
      I'm trying to get my plugin to key frame the changes in a texture tag. I'm just wondering how do I access the "Material" property of a data key on a material track?
      Thanks

      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/08/2004 at 00:42, xxxxxxxx wrote:

            
            
            GeData d;  
            key->GetParameter(DescID(DATAKEY_VALUE), d, 0);  
            BaseMaterial* mat = static_cast<BaseMaterial*>(d.GetLink(doc, Mbase));
        
        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/08/2004 at 09:34, xxxxxxxx wrote:

          Thanks a lot for the quick reply. I guess I was hoping for the code to set the material property for the data key. I tried using:

              
              
                
              //material is a BaseMaterial which is parameter passed in  
              GeData d = GeData(material->GetData());  
              key->SetParameter(DescID(DATAKEY_VALUE), d, DESCFLAGS_DONTCHECKMINMAX);  
              
          

          It doesn't appear this works. Any ideas on what's wrong? Or is there a better way of doing this?

          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/08/2004 at 10:32, xxxxxxxx wrote:

            GetData() returns the data container, not a GeData. You need to create a BaseLink and send in a GeData with that to SetParameter() :

                
                
                AutoAlloc<BaseLink> link;  
                link.SetLink(material);  
                key->SetParameter(DescID(DATAKEY_VALUE), GeData(link), 0);
            
            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/08/2004 at 10:52, xxxxxxxx wrote:

              Thanks a lot Mikael! Works perfectly after a few small modifications. Here's what I had to change if anyone's interested:

                  
                  
                    
                  AutoAlloc <BaseLink> link;  
                  link->SetLink(material);  
                  key->SetParameter(DescID(DATAKEY_VALUE), GeData(link), DESCFLAGS_DONTCHECKMINMAX);  
                  
              

              Thanks again

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