GradientCustomGui Class Reference

#include <customgui_gradient.h>

Inheritance diagram for GradientCustomGui:

Detailed Description

Gradient GUI (CUSTOMGUI_GRADIENT) for the Gradient data type. Here are the settings: GRADIENTPROPERTY_CUSTOMGUISETTINGS

Private Member Functions

 GradientCustomGui ()
 
 ~GradientCustomGui ()
 

Gradient Data

GradientGetGradient ()
 
Bool SetGradient (Gradient *grad)
 

Active Knots/Biasses

maxon::Result< maxon::BaseArray< Int32 > > GetActiveKnots (Bool bias)
 
maxon::Result< void > SetActiveKnots (const maxon::BaseArray< Int32 > &activeIndexList, Bool bias, Bool addToSelection)
 

Additional Inherited Members

- Public Member Functions inherited from BaseCustomGui< 1000480 >
Int32 GetWidth ()
 
Int32 GetHeight ()
 
void Redraw ()
 
Bool LayoutChanged ()
 
Bool Activate ()
 
Bool SetDefaultForResEdit ()
 
Bool SetData (const TriState< GeData > &tristate)
 
TriState< GeDataGetData ()
 
void SetLayoutMode (Int32 mode)
 
Int32 GetLayoutMode ()
 
Bool SupportLayoutSwitch ()
 
- Public Member Functions inherited from _BaseCustomGui
Int32 GetWidth (Int32 plugid)
 
Int32 GetHeight (Int32 plugid)
 
void Redraw (Int32 plugid)
 
Bool LayoutChanged (Int32 plugid)
 
Bool Activate (Int32 plugid)
 
Bool SetDefaultForResEdit (Int32 plugid)
 
Bool SetData (Int32 plugid, const TriState< GeData > &tristate)
 
TriState< GeDataGetData (Int32 plugid)
 
void SetLayoutMode (Int32 plugid, Int32 mode)
 
Int32 GetLayoutMode (Int32 plugid)
 
Bool SupportLayoutSwitch (Int32 plugid)
 
- Static Public Attributes inherited from BaseCustomGui< 1000480 >
static constexpr Int32 VALUE
 

Constructor & Destructor Documentation

◆ GradientCustomGui()

GradientCustomGui ( )
private

◆ ~GradientCustomGui()

~GradientCustomGui ( )
private

Member Function Documentation

◆ GetGradient()

Gradient* GetGradient ( )

Gets the gradient data.

Returns
The gradient data.

◆ SetGradient()

Bool SetGradient ( Gradient grad)

Sets the gradient data.

Warning
Unlike SetData() it sends a parent GUI message, causing parent GUI elements (e.g. a shader or dialog that contains the gradient custom GUI) to update automatically.
Note
It is recommended to call SetData() instead, because SetGradient() just sets grad instance and if there is an alpha gradient, it will be destroyed.
With SetData() it needs some more lines of code but alpha gradients will be preserved.
Parameters
[in]gradThe gradient data to set. The caller owns the pointed gradient data.
Returns
true if successful, otherwise false.

◆ GetActiveKnots()

maxon::Result<maxon::BaseArray<Int32> > GetActiveKnots ( Bool  bias)

Gets the active knots or biassses control indexes.

Parameters
[in]biasSet to true to get the active biasses index, otherwise it will get the active knots indexes.
Returns
The active knot index list.

◆ SetActiveKnots()

maxon::Result<void> SetActiveKnots ( const maxon::BaseArray< Int32 > &  activeIndexList,
Bool  bias,
Bool  addToSelection 
)

Sets the active knots or biasses controls.

Parameters
[in]activeIndexListThe knots or biasses index list to set.
[in]biasPass true to select biasses, otherwise knots.