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:
Cinema 4D Version: 9.6+
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;
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 ?
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.id;
if (id == MY_CYCLEBUTTON_ID)
The GeData t_data argument contains the selected value of the cycle button:
LONG value = t_data.GetLong();
On 27/04/2007 at 09:03, xxxxxxxx wrote:
It's working like a charm
On 27/04/2007 at 16:16, xxxxxxxx wrote:
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?
On 27/04/2007 at 16:43, xxxxxxxx wrote:
Try this (including everything) :
LONG did = id.id;
if (did == MY_CYCLEBUTTON_ID)
BaseContainer* bc = ((BaseTag* )node)->GetDataInstance();
if (!bc) return FALSE;
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. ::
On 27/04/2007 at 17:59, xxxxxxxx wrote: