CUSTOMGUI_SUPPORT

Detailed Description

Macros

#define CUSTOMGUI_SUPPORT_LAYOUTSWITCH
 
#define CUSTOMGUI_SUPPORT_LAYOUTDATA
 
#define CUSTOMGUI_DISALLOW_TAKESOVERRIDE
 

Macro Definition Documentation

◆ CUSTOMGUI_SUPPORT_LAYOUTSWITCH

#define CUSTOMGUI_SUPPORT_LAYOUTSWITCH

Supports layout switching.

◆ CUSTOMGUI_SUPPORT_LAYOUTDATA

#define CUSTOMGUI_SUPPORT_LAYOUTDATA

Supports layout data. If set, the custom GUI saves and restores data to a BaseContainer when the GUI is rebuilt.
For example imagine the following: the user adds a gradient needle. The number of GUI elements changes (sub-descriptions are shown) and the dialog needs to be rebuilt.
In order that the GUI does not lose its settings (e.g. which needle was active etc.) it can store its data to a BaseContainer under its description ID.
Some excerpts from the gradient custom GUI:

iGradientCustomGui::iGradientCustomGui(const BaseContainer &settings,CUSTOMGUIPLUGIN *plugin) : iBaseCustomGui(settings,plugin)
{
Bool alpha = settings.GetBool(GRADIENTPROPERTY_ALPHA);
editcolor = !settings.GetBool(GRADIENTPROPERTY_NOEDITCOLOR);
if (col && alpha)
else if (alpha)
area.mode=GRADIENTMODE_ALPHA;
else
area.mode=GRADIENTMODE_COLOR;
m_bIsTristate = false;
area.m_pParent = nullptr;
if (data)
{
area.editalpha = data->GetInt32(1);
area.displayresult = data->GetInt32(2);
area.active_knot = data->GetInt32(3);
area.active_bias = data->GetInt32(4);
}
}
Int32 iGradientCustomGui::Message(const BaseContainer &msg,BaseContainer &result)
{
switch (msg.GetId())
{
result = BaseContainer(1);
result.SetInt32(1,area.editalpha);
result.SetInt32(2,area.displayresult);
result.SetInt32(3,area.active_knot);
result.SetInt32(4,area.active_bias);
return true;
...
}
}

◆ CUSTOMGUI_DISALLOW_TAKESOVERRIDE

#define CUSTOMGUI_DISALLOW_TAKESOVERRIDE

Disallows Takes override e.g. the GUI does not hold real data but just react to the node changes (e.g. Material Preview).

Since
R17.032