Preferences - button [SOLVED]
-
On 09/01/2015 at 02:21, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 16
Platform: Mac OSX ;
Language(s) : C++ ;---------
HeyI just make my first steps in c++ - usually i use python.
I try to create a PrefsDialogObject with buttons - where can i get the click and run some code ?
Thanks
-
On 09/01/2015 at 07:31, xxxxxxxx wrote:
There's an example in the C++ docs under "PrefsDialogObject".
Have you looked at that one?-ScottA
*Edit-
Hmm. I just took a look at the online R16 docs and it doesn't seem to be there anymore.
There is a pretty full example in the R14 C++ docs though. -
On 09/01/2015 at 08:25, xxxxxxxx wrote:
Hello,
PrefsDialogObject
[URL-REMOVED] is based onNodeData
[URL-REMOVED]. So to find ouf if a button was pressed you have to implementNodeData::Message
[URL-REMOVED] and check for theMSG_DESCRIPTION_COMMAND
[URL-REMOVED] message. The data is aDescriptionCommand
[URL-REMOVED] object which contains the ID of the pressed button.virtual Bool Message(GeListNode* node, Int32 type, void* data) { if(type == MSG_DESCRIPTION_COMMAND) { DescriptionCommand* dc = (DescriptionCommand* ) data; if(dc) { const Int ID = dc->id[0].id; if(ID == MY_BUTTON) { GePrint("button pressed"); } } } return SUPER::Message(node,type,data); }
We are currently working on the R16 documentaiton so missing parts will be added.
Best wishes,
Sebastian
[URL-REMOVED] @maxon: This section contained a non-resolving link which has been removed.
-
On 09/01/2015 at 14:03, xxxxxxxx wrote:
Thanks work