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_objectThis 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(*args, **kwargs)#
Overloaded function.
getColor(self: samson.SBNodeColorScheme, node: samson.SBNode = None) -> samson.SBColor
Returns a color given a node.
- Parameters:
node (samson.SBNode, default=None) – Node used to evaluate the color scheme. Pass
Noneonly for color schemes that do not need node-specific data, such as constant color schemes.- Returns:
The RGBA color produced by the color scheme.
- Return type:
getColor(self: samson.SBNodeColorScheme, node: samson.SBNode, position: samson.SBPhysicalVector3) -> samson.SBColor
Returns a color given a node and a position.
- Parameters:
node (samson.SBNode) – A node.
position (samson.SBPosition3) – A position.
- Returns:
A color.
- Return type:
- 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#
Set the color palette for color schemes that support palettes.
The color scheme takes ownership of
palette. PassingNoneresets the scheme to its default palette.- Parameters:
palette (samson.SBPalette or None) – Palette to install, or
Noneto restore the default palette.
- property hasPalette#
Returns whether the color scheme has a color palette defined
- property isSerializable#
Returns True when the class is serializable