VisualPreset

This class is a base class for visual presets.

See also

SAMSON API: SBDVisualPreset

class samson.DataModel.Visualization.VisualPreset(*args, **kwargs)

Bases: pybind11_builtins.pybind11_object

This class is a base class for visual presets.

Overloaded function.

  1. __init__(self: samson.DataModel.Visualization.VisualPreset) -> None

Default constructor

  1. __init__(self: samson.DataModel.Visualization.VisualPreset, selectorClassName: str, selectorElementUUIDString: str, visualModelClassName: str = ‘’, visualModelElementUUIDString: str = ‘’, hideStructureFlag: bool = True) -> None

Constructs a visual preset based on the given parameters

  1. __init__(self: samson.DataModel.Visualization.VisualPreset, selectorClassName: str, selectorElementUUIDString: str, visualModelClassName: str, visualModelElementUUIDString: str, colorSchemeClassName: str, colorSchemeElementUUIDString: str, color: samson.DataModel.Type.Color, hideStructureFlag: bool = True) -> None

Constructs a visual preset based on the given parameters

  1. __init__(self: samson.DataModel.Visualization.VisualPreset, selectorClassName: str, selectorElementUUIDString: str, visualModelClassName: str, visualModelElementUUIDString: str, colorSchemeClassName: str, colorSchemeElementUUIDString: str, colorPalette: samson.DataModel.Color.ColorPalette = None, hideStructureFlag: bool = True) -> None

Constructs a visual preset based on the given parameters

apply(self: samson.DataModel.Visualization.VisualPreset, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer, preferredFolder: samson.DataModel.Document.Folder) None

Applies the visual preset to nodes in nodeIndexer and adds the visual models (if any) to preferredFolder

clearColor(self: samson.DataModel.Visualization.VisualPreset) None

Clears the color

clearColorScheme(self: samson.DataModel.Visualization.VisualPreset) None

Clears the color scheme

clearSelector(self: samson.DataModel.Visualization.VisualPreset) None

Clears the selector

clearVisualModel(self: samson.DataModel.Visualization.VisualPreset) None

Clears the visual model

clone(self: samson.DataModel.Visualization.VisualPreset) samson.DataModel.Visualization.VisualPreset

Returns a copy of the visual preset

static createColorScheme(colorSchemeClassName: str, nodeIndexer: samson.DataModel.DataGraph.NodeIndexer, colorPalette: samson.DataModel.Color.ColorPalette) samson.DataModel.DataGraph.ColorScheme

Creates a color scheme colorSchemeClassName

getColor(self: samson.DataModel.Visualization.VisualPreset) samson.DataModel.Type.Color

Returns the color

getColorPalette(self: samson.DataModel.Visualization.VisualPreset) samson.DataModel.Color.ColorPalette

Returns the color palette

getColorSchemeProxy(self: samson.DataModel.Visualization.VisualPreset) samson.Core.Class.ClassProxy

Returns a proxy to the color scheme

static getDefaultColorPalette(colorSchemeClassName: str) samson.DataModel.Color.ColorPalette

Returns the default color palette for color scheme colorSchemeClassName

getDefaultColorPaletteForCurrentColorScheme(self: samson.DataModel.Visualization.VisualPreset) samson.DataModel.Color.ColorPalette

Returns the default color palette of the color scheme

getSelectorProxy(self: samson.DataModel.Visualization.VisualPreset) samson.Core.Class.ClassProxy

Returns a proxy to the selector

getVisualModelProxy(self: samson.DataModel.Visualization.VisualPreset) samson.Core.Class.ClassProxy

Returns a proxy to the visual model

static isPerAttributeColorScheme(colorSchemeClassName: str) bool

Returns true if the color scheme colorSchemeClassName is a per - attribute color scheme

setColor(self: samson.DataModel.Visualization.VisualPreset, сolor: samson.DataModel.Type.Color) None

Sets the color

setColorPalette(self: samson.DataModel.Visualization.VisualPreset, colorPalette: samson.DataModel.Color.ColorPalette) None

Sets the color palette

setColorPaletteToDefaultColorPaletteForCurrentColorScheme(self: samson.DataModel.Visualization.VisualPreset) None

Sets the color palette to the default color palette of the color scheme

setColorSchemeProxy(self: samson.DataModel.Visualization.VisualPreset, сolorSchemeProxy: samson.Core.Class.ClassProxy) None

Sets the color scheme by proxy

setSelectorProxy(self: samson.DataModel.Visualization.VisualPreset, selectorProxy: samson.Core.Class.ClassProxy) None

Sets the selector by proxy

setVisualModelProxy(self: samson.DataModel.Visualization.VisualPreset, visualModelProxy: samson.Core.Class.ClassProxy) None

Sets the visual model by proxy

property hasColor

Returns true if the visual preset has a color

property hasColorScheme

Returns true if the visual preset has a color scheme

property hasDefaultColorPalette

Returns true if the color scheme has a default color palette

property hasSelector

Returns true if the visual preset has a selector

property hasVisualModel

Returns true if the visual preset has a visual model

property hideStructureFlag

The hide structure flag

property selectorClassName

Returns the selector’s class name

property selectorElementUUID

Returns the selector’s extension UUID

property visualModelClassName

Returns the visual model’s class name

property visualModelElementUUID

Returns the visual model’s extension UUID

property сolorSchemeClassName

Returns the color scheme’s class name

property сolorSchemeElementUUID

Returns the color scheme’s extension UUID