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

    MSG_DESCRIPTION_COMMAND for Cycle Button

    Scheduled Pinned Locked Moved SDK Help
    6 Posts 0 Posters 562 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 27/04/2007 at 08:22, xxxxxxxx wrote:

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

      ---------
      Hi all,

      i need to detect when a Cycle button is pressed in the resource.

      In fact i done a code in my Message that load and save settings for my plugin, and i tried to add another cycle button with some saved presets.
      The problem is that i can't detect when is pressed because c4d don't send to me the MSG_DESCRIPTION_COMMAND.
      What i need is detect when is pressed and load one of the preset inside.

      Any help ?

      Cheers
      Renato

      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 27/04/2007 at 08:45, xxxxxxxx wrote:

        You don't mention if this is a dialog or attributes manager, but I'll assume the latter from your wording.

        In the SetDParameter() method, check for the 'id' of the cycle button (this can be a dynamic or static resource LONG type) :

        LONG did = id[0].id;
        if (id == MY_CYCLEBUTTON_ID)
        {
        ...
        }

        The GeData t_data argument contains the selected value of the cycle button:

        LONG value = t_data.GetLong();

        HTH! 🙂

        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 27/04/2007 at 09:03, xxxxxxxx wrote:

          Thanks Robert,

          It's working like a charm 🙂

          Cheers
          Renato

          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 27/04/2007 at 16:16, xxxxxxxx wrote:

            Robert..

            i setup all but is returning the older value..
            if i choise the menu numeber 8 and i was in the number 3.. i get 3 🙂

            how i can fix this?

            Thanks
            Renato

            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 27/04/2007 at 16:43, xxxxxxxx wrote:

              Try this (including everything) :

              LONG did = id[0].id;  
              if (did == MY_CYCLEBUTTON_ID)  
              {  
                   BaseContainer*     bc = ((BaseTag* )node)->GetDataInstance();  
                   if (!bc) return FALSE;  
                   bc->SetLong(MY_CYCLEBUTTON_ID, t_data.GetLong());  
                   flags |= DESCFLAGS_PARAM_SET;  
              }
              

              Since this is using SetDParameter() (GetDParameter() is sort of useless, isn't it?) - you have to set the container value - even though you or the user 'set' it already. :🤷:

              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 27/04/2007 at 17:59, xxxxxxxx wrote:

                Thansk 🙂

                Great Robert!

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