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

    Description's elements.

    Scheduled Pinned Locked Moved SDK Help
    4 Posts 0 Posters 390 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/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.

      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/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.

        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/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? 😉

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

            That was very helpfull. Thanks a lot.

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