Thanks @s_bach
This is very helpful.
Best wishes.
Ogers
@Ogers
Posts made by Ogers
-
RE: Use existing data for DynamicDescription
-
Use existing data for DynamicDescription
Hello,
I was checking on how to add a new tab in the attributes manager using DynamicDescription object but I could only do so if I create all the data by myself. Is there any way that I can do this but from the data that already exist.
Example:
I have a tree-view where you can add different shaders and what I need is that whenever a shader is selected I need to show the attributes of that shader (created in a res file) in the Attributes Manager. Is such a thing possible?
Thank you. -
RE: Align Group Parameters (Resource Files)
Thanks @zipit,
Managed to solve it thanks to you. -
RE: Align Group Parameters (Resource Files)
@zipit the reason why I have to use GROUP for every row is because at every row I am adding a popup button. And I can not add it using res file. So I can't do this without a group which tells me where to add the popup button.
-
Align Group Parameters (Resource Files)
Hello,
I have a resource file where I define the UI of materials attributes.GROUP COATING_LAYER { GROUP THICKNESS_GROUP { COLUMNS 2; REAL COATING_LAYER_THICKNESS{SCALE_H; MIN 0; MAX 1; MINSLIDER 0; MAXSLIDER 1; STEP 0.001; CUSTOMGUI REALSLIDER;} SHADERLINK COATING_LAYER_THICKNESS_SHADER{ANIM ON; SCALE_H; HIDDEN;} } GROUP COLOR_GROUP { COLUMNS 2; COLOR COATING_LAYER_COLOR{SCALE_H;} SHADERLINK COATING_LAYER_COLOR_SHADER{ANIM ON; HIDDEN;} } //...Continues with other groups }
One parameter of the group I specify on the res file as above (The hidden one is not used at all in the UI) and the second parameter I specify using Description object as below.
const DescID* singleid = dc->GetSingleDescID(); if (!singleid || ((DescID)id).IsPartOf(*singleid, NULL)) { BaseContainer bc = GetCustomDataTypeDefault(DTYPE_POPUP); // Set CycleButton properties bc.SetBool(DESC_ANIMATE, false); bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_POPUP); bc.SetBool(DESC_GROUPSCALEV, TRUE); // Create CycleButton return dc->SetParameter(DescLevel(id, DTYPE_POPUP, 0), bc, groupid); } return TRUE;
The view that I get is the picture below but as you can see the paramters (Thickness, Color, Roughness etc) are not aligned as they normally do when using description resource.
How would the code or res file look like so I can have them aligned.
-
RE: Add Child to description popup field.
Hello. I am creating my own custom parameter.
-
RE: Add Child to description popup field.
I found the solution. Seems that I had to use MSG_DESCRIPTION_POPUP message to fill the popup field.
-
Add Child to description popup field.
Hello. I am creating a parameter description with a popup field but I can not add childs to it. I know that in a GeDialog it is very straightforward AddChild(pop_up_ID,id,name).
Also I managed to add child to a CycleButton CustomGui and I thought it would be very similar to this.BaseContainer bc = GetCustomDataTypeDefault(DTYPE_LONG); bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_CYCLEBUTTON); bc.SetString(DESC_NAME, "Cycle Button"); bc.SetContainer(DESC_CYCLE, settings); return dc->SetParameter(DescLevel(id, DTYPE_LONG, 0), bc, group_id);
where settings is the container that contains the item names for the cycle.
What would be the equivalent of this for a popup field?
I have tried some options but none of it worked. Also DESC_CYCLE would not work for the items of an popup field.BaseContainer bc = GetCustomDataTypeDefault(DTYPE_POPUP); bc.SetInt32(DESC_CUSTOMGUI, CUSTOMGUI_POPUP); //bc.SetString(DESC_NAME, "Pop Up Button"); //bc.SetContainer(DESC_CYCLE, settings); return dc->SetParameter(DescLevel(id, DTYPE_POPUP, 0), bc, group_id);
Thank you.
-
RE: Default startup settings
Hello @m_magalhaes.
Thank you for your help. I understand it and I tried it, works fine.
But what if I am using GeDialog class instead, that is being called using a CommandData. How can I store the changes on that GeDialog the same way you did here?
Is this method with the WorldContainer() used only for the preferences dialog box, because GetDDescription, GetDParameter and SetDParameter functions are not part of GeDialog class.
Thank you again.