Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
On 06/08/2015 at 01:10, xxxxxxxx wrote:
User Information: Cinema 4D Version: R16 Platform: Windows ; Language(s) : C++ ;
--------- Greetings !
I have created a custom gui and i use it in resource file as: LONG UPPER_MENU { CUSTOMGUI INTERACTIVE_AREA; } LONG .... { CUSTOMGUI INTERACTIVE_AREA; } LONG .... { CUSTOMGUI INTERACTIVE_AREA; } LONG .... { CUSTOMGUI INTERACTIVE_AREA; } LONG LOWER_MENU { CUSTOMGUI INTERACTIVE_AREA; }
How can i get the values each menu ID in the constructor of the customgui subclass? I use many menus that way and i want to handle them differently during creation.
Cosntructor: MyCustomGui::MyCustomGui(const BaseContainer &settings,CUSTOMGUIPLUGIN *t_plugin)
I need something like String str=settings.GetString(DESC_IDENT); but this one returns the string. I need the DescID. I looked at the ids i can pass but no one returns what i want.
Thank you very much for your time.
On 06/08/2015 at 01:19, xxxxxxxx wrote:
you can do this through a CustomDataType connected to your CustomGui, at least this is what I've done in my case and works fine.
On 06/08/2015 at 02:17, xxxxxxxx wrote:
Hello.
The function getCustomDataType needs the id of an element as parameter.
What I need to find is this ID.
I have many elements defined as: LONG MY_MENU { CUSTOMGUI INTERACTIVE_AREA; } I need the value of MY_MENU inside the constructor of interactive area custom gui.
Thank you.
On 07/08/2015 at 02:19, xxxxxxxx wrote:
sorry for the late reply. now I kinda understand what you want to do, you wanna react in your user area depending on the MY_MENU integer value.
check this, done by Niklas, https://github.com/nr-plugins/example-tristate-gui/tree/e090322e5ff3aca795254d74e1021213d7cf39e5
here is the highlighted interesting area, https://github.com/nr-plugins/example-tristate-gui/blob/e090322e5ff3aca795254d74e1021213d7cf39e5/src/TriStateGui.cpp#L195-L233
m_ua is a member, representing your user area, and here it can "see" what the value is, so you can react according to this.
On 07/08/2015 at 03:36, xxxxxxxx wrote:
Hi,
I'm not sure, it is a good idea to react on specific description IDs in a CustomGUI. After all the CustomGUI can be used for every description parameter of a given type. So you can't actually know in advance for which IDs the CustomGUI will be used. Instead I propose to have a CustomProperty on the CustomGUI, where an integer can be specified to choose the desired behavior.
On 07/08/2015 at 04:01, xxxxxxxx wrote:
@Andreas, this is one of the reasons I made my CustomGui hidden "only me can use it" , and used it privately inside my CustomDataType
On 26/08/2015 at 10:06, xxxxxxxx wrote:
@peterakos: Have you been able to get going?
On 26/08/2015 at 13:30, xxxxxxxx wrote:
Greetings ! Yes i have managed to find a workaround to my problem. Thank you very much.