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

    CommandData toggle?

    Scheduled Pinned Locked Moved SDK Help
    3 Posts 0 Posters 289 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 06/06/2007 at 16:56, xxxxxxxx wrote:

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

      ---------
      Howdy,

      I've created a CommandData plugin that toggles a Boolean value, stored in the plugin's preference container, on and off. I'd like the icon to display as pressed or released to show the state of the Boolean value, but it only displays as pressed when the mouse button is pressed upon selecting the command. When the mouse button is released, the icon also displays as released.

      The CommandData works great to toggle the Boolean value on and off, but is there any way to make the icon show the state of the Boolean value with a CommandData?

      Adios,
      Cactus Dan

      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 06/06/2007 at 20:59, xxxxxxxx wrote:

        Hmmm,

        A Command plugin icon is sort of like a regular button (click on it to engage a process) while a Tool plugin icon is more like a state button (active-inactive). And I am assuming that this behaviour is controlled by Cinema 4D more than us developers.

        I can see the dilemma here. A Tool plugin would be perfect - except that the state is only active while another tool is not (thus the assumption of who has control in these cases).

        Now having said that, you might be able to 'fake it' using the RegisterCommandPlugin() option:

        PLUGINFLAG_COMMAND_DONT_CLONE_ICON

        which only available for R9.5 onwards. With this you could set up two bitmaps - one released, one pressed - and switch the icon bitmap as the Boolean value changes.

        I have no idea how you actually change the icon bitmap - maybe you point to one with RegisterCommandPlugin() but have another two copy theirs in as needed? (scratch head)

        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 06/06/2007 at 23:58, xxxxxxxx wrote:

          Howdy,

          Well, nevermind. I've already changed the way the Command plugin works now. ;o)

          Adios,
          Cactus Dan

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