Description's elements.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/05/2007 at 08:16, xxxxxxxx wrote:

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

    ---------
    Hi,

    how to enable/disable (i mean to put in inactive and than in active state) descriptions elements like SHADERLINK, REAL, etc.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/05/2007 at 11:31, xxxxxxxx wrote:

    I found the answere here

    but still don't know how to use it ;)

    i have sth like this:
    Bool test = GetDEnabling(node, DescID(MATERIAL_BUMP_MIPFALLOFF2), GeData("false"), 0, data);

    and SDK says:
    "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."

    and my t_data is here GeData("false") and i doesn't work.
    I've tried everything.



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/05/2007 at 11:39, xxxxxxxx wrote:

    GetDEnabling() allows you to change the state from editable to non-editable (greyed-out). This is a virtual method that you add to your data class (see NodeData in the docs) - you can't 'call' it as it is handled by Cinema 4D internally.

    Inside, you return TRUE (enable) or FALSE (disable) based upon the description element ID:

    / NodeData.GetDEnabling  
    //*---------------------------------------------------------------------------*  
    Bool IPPFigure::GetDEnabling(GeListNode* node, const DescID& id, GeData& t_data, LONG flags, const BaseContainer* itemdesc)  
    //*---------------------------------------------------------------------------*  
    {  
         if (!node)     return FALSE;  
         switch (id[0].id)  
         {  
              // Quick BodyPart Traversal Buttons  
              case IPPFIGURE_BP_UP:  
                   return (upBP_ID >= 0L);  
              case IPPFIGURE_BP_DOWN:  
                   return (downBP_ID >= 0L);  
              case IPPFIGURE_BP_PREV:  
                   return (prevBP_ID >= 0L);  
              case IPPFIGURE_BP_NEXT:  
                   return (nextBP_ID >= 0L);  
              // Assorted  
              case IPPFIGURE_COPYMORPHS:  
              {  
                   BaseContainer*     bc =     ((BaseTag* )node)->GetDataInstance();  
                   if (!bc)                    return TRUE;  
                   if (bc->GetBool(IPPFIGURE_CONFORMED))     return TRUE;  
                   return FALSE;  
              }  
              case IPPFIGURE_BULGEFACTOR:  
              {  
                   BaseContainer*     bc =     ((BaseTag* )node)->GetDataInstance();  
                   if (!bc)                    return TRUE;  
                   if (bc->GetBool(IPPFIGURE_BULGE))          return TRUE;  
                   return FALSE;  
              }  
              case BODYPART_BULGEFACTOR:  
              {  
                   BaseContainer*     bc =     ((BaseTag* )node)->GetDataInstance();  
                   if (!bc)                    return TRUE;  
                   if (bc->GetBool(BODYPART_BULGE))          return TRUE;  
                   return FALSE;  
              }  
              case IPPFIGURE_POLYCOUNT:  
              case IPPFIGURE_UNDOS:  
                   return FALSE;  
              default:  
                   break;  
         }  
         return SUPER::GetDEnabling(node, id, t_data, flags, itemdesc);  
    }  
    

    You didn't try this? ;)



  • THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

    On 22/05/2007 at 13:07, xxxxxxxx wrote:

    That was very helpfull. Thanks a lot.


Log in to reply