Setting custom gui attributes
-
On 20/01/2016 at 11:42, xxxxxxxx wrote:
If it is derived from SubDialog then you should be able to use GeDialog Setxxxx() methods (which include min and max arguments) to do the trick. ToolData works the same way in that you use a SubDialog not a Description for A.M. control.
-
On 20/01/2016 at 11:44, xxxxxxxx wrote:
The constructor of iCustomGUI accepts a const BaseContainer & settings. That's where you can read
the DESC_MIN and DESC_MAX values from.Originally posted by xxxxxxxx
If it is derived from SubDialog then you should be able to use GeDialog Setxxxx() methods (which include min and max arguments) to do the trick. ToolData works the same way in that you use a SubDialog not a Description for A.M. control.
Hm either of us may have misunderstood the question? If its about DESC_MIN and DESC_MAX, you can
not read those values from the iCustomGUI::GetInt32() (or the like). They are decoupled from the widgets
you actually display in the GUI. As I mentioned above, they are in the settings parameter of the
iCustomGUI constructor. These are passed down from CustomGuiData::Alloc() -
On 20/01/2016 at 11:49, xxxxxxxx wrote:
^I need to change the values Niklas.
Since that "settings" container is a const. I can't change them there. It was the first place I tried to do it.-ScottA
-
On 20/01/2016 at 11:51, xxxxxxxx wrote:
Originally posted by xxxxxxxx
^I need to change the values Nicklas.
Since that container is a const. I can't change them there. It was the first place I tried to do it.-ScottA
I see, overlook that before.
Hm, usually it should work the same way. Just grab the user data container and set DESC_MIN/DESC_MAX respectively.
Edit
Originally posted by xxxxxxxx
How do we change these values from inside a custom gui plugin?
FFS, Niklas, just read it carefully. You can't change these values from within the GUI plugin.
-
On 20/01/2016 at 11:57, xxxxxxxx wrote:
Lol..we're all cross posting at the same time.
How do I grab the UD container from inside of an iCustomGui plugin?
Typically I grab the UD container from an object. And then go down the UD ownership chain.
But since an iCustomGui plugin is a child of the UD container. I don't know how to go up the ownership chain like that.-ScottA
-
On 20/01/2016 at 12:53, xxxxxxxx wrote:
Originally posted by xxxxxxxx
But since an iCustomGui plugin is a child of the UD container. I don't know how to go up the ownership chain like that.
As I said, not possible. And you also don't know if the GUI is in a User Data or in the object description either.
Your GUI could just act as if the Min / Max value had the value you would like to to have though.
-
On 20/01/2016 at 14:32, xxxxxxxx wrote:
I see, what I'm doing in general is assigning the custom gui to a custom data type, and this custom data type can be accessed from GetDDescription()
I never set containers in a gui plugin.
-
On 20/01/2016 at 15:35, xxxxxxxx wrote:
I was thinking about using a custom data type in combination with my gui as a way to solve this problem. But I'm not sure it will work.
I'll have to think about this for while.
Right now it's a minor annoyance that we can't set the MIN/MAX values. Because the user will typically adjust them as needed anyway.
It just would be nice to be able to set them to a different default value.
But the fix seems to be a lot more trouble than it's worth.-ScottA
-
On 21/01/2016 at 01:36, xxxxxxxx wrote:
Hello,
just to be clear: you are talking about the default values of the "Min" and "Max" field that appear in the User Data Manger when the datatype is switched to "Integer"? It is not possible to change these values from a CustomGui.
Best wishes,
Sebastian -
On 21/01/2016 at 07:53, xxxxxxxx wrote:
Yes. Those are the values I'm trying to change.
It's a bit annoying that we can't change their default values when we load our custom gui's.
But it is, what it is.-ScottA
-
On 21/01/2016 at 09:13, xxxxxxxx wrote:
True. There's CustomDataTypeClass::GetDefaultProperties(), but nothing comparable in the CustomGuiData class.
-
On 21/01/2016 at 12:27, xxxxxxxx wrote:
This is what happens when I have too much free time on my hands.
umY4Exz3lrA-ScottA