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
GRADIENTMODE_COLORALPHA
#define GRADIENTMODE_COLORALPHA
Color and alpha.
Definition: customgui_gradient.h:109
CUSTOMGUI_SAVEDLAYOUTDATA
#define CUSTOMGUI_SAVEDLAYOUTDATA
BaseContainer Saved layout data.
Definition: customgui_base.h:29
BaseContainer::SetInt32
void SetInt32(Int32 id, Int32 l)
Definition: c4d_basecontainer.h:505
BaseContainer::GetContainerInstance
BaseContainer * GetContainerInstance(Int32 id)
Definition: c4d_basecontainer.h:425
GRADIENTMODE_COLOR
#define GRADIENTMODE_COLOR
Color only.
Definition: customgui_gradient.h:107
BFM_GETCUSTOMGUILAYOUTDATA
@ BFM_GETCUSTOMGUILAYOUTDATA
@markPrivate
Definition: gui.h:968
GRADIENTPROPERTY_NOEDITCOLOR
#define GRADIENTPROPERTY_NOEDITCOLOR
Definition: customgui_gradient.h:54
BaseContainer::GetId
Int32 GetId() const
Definition: c4d_basecontainer.h:131
GRADIENTMODE_ALPHA
#define GRADIENTMODE_ALPHA
Alpha only.
Definition: customgui_gradient.h:108
GRADIENTPROPERTY_ALPHA
#define GRADIENTPROPERTY_ALPHA
Definition: customgui_gradient.h:49
Int32
maxon::Int32 Int32
Definition: ge_sys_math.h:60
BaseContainer::GetBool
Bool GetBool(Int32 id, Bool preset=false) const
Definition: c4d_basecontainer.h:295
GRADIENTPROPERTY_ALPHA_WITH_COLOR
#define GRADIENTPROPERTY_ALPHA_WITH_COLOR
Definition: customgui_gradient.h:44
Bool
maxon::Bool Bool
Definition: ge_sys_math.h:55
BaseContainer::GetInt32
Int32 GetInt32(Int32 id, Int32 preset=0) const
Definition: c4d_basecontainer.h:303
BaseContainer
Definition: c4d_basecontainer.h:46