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

    Toggle display of elements of CKey

    SDK Help
    0
    4
    523
    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

      On 25/08/2017 at 20:36, xxxxxxxx wrote:

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

      ---------
      I want to change the display of the parameter of CKey, but I can not do it.
      Although it is possible to switch display with GetDDescription, KeyGetDDescription can not automatically switch, it can not switch without manipulating other elements or once you have selected another one.
      Please tell me if anyone knows.

        
      Bool BlinkerTrack::KeyGetDDescription(CTrack* track, CKey* node, Description* description, DESCFLAGS_DESC& flags) 
      {
           if (!(flags & DESCFLAGS_DESC_LOADED))
           {
                if (description->LoadDescription(auto_id))
                     flags |= DESCFLAGS_DESC_LOADED;
              CKey* key = node; 
        
              GeData ds;
              key->GetParameter(DescLevel(ID_AAA), ds, DESCFLAGS_GET_0);
              if(ds.GetInt32() == CH_BBB)
              {
                  BaseContainer *bc1 = description->GetParameterI(DescLevel(ID_DDD), NULL);
                  if (bc1) bc1->SetBool(DESC_HIDE, true);
              }
              else
              {
                  BaseContainer *bc1 = description->GetParameterI(DescLevel(ID_DDD), NULL);
                  if (bc1) bc1->SetBool(DESC_HIDE, false);
              }
           }
           return flags & DESCFLAGS_DESC_LOADED; 
      }   
      

      Edit: Fixed code tags

      1 Reply Last reply Reply Quote 0
      • H
        Helper
        last edited by

        On 29/08/2017 at 09:05, xxxxxxxx wrote:

        I can reproduce your issue. I'm currently waiting for feedback from development.

        1 Reply Last reply Reply Quote 0
        • H
          Helper
          last edited by

          On 30/08/2017 at 10:28, xxxxxxxx wrote:

          Hi,

          no really good news for you.
          The only workaround I can offer is to use KeyGetDEnabling(), so instead of hiding just disabling the parameters. There the updating works correctly.
          I have filed a bugreport for our development on the KeyGetDDescription() issue.

          1 Reply Last reply Reply Quote 0
          • H
            Helper
            last edited by

            On 01/09/2017 at 08:00, xxxxxxxx wrote:

            Thank you for checking.
            I will respond by the method taught.
            I hope that KeyGetDDescription () will be modified.

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