On 07/10/2014 at 14:20, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ;
Language(s) : C++ ;
---------
Hi,
When the user changes a gizmo in a node based plugin. Is there a way to get the specific gizmo's new value from a message?
Right now I have two ways to check if a specific gizmo was changed in a node based plugin:
1- use a class member variable to poll the specific gizmo if the value is different
2- Send out my own custom message if a gizmo was changed by the user
Both of these are cumbersome. Because I'm getting the gizmo's value manually with my own custom hand written code.
What If I have dozens of gizmo's I wanted to monitor?
I would need to use dozens of class member variables. Or use dozens of unique message ID#s.
The BFM messages in GeDialog plugins send out the value of the gizmo without needing to write our own polling code like above.
This is very nice because we can retrieve the value directly from the message. But I don't see an equivalent for node type plugins.
//GeDialog gizmos send out valuable information inside BFM messages besides just the generic "something was changed" message
//These messages carry information about the specific gizmo (ID & value) that the user is changing
BaseContainer msg;
LONG gizmoID = msg.GetLong(BFM_ACTION_ID);
GeData d = msg.GetData(BFM_ACTION_VALUE);
if(d.GetType() == DA_LONG) GePrint(LongToString(gizmoID) + " " + LongToString(msg.GetLong(BFM_ACTION_VALUE)));
Is there an equivalent message we can use to get the changed gizmo's values like this when using node based plugin's?
Writing custom polling code for each gizmo by hand seems silly to me.
-ScottA