This object is a context manager. You can create one using
hou.LopNetwork.viewportOverrides. At the end of the with
block, the
notification of the session edits is propagated to viewer panes.
Methods ¶
layer()
→ pxr.Sdf.Layer
Return the pxr.Sdf.Layer
object that contains current custom session
edits to the scene graph. These edits are accessible using the
hou.lopViewportOverridesLayer.Custom layer id. This layer does
not include opinions set using built in Houdini panels. This layer only
hold opinions authored through the layer returned by this method. This
object can be modified using the pxr.Sdf.Layer
API to make further
session modifications to the scene graph.
stage()
→ pxr.Sdf.Stage
Return the pxr.Usd.Stage
object that contains all the current session
edits to the scene graph. This object can be modified using the
pxr.Usd.Stage
API to make further session modifications to the scene
graph.
clear(layer_id = None, from_prim = None)
Clears one or all viewport overrides layers.
layer_id
A hou.lopViewportOverridesLayer value to clear a specific
overrides layer, or None
to clear all layers.
from_prim
A path to the primitive that is the root of the portion of the scene
graph tree from which the overrides should be cleared. Set to None
to clear overrides for the whole scene graph.
setActive(prims, active)
Change the active state of USD primitives by editing the session layer of a LOP Network. Deactivated primitives do not appear in the viewport, and cannot be expanded in the scene graph tree. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object.
prims
A hou.LopSelectionRule object that specifies which USD primitives should be affected.
active
A boolean value indicating the new activation state of the USD primitives.
setDrawMode(prims, drawmode)
Change the draw mode of USD primitives by editing the session layer of a LOP Network. The draw mode of a primitive is only respected if the primitive is part of a valid, contiguous USD model hierarchy. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object.
prims
A hou.LopSelectionRule object that specifies which USD primitives should be affected.
drawmode
A string value indicating the new draw mode for the USD primitives.
Only primitives that are part of a valid USD model hierarchy can have
their draw mode changed. The allowed values for this string are
default
(draw the full geometry), origin
(draw a set of axes at
the origin of the primitive), bounds
(draw a bounding box around the
primitive), and cards
(draw three axis-aligned cards that fill the
primitive’s bounding box).
setVisible(prims, visible)
Change the visibility of USD primitives by editing the session layer of a LOP Network. Invisible primitives are not drawn in the viewport, but still appear in the scene graph tree. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object.
prims
A hou.LopSelectionRule object that specifies which USD primitives should be affected.
visible
A boolean value indicating whether the USD primitives should be visible.
setSelectable(prims, selectable, solo = False)
Change the selectability of USD primitives by editing the session layer of a LOP Network. Unselectable primitives are ignored when performing a selection operation in the viewport. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object. All descendants of an unselectable primitive are also unselectable, even if they are explicitly set as selectable. An unselectable setting on and ancestor primitive takes precedence.
prims
A hou.LopSelectionRule object that specifies which USD primitives should be affected.
selectable
A boolean value indicating the new selectable value of the USD primitives.
solo
A boolean value indicating that the supplied set of primitives should be the only primitives in the scene that are selectable (or not selectable). This may involve modifying the selectable attribute on many primitives across the scene, not just the specified primitives.
setDisplayOpacity(prims, opacity)
Change the display opacity of USD primitives by editing the session layer of a LOP Network. The LOP Network to edit is determined by looking at the LOP node used to create this session editor object.
prims
A hou.LopSelectionRule object that specifies which USD primitives should be affected.
opacity
A float value between 0 (fully transparent) and 1 (fully opaque).
setSoloLights(prims)
Deactivates any lights not specified by the prims
parameter.
prims
A hou.LopSelectionRule object that specifies which USD light
primitives should be remain active after running this method. Or can
be None
to disable any existing soloing of lights.
addSoloLights(prims)
Adds lights to the set of activated lights in the scene.
prims
A hou.LopSelectionRule object that specifies which USD light primitives should be added to the set of solo active lights.
removeSoloLights(prims)
Remove lights from the set of activated lights in the scene. If all lights are removed from the solo lights group, all lights in the scene will be activated.
prims
A hou.LopSelectionRule object that specifies which USD light primitives should be removed from the set of solo active lights.
soloLights()
→ tuple
of pxr.Sdf.Path
Return a set containing the paths to all solo active light primitives.
setSoloGeometry(prims)
Turns off the visibility of any geometry not specified by the prims
parameter.
prims
A hou.LopSelectionRule object that specifies which USD geometry
primitives should be remain visible after running this method. Any
descendants of the specified primitives will also be made visible.
This parameter can also be None
to disable any existing soloing of
geometry.
addSoloGeometry(prims)
Adds geometry primitives to the set of activated geometry in the scene.
prims
A hou.LopSelectionRule object that specifies which USD geometry primitives should be added to the set of solo visible geometry.
removeSoloGeometry(prims)
Remove geometry from the set of visible geometry in the scene. If all geometry are removed from the solo geometry group, all geometry in the scene will be made visible.
prims
A hou.LopSelectionRule object that specifies which USD geometry primitives should be removed from the set of solo visible geometry.
soloGeometry()
→ tuple
of pxr.Sdf.Path
Return a set containing the paths to all solo visible geometry primitives.
showPurpose(prims, purpose)
Show the selected purpose for a geometry primitive if it exists. Other purposes for the same geometry are hidden from the viewport.
prims
A hou.LopSelectionRule object that specifies which USD geometry primitives' purpose should be isolated and displayed.
purpose
A string value indicating the purpose(render/proxy/guide) to display.