CommandData toggle?
-
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 -
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)
-
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