Advice needed for the CustomGui
-
On 25/02/2014 at 11:34, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13,14,15
Platform: Windows ;
Language(s) : C++ ;---------
Hi, I am now giving up on the CustomGui for the moment, I am totally stuck.
I ask for advice!
Most important, are my questions difficult because you do not know the answers, or is my wording poor, my English bad, so that you just do not understand what I mean?Here is the very short version:
I need a CustomGui, because none of the C4D built in controls will do the job for me.
I have written a test version, and it works in a simple way, I can send a Real or a LONG to the control, make changes, and send the altered Real back, t hen read it, using the familiar SetParameter() and GetParameter().But I need to pass much more data back and forth. Normally, in my daily work as a programmer, I would just create a class / structure, and pass this class / structure back and forth, and the class would keep, maintain and even process some of the data.
I have no idea how this can be done in C4D. I have studied the CustomGuiData, CustomDataType and the CustomDataTypeClass, but it gets so complicated and overwhelming for such a simple task, as passing data between my CustomGui control and the plugin, that I believe I am on the wrong path.
Summing it up:
Question 1: How can my CustomGui class read values from a data structure, residing in my tag plugin, and how can my tag plugin read values from a data structure, residing in the CustomGui class.
Question 2: Where can I possibly turn to get assistance on this? Who can help me? -
On 25/02/2014 at 12:47, xxxxxxxx wrote:
I think you're probably out of luck. People have been asking here for years (literally) on how to write a full-blown custom GUI. Matthias promised to write one at one time but never got round to it
I suspect it will remain a dark art forever, or just possibly Maxon don't want plug devs to know how to do it, to prevent a sort of mad proliferation of different GUI elements (I have some sympathy with that... sometimes).
Steve
-
On 25/02/2014 at 13:03, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I think you're probably out of luck. People have been asking here for years (literally) on how to write a full-blown custom GUI. Matthias promised to write one at one time but never got round to it
Well, some comfort in what you write, it is not only me..
Originally posted by xxxxxxxx
I suspect it will remain a dark art forever, or just possibly Maxon don't want plug devs to know how to do it, to prevent a sort of mad proliferation of different GUI elements (I have some sympathy with that... sometimes).
I understand the benefit of restricting this.
But to me it seems the willingnes to share knowledge must have been there, if it is gone now. Take the file CINEMA 4D R14\plugins\cinema4dsdk\source\datatype\datatype.cpp
This files is there to help use do just that, write CustomGuis and exchange data.What I miss most, though, is an explanation on what roles the various classes play, how they interact, and why they are there. With classes here I mean the iCustomDataType, CustomProperty, CustomDataTypeClass, CustomGuiData, iCustomGui, GeUserArea amd last but not least, the TriState.
Some have names, that indicate obvious functions, some belong to the category black art..