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

    GetDEnabling Result

    SDK Help
    0
    2
    324
    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 07/03/2003 at 14:45, xxxxxxxx wrote:

      User Information:
      Cinema 4D Version:   8.012 
      Platform:   Windows  ; Mac  ;  Mac OSX  ; 
      Language(s) :

      ---------
      I found the following in the latest SDK documentation. This may be my ignorance of programming but, if I return the state of the parameter how do I make a call to the parent?

      Should it be something like:
      parameter_State = TRUE;
      result = parameter_State || SUPER::GetDEnabling(node, id, t_data, flags, itemdesc);

      or something else?

      Docmentation says:

      virtual Bool GetDEnabling( GeListNode * node, const DescID& id, GeData & t_data, LONG flags, const BaseContainer * itemdesc)

      Called to let you decide which parameters should be enabled or disabled (ghosted). This can be used both for parameters that are stored in the node's container and for custom parameters.

      **Just read the passed t_data if the right id was provided, and return TRUE to enable the parameter or FALSE to disable it depending on the value. Then make sure to include a call to the parent at the end:
       **
        return SUPER::GetDEnabling(node, id, t_data, flags, itemdesc);

      Return
      Bool

      TRUE if the parameter should be enabled, otherwise FALSE . It's is recommended that you include a call to the parent function as your last return .

      Thank You,

      bt

      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 08/03/2003 at 13:06, xxxxxxxx wrote:

        Well, I can see how that sentence is a bit unclear as it is written. What it means is that if 'id' is matches then you return TRUE or FALSE, otherwise you pass the call on. As in SimpleMaterial.cpp:

            
            
            Bool SimpleMaterial::GetDEnabling(GeListNode *node, const DescID &id,GeData &t_data,LONG flags,const BaseContainer *itemdesc)  
            {  
              BaseContainer *dat = ((BaseMaterial* )node)->GetDataInstance();  
              Bool gi_available = C4DOS.Ra->ComputeDiffuseIllumination!=NULL;
            
            
            
            
              switch (id[0].id)  
              {  
                case MATERIAL_GLOBALILLUM_GENERATE:   
                case MATERIAL_GLOBALILLUM_RECEIVE:  
                case MATERIAL_CAUSTICS_GENERATE:  
                case MATERIAL_CAUSTICS_RECEIVE:  
                  return gi_available;
            
            
            
            
                case MATERIAL_GLOBALILLUM_GENERATE_STRENGTH:  
                  return gi_available && dat->GetBool(MATERIAL_GLOBALILLUM_GENERATE);
            
            
            
            
                case MATERIAL_GLOBALILLUM_RECEIVE_STRENGTH:  
                case MATERIAL_GLOBALILLUM_SATURATION:  
                  return gi_available && dat->GetBool(MATERIAL_GLOBALILLUM_RECEIVE);
            
            
            
            
                case MATERIAL_CAUSTICS_GENERATE_STRENGTH:  
                  return gi_available && dat->GetBool(MATERIAL_CAUSTICS_GENERATE);
            
            
            
            
                case MATERIAL_CAUSTICS_RECEIVE_STRENGTH:  
                  return gi_available && dat->GetBool(MATERIAL_CAUSTICS_RECEIVE);
            
            
            
            
                case MATERIAL_CAUSTICS_SAMPLERADIUS:        
                case MATERIAL_CAUSTICS_SAMPLES:       
                  return (dat->GetBool(MATERIAL_CAUSTICS_RECEIVE) || dat->GetBool(MATERIAL_CAUSTICS_GENERATE)) && gi_available;  
              }
            
            
            
            
              return SUPER::GetDEnabling(node,id,t_data,flags,itemdesc);  
            }
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post