Loading...
Searching...
No Matches
SBDVisualPreset Class Reference

The SBDVisualPreset class is a base class for visual presets.

Visual preset parameters

SBDVisualPresetData * dataPointer
 
void clearSelectionFilter ()
 Clears the selection filter.
 
void setSelectionFilter (const std::string &selectionFilterString, const std::string &selectionFilterName)
 Sets the selection filter to selectionFilterString and its name to selectionFilterName.
 
const std::string & getSelectionFilterString () const
 Returns the selection filter string.
 
const std::string & getSelectionFilterName () const
 Returns the selection filter name.
 
bool hasSelector () const
 Returns true if the visual preset has a selector.
 
void clearSelector ()
 Clears the selector.
 
SBProxygetSelectorProxy () const
 Returns a proxy to the selector.
 
void setSelectorProxy (const SBProxy *proxy)
 Sets the selector by proxy.
 
const std::string & getSelectorClassName () const
 Returns the selector's class name.
 
const SBUUIDgetSelectorExtensionUUID () const
 Returns the selector's extension UUID.
 
bool hasVisualModel () const
 Returns true if the visual preset has a visual model.
 
void clearVisualModel ()
 Clears the visual model.
 
SBProxygetVisualModelProxy () const
 Returns a proxy to the visual model.
 
void setVisualModelProxy (const SBProxy *proxy)
 Sets the visual model by proxy.
 
const std::string & getVisualModelClassName () const
 Returns the visual model's class name.
 
const SBUUIDgetVisualModelExtensionUUID () const
 Returns the visual model's extension UUID.
 
bool hasColorScheme () const
 Returns true if the visual preset has a color scheme.
 
void clearColorScheme ()
 Clears the color scheme.
 
SBProxygetColorSchemeProxy () const
 Returns a proxy to the color scheme.
 
void setColorSchemeProxy (const SBProxy *proxy)
 Sets the color scheme by proxy.
 
const std::string & getColorSchemeClassName () const
 Returns the color scheme's class name.
 
void setColorSchemeClassName (const std::string &className)
 Sets the color scheme's class name.
 
const SBUUIDgetColorSchemeExtensionUUID () const
 Returns the color scheme's extension UUID.
 
void setColorSchemeExtensionUUID (const SBUUID &elementUUID)
 Sets color scheme's extension UUID.
 
bool hasDefaultPalette () const
 Returns true if the color scheme has a default color palette.
 
SBPalettegetDefaultPaletteForCurrentColorScheme () const
 Returns the default color palette of the color scheme.
 
SBPalettegetPalette () const
 Returns the color palette.
 
void setPalette (SBPalette *palette)
 Sets the color palette to palette.
 
void resetPalette ()
 Sets the color palette to the default color palette for this color scheme.
 
bool hasColor () const
 Returns true if the visual preset has a color.
 
void clearColor ()
 Clears the color.
 
const SBColorgetColor () const
 Returns the color.
 
void setColor (const SBColor &color)
 Sets the color.
 
bool getHideStructureFlag () const
 Returns the hide structure flag.
 
void setHideStructureFlag (bool flag)
 Sets the hide structure flag. If set to true then the structural nodes will be hidden, else they will be made visible.
 
 SB_DECLARE_DATA (SBDVisualPreset)
 

Constructors and destructors

 SBDVisualPreset ()
 
 SBDVisualPreset (const std::string &selectionFilterString, const std::string &selectionFilterName, const std::string &visualModelClassName=std::string(), const SBUUID &visualModelElementUUID=SBUUID(), bool hideStructureFlag=true)
 
 SBDVisualPreset (const std::string &selectionFilterString, const std::string &selectionFilterName, const std::string &visualModelClassName, const SBUUID &visualModelElementUUID, const std::string &colorSchemeClassName, const SBUUID &colorSchemeElementUUID, const SBColor &color, bool hideStructureFlag=true)
 
 SBDVisualPreset (const std::string &selectionFilterString, const std::string &selectionFilterName, const std::string &visualModelClassName, const SBUUID &visualModelElementUUID, const std::string &colorSchemeClassName, const SBUUID &colorSchemeElementUUID, const SBPalette *colorPalette=nullptr, bool hideStructureFlag=true)
 
 SBDVisualPreset (const std::string &selectorClassName, const SBUUID &selectorElementUUID, const std::string &visualModelClassName=std::string(), const SBUUID &visualModelElementUUID=SBUUID(), bool hideStructureFlag=true)
 
 SBDVisualPreset (const std::string &selectorClassName, const SBUUID &selectorElementUUID, const std::string &visualModelClassName, const SBUUID &visualModelElementUUID, const std::string &colorSchemeClassName, const SBUUID &colorSchemeElementUUID, const SBColor &color, bool hideStructureFlag=true)
 
 SBDVisualPreset (const std::string &selectorClassName, const SBUUID &selectorElementUUID, const std::string &visualModelClassName, const SBUUID &visualModelElementUUID, const std::string &colorSchemeClassName, const SBUUID &colorSchemeElementUUID, const SBPalette *colorPalette=nullptr, bool hideStructureFlag=true)
 
virtual ~SBDVisualPreset ()
 

Clone function

virtual SBDVisualPresetclone () const
 Clones the preset.
 

Apply function

void apply (SBNodeIndexer &nodeIndexer, SBFolder *preferredFolder=nullptr)
 Applies the visual preset to nodes in nodeIndexer and adds the visual models (if any) to preferredFolder.
 

Functionality for the default per attribute color schemes

static bool isPerAttributeColorScheme (const std::string &colorSchemeClassName)
 Returns true if the color scheme colorSchemeClassName is a per-attribute color scheme.
 
static SBDPalettegetDefaultPalette (const std::string &colorSchemeClassName)
 Returns a clone of the default color palette for color scheme colorSchemeClassName.
 
static SBNodeColorSchemecreateColorScheme (const std::string &colorSchemeClassName, const SBNodeIndexer &nodeIndexer, const SBPalette *palette)
 Creates a color scheme colorSchemeClassName for nodes in nodeIndexer colorized with color palette palette.