Methods ¶
__init__()
Create an empty expansion state object, with no expanded primitives.
dumps()
→ hou.BinaryString
Serialize the contexts of this expansion state object into a binary string.
loads(overrides_str)
Load the contents of a binary string into this expansion state object.
expandedPaths()
→ tuple
of pxr.Sdf.Path
Return a tuple of paths that are expanded in the scene graph tree.
setExpandedPaths(expanded_paths)
The expanded_paths parameter is an iterable collection of strings or
pxr.Sdf.Path objects indicating which primitives in the scene graph tree
should be expanded.
setPathExpanded(path, expanded)
→ bool
Change the expanded state of a single path in the scene graph tree to be
either expanded or collapsed. Returns True if this changes the
expansion state, False otherwise.
expandedPinnedPaths()
→ tuple
of pxr.Sdf.Path
Return a tuple of paths that are expanded in the “pinned primitives” branch of the scene graph tree.
setExpandedPinnedPaths(expanded_paths)
The expanded_paths parameter is an iterable collection of strings or
pxr.Sdf.Path objects indicating which primitives in the “pinned
primitives” branch of the scene graph tree should be expanded.
setPinnedPathExpanded(path, expanded)
→ bool
Change the expanded state of a single path in the “pinned primitives”
section of the scene graph tree to be either expanded or collapsed.
Returns True if this changes the expansion state, False otherwise.
expansionLockedPrimitives()
→ tuple
of pxr.Sdf.Path
Returns the paths of all prims which have had their expansion effect in the scene graph tree locked, so this prim and its descendants are no longer affected by the scene graph tree expansion state. A prim in this set may be either locked in the “expanded” or “collapsed” state.
expansionLockedExpandedPrimitives()
→ tuple
of pxr.Sdf.Path
Returns the paths of all prims which have had their expansion effect in
the scene graph tree locked in the “expanded” state. These prims will all
be in or descndants of prims in the expansionLockedPrimitives set. Note
that a prim in the expansionLockedPrimitives set may not appear in this
set if the prim has been locked in a “collapsed” state.
setPrimitiveExpansionLocked(path, expanded_subpaths=None, preserve_descendant_expansion=True)
→ bool
Locks the expansion state effect of a branch of the scene graph tree. The
path parameter specifies the root prim which is locked, and will appear
in the expansionLockedPrimitives set. The expanded_subpaths iterable
of str or pxr.Sdf.Path objects is the set of all prims at or descended
from path which should be treated as being “expanded”. For a prim to be
treated as “expanded” by the expansion effect, every prim between the root
path and the final prim must appear in this set.
Prims in the expanded_subpaths which are not descendants of path are
ignored.
Setting preserve_descendant_expansion to False causes this method to
remove all descendants of the path from the list of expansion locked
and expansion locked expanded prims before setting the newly requested
expansion locking and expanded states.
setPrimitiveExpansionUnlocked(path, preserve_descendant_expansion=True)
→ bool
Removes the path from the expansionLockedPrimitives set. This also
removes this prim and all its descendants from the
expansionLockedExpandedPrimitives set.
Setting preserve_descendant_expansion to False causes this method to
remove all descendants of the path from the list of expansion locked
and expansion locked expanded prims before setting the newly requested
expansion locking and expanded states.