SBNodeColorScheme#

This is a base class that describes a color scheme in SAMSON.

Please refer to the Colorizing nodes page for information on how to create, apply, and use modify color schemes.

class samson.SBNodeColorScheme(self: samson.SBNodeColorScheme)#

Bases: pybind11_object

This class describes a color scheme.

Constructs a color scheme

canHavePalette(self: samson.SBNodeColorScheme) bool#

Returns whether the color scheme requires and therefore can have a color palette

clone(self: samson.SBNodeColorScheme) samson.SBNodeColorScheme#

Returns a copy of the color scheme

getColor(self: samson.SBNodeColorScheme, node: samson.SBNode = None) samson.SBColor#

Returns a color given a node.

Parameters:

node (samson.SBNode, default=None) – A node. For constant color schemes can be None.

Returns:

A color

Return type:

samson.SBColor

getDefaultPalette(self: samson.SBNodeColorScheme) samson.SBPalette#

Returns a pointer to the default color palette for this color scheme

getPalette(self: samson.SBNodeColorScheme) samson.SBPalette#

Returns a pointer to a color palette owned by the color scheme

requestUpdate(self: samson.SBNodeColorScheme) None#

Requests a material update for a node to which the material that owns this color scheme is applied

resetPalette(self: samson.SBNodeColorScheme) None#

Resets the color palette to the default one for color schemes that can have it.

setPalette(self: samson.SBNodeColorScheme, palette: samson.SBPalette) None#

Sets the color palette for color schemes that can have it.

The color scheme takes ownership of the color palette. If None is supplied then it will reset to the default color palette.

Parameters:

palette (samson.SBPalette) – A color palette

property hasPalette#

Returns whether the color scheme has a color palette defined

property isSerializable#

Returns True when the class is serializable