c4d.CustomIconSettings

class c4d.CustomIconSettings

Represents the data passed in the MSG_GETCUSTOMICON_SETTINGS.

New in version R21.

Attributes

CustomIconSettings._iconFileId

Custom bitmap file path or icon ID.

Type: str

CustomIconSettings._colorMode

Color mode: 0: None, 1: custom, 2: special cases.

Type: int

CustomIconSettings._customColor

Custom color used if _colorMode == 1.

Type: maxon.Color

CustomIconSettings._specialColors

Special colors (e.g. Light Color for light object).

Type: maxon.BaseArray (maxon.Color)

CustomIconSettings._defaultIconId

Icon ID used if no custom bitmap path / icon ID.

Type: int

CustomIconSettings._customIcon

Custom icon used as default (more priority than _defaultIconId).

Type: c4d.IconData

CustomIconSettings._fillDefault

If True, CustomIconData will be filled always. Set to True only if you provide a _customIcon c4d.IconData or and icon ID different than default, otherwise just leave it False.

Type: bool

CustomIconSettings._colorizeContrastMode

If True, icon bitmap will be inverted with dark colors for better readability.

Type: bool

CustomIconSettings._colorizeContrastModeMaxBrightnessThreshold

Brightness values greater than this value will be considered as full brightness (1.0)

Type: float

Methods Signatures

CustomIconSettings.GetCustomIcon(self, cid, settings, ...) Fill the dictionary cid with the passed CustomIconSettings

Static Methods Signatures

c4d.CustomIconSettings.FillCustomIconSettingsFromBaseList2D(settings, data, ...) Fills the passed c4d.CustomIconSettings settings with the data from a BaseList2D BaseContainer.

Methods Documentation

CustomIconSettings.GetCustomIcon(self, cid, settings, drawBeforeColoring)

Fill the dictionary cid with the passed CustomIconSettings

Note

This is mostly used in plugin development. See py-custom-icon example in github.

Parameters:
  • cid (dict) – A dictionary with the structure of MSG_GETCUSTOMICON.
  • settings (c4d.CustomIconSettings) – The Custom Icon Settings to fill cid with.
  • drawBeforeColoring (bool) – True if the icon should be drawn before color change.

Static Methods Documentation

static c4d.CustomIconSettings.FillCustomIconSettingsFromBaseList2D(settings, data, defaultIconId, bcFillDefault)

Fills the passed c4d.CustomIconSettings settings with the data from a BaseList2D BaseContainer.

Note

This is mostly used in plugin development. See py-custom-icon example in github.

Parameters:
  • settings (c4d.CustomIconSettings) – The Custom Icon Settings to fill.
  • data (c4d.BaseContainer) – The BaseContainer of a BaseList2D (retrieved with BaseList2D.GetData()).
  • defaultIconId (int) – The default IconId the CustomIconSettings should use (usually node.GetType()).
  • bcFillDefault (bool) – True if default should be filled