This module provides functions for accessing and managing style sheets that are stored in the hip file as text strings in JSON format. These style sheets can be saved into IFD files generated by the /hom/hou/mantra.html ROP.
Returns true if there is a style with the specified name.
→ tuple of
Return a tuple containing the names of all styles in the style manager.
Returns the description associated with the named style. If there is no style with the provided name, an empty string is returned.
Returns the style sheet text associated with the named style. If there is no style with the provided name, an empty string is returned.
Returns any error messages generated while parsing the named style. If there is no style with the provided name, an empty string is returned.
addStyle(name, description, stylesheet)
Create a new named style. If a style sheet with the supplied name already exists, it will be overwritten with the new values.
A unique name that will be used to identify the style sheet. Follows the same naming limitations as node names (no spaces, no slashes, etc).
An arbitrary string that can optionally be used to identify the purpose of this style sheet.
The style sheet definition expressed as a string in JSON format.
Changes the name of an existing style sheet. If there is no style with the provided old_name, or there is already a style with the provided new_name, an exception will be generated. References to this style sheet in the hip file will be automatically updated to refer to the new name.
Changes the order of the style sheets defined in the hip file. This order
determines the order of the style names returned by the
This in turn may affect the final material assignments in a mantra render,
since priority is given to style sheets listed last in the Apply Style
Sheets parameter of the /hom/hou/mantra.html ROP.
A tuple of strings which must contain exactly the same set of strings
returned by the
styles function, but in a different order. If the
set of strings do not match, this function raises a ValueError.
Deletes an existing style sheet.
Deletes all existing style sheets.