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

    Material Channels on/off missing in Data

    SDK Help
    0
    4
    467
    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 21/09/2003 at 09:53, xxxxxxxx wrote:

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

      ---------
      Hi,

      I'm trying to read the on/off settings (MATERIAL_USE_* ) of the material channels from a standard material. However, these are missing in the BaseContainer, while other settings of the material such as MATERIAL_ENVIRONMENT_EXCLUSIVE are present!?

      I've tried the following on a scene with a single standard material:

        
      Bool MyDialog::CoreMessage(LONG id, const BaseContainer& msg)  
      {  
           switch(id)  
           {  
           case EVMSG_CHANGE:  
           {  
                BaseContainer* bc = GetActiveDocument() -> GetFirstMaterial() - >GetDataInstance();  
                Bool a = bc->GetBool(MATERIAL_USE_COLOR);  
                LONG resa = bc->FindIndex(MATERIAL_USE_COLOR);  
                Bool b = bc->GetBool(MATERIAL_ENVIRONMENT_EXCLUSIVE);  
                LONG resb = bc->FindIndex(MATERIAL_ENVIRONMENT_EXCLUSIVE);  
                // and so on  
           }  
      // and so on  
      

      resa is always NOTOK, resb is always != NOTOK, and only b correctly reflects the adjustments I make in the attribute editor.

      How can I get at the state of the check boxes of the material's first parameter page?

      Thanks in advance.

      Jörn

      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 23/09/2003 at 23:46, xxxxxxxx wrote:

        It's some days later, but I still didn't find out ...

        Jörn

        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 24/09/2003 at 09:47, xxxxxxxx wrote:

          this data is no longer available in this way.
          i did it something like this
          i f d is false the then this channel is not in use (unchecked)

              
              
              
              
              for (LONG channel=0;channel<MAXCHANNELS;channel++)  
               {
              
              
              
              
                mat->GetParameter(DescID(MATERIAL_USE_COLOR+channel), d, NULL);  
                if (d==false) continue;
              
              
              
              
               
              
              
              
              
               
              
              
              
          
          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 25/09/2003 at 01:20, xxxxxxxx wrote:

            Great, I'll try that!

            Jörn

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