BPColorSettingsHelpers Struct Reference

#include <lib_paint.h>

Detailed Description

Functions to get access to the selected BodyPaint 3D channel color settings.

Static Public Member Functions

static BPColorSettingsGetColorSettings (Bool bg)
 
static BPSingleColorSettingsGetChannelColorSettings (Bool bg, Int32 channelid)
 
static BPSingleColorSettingsGetSelectedSingleColorSettings (Bool bg, Int32 *channelid=nullptr)
 
static void SetSelectedColorSettings (Bool bg, Int32 channelid)
 
static Bool GetGlobalChannelEnabling (Int32 channelid)
 
static void SetGlobalChannelEnabling (Int32 channelid, Bool enable)
 
static Bool GetMultiMode ()
 
static void SetMultiMode (Bool multi)
 
static Bool ToggleFgBg ()
 
static BPPaintSettingsGetActiveColorPreset ()
 
static void SetActiveColorPreset (BPPaintSettings *set)
 
static Bool SaveColorSettings (BPPaintSettings *set)
 
static Bool DefineColorPreset (PaintTexture *tex, PaintLayerBmp *layer, PaintLayerBmp *mask, BPSingleColorSettings *color, Bool wallpaper)
 

Member Function Documentation

◆ GetColorSettings()

static BPColorSettings* GetColorSettings ( Bool  bg)
static

Gets the color settings, for the foreground or background color, of a BodyPaint 3D Channel.

Parameters
[in]bgPass true to get the background color settings or false for the foreground color settings.
Returns
The color settings for the global background or foreground.

◆ GetChannelColorSettings()

static BPSingleColorSettings* GetChannelColorSettings ( Bool  bg,
Int32  channelid 
)
static

Gets the settings, for the foreground or background color, of a specific BodyPaint 3D Channel.

Parameters
[in]bgPass true to get the background color settings or false for the foreground color settings.
[in]channelidThe channel to get the color settings for e.g. CHANNEL_COLOR.
Returns
The color settings for the global background or foreground.

◆ GetSelectedSingleColorSettings()

static BPSingleColorSettings* GetSelectedSingleColorSettings ( Bool  bg,
Int32 channelid = nullptr 
)
static

Gets the settings for the currently selected channel in BodyPaint 3D. If GetMultiMode() is on and there are multiple channels selected then it is possible to specify the channel.

Parameters
[in]bgPass true to get the background color settings or false for the foreground color settings.
Special exception, set to NOTOK to use the selected background color.
[in]channelidThe specific channel to get the color settings for, e.g. CHANNEL_COLOR, if GetMultiMode() is enabled and there are multiple channels selected.
Returns
The color settings for the global background or foreground.

◆ SetSelectedColorSettings()

static void SetSelectedColorSettings ( Bool  bg,
Int32  channelid 
)
static

Sets which channel is selected.

Parameters
[in]bgPass true to get the background color settings or false for the foreground color settings.
Special exception, set to NOTOK to use the selected background color.
[in]channelidThe specific channel to get the color settings for, e.g. CHANNEL_COLOR.

◆ GetGlobalChannelEnabling()

static Bool GetGlobalChannelEnabling ( Int32  channelid)
static

Gets which channel is selected/enabled. If GetMultiMode() is on then multiple channels could be enabled for painting.

Parameters
[in]channelidThe ID of the channel e.g. CHANNEL_COLOR.
Returns
true if the channel is enabled, otherwise false.

◆ SetGlobalChannelEnabling()

static void SetGlobalChannelEnabling ( Int32  channelid,
Bool  enable 
)
static

Sets which channel is selected/enabled. If GetMultiMode() is true then it is possible to enable multiple channels for painting.

Parameters
[in]channelidThe ID of the channel to enable e.g. CHANNEL_COLOR.
[in]enablePass true to enable the channel or false to disable it.

◆ GetMultiMode()

static Bool GetMultiMode ( )
static

If GetMultiMode() is enabled then multiple channels can be selected/enabled in BodyPaint 3D.

Returns
The state of the MultiMode switch.

◆ SetMultiMode()

static void SetMultiMode ( Bool  multi)
static

Sets the state of the MultiMode switch in BodyPaint 3D. If GetMultiMode() is enabled then multiple channels can be selected/enabled in BodyPaint 3D.

Parameters
[in]multiPass true to enable or false to disable the MultiMode switch.

◆ ToggleFgBg()

static Bool ToggleFgBg ( )
static

Toggles the Foreground and Background colors.

Returns
true if successful, otherwise false.

◆ GetActiveColorPreset()

static BPPaintSettings* GetActiveColorPreset ( )
static

Gets the active color preset.

Returns
The paint settings for the color preset.

◆ SetActiveColorPreset()

static void SetActiveColorPreset ( BPPaintSettings set)
static

Private.

◆ SaveColorSettings()

static Bool SaveColorSettings ( BPPaintSettings set)
static

Private.

◆ DefineColorPreset()

static Bool DefineColorPreset ( PaintTexture tex,
PaintLayerBmp layer,
PaintLayerBmp mask,
BPSingleColorSettings color,
Bool  wallpaper 
)
static

Private.