On this page |
Overview
In Houdini’s 3D viewer display options window, you can apply different display options to certain subsets of objects/geometry, for example selected objects, or the displayed SOP. This object represents a set of options that apply to one of these subsets. For example, you can set templated SOPs to display as wireframe:
# Get a reference to the geometry viewer pane = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.SceneViewer) # Get the display settings settings = pane.curViewport().settings() # Get the GeometryViewportDisplaySet for objects tmplset = settings.displaySet(hou.displaySetType.TemplateModel) # Tell Houdini to show set the shading mode for this subset to wireframe tmplset.setShadedMode(hou.glShadingType.Wire)
There are several subsets available:
Objects |
Object nodes which are not selected or ghosted.
Object nodes which are selected.
Object nodes which ghosted, which occurs when they are visible when at the SOP level and "Ghost Other Objects" is the current object mode, but are not the current object. |
---|---|
Geometry |
SOP with the display flag. This takes precendence over TemplateModel and CurrentModel, if the SOP has either the template flag set or is selected.
SOP that is currently selected. This takes precendence over TemplateModel, if that SOP also has the template flag set.
SOP that has a template flag set. |
You can set the options in each display set independently of the other sets. You can also link a subset to another, so this subset uses the linked set’s options.
Methods
displaySetType()
→ hou.displaySetType
Returns the geometry context this display set represents:
-
hou.displaySetType.SceneObject
- object nodes which are not selected or ghosted. -
hou.displaySetType.SelectedObject
- object nodes which are selected. -
hou.displaySetType.GhostObject
- object nodes which ghosted, which occurs when they are visible when at the SOP level and "Ghost Other Objects" is the current object mode, but are not the current object. -
hou.displaySetType.DisplayModel
- SOP with the display flag. This takes precendence over TemplateModel and CurrentModel, if the SOP has either the template flag set or is selected. -
hou.displaySetType.CurrentModel
- SOP that is currently selected. This takes precendence over TemplateModel, if that SOP also has the template flag set. -
hou.displaySetType.TemplateModel
- SOP that has a template flag set.
isShowingPointMarkers()
→ bool
Query if point markers are shown (blue dots at points).
isShowingPointNumbers()
→ bool
Query if point numbers are shown as text (blue point numbers, one per point).
isShowingPointNormals()
→ bool
Query if point normals are shown.
If the point normals are blue, the geometry has point normals. If they are dimmed, the model does not have normals and the normals shown have been automatically generated for display. If no normals are shown, the geometry has vertex normals. This query does not check for those conditions, but just the current setting of the display option.
isShowingPointUVs()
→ bool
Query if point texture coordinates are being shown, as text: "(u,v)".
isShowingPointPositions()
→ bool
Query if 3D point positions are being shown, as text: "(x,y,z)".
isShowingPointTrails()
→ bool
Query if point trails are shown (based on the velocity v
attribute).
isShowingCoincidentPoints()
→ bool
Query if coincident point detection is enabled (yellow points and a duplicate count where coincident points are detected).
isShowingPrimHulls()
→ bool
Query if primitive hulls are shown. Only some primitives have hulls, such as volumes, NURBS, crowd agents, and bezier curves.
isShowingPrimNormals()
→ bool
Query if the primitive face normals are shown. Only polygon-based primitives have face normals.
isShowingPrimNumbers()
→ bool
Query if primitive numbers are shown. The primitive numbers can be used to specify primitives in primitive groups. The number is shown at the center of the primitive.
isShowingPrimBreakpoints()
→ bool
Query if breakpoints are displayed. Breakpoints are only available on NURBS and bezier surfaces and curves.
isShowingPrimProfiles()
→ bool
Query if profile curves are shown, on NURBS surfaces only.
isShowingPrimProfileNumbers()
→ bool
Query if profile curve numbers are shown, on NURBS surfaces only. Each profile curve has an index from 0 to #profiles-1.
isShowingVertexMarkers()
→ bool
Query if vertex markers are shown. Vertex markers are inset into their polygon slightly, for ease of selection and selection display. The markers are small hollow squares. Not all primitive types have vertex markers.
isShowingVertexNumbers()
→ bool
Query if vertex numbers are shown. Each vertex on a polygon or mesh is numbered 0 to #edges-1.
isShowingVertexNormals()
→ bool
Query if vertex normals are shown. If the geometry does not have vertex normals, they will not be shown. The base of the vertex normal is inset slightly into its polygon to make it easier to see which polygon the normal is influencing.
isShowingVertexUVs()
→ bool
Query if vertex UV texture coordinates are shown. If the geometry does not have vertex texture coordinates, no numbers will appear. The "(u,v)" display is offset into the polygon to avoid overlapping with other vertex UV coordinates at the same point.
isShowingUVBackfaces()
→ bool
Query if UV Backface highlighting is enabled in the UV view. Highlight polygons that are facing away, as the texture will appear backwards on these polygons.
isShowingUVOverlap()
→ bool
Query if the UV overlap is shown in the UV texture viewport. UV areas that reuse the same UV coordinates will be highlighted.
showPointMarkers(on)
Show or hide point markers.
showPointNumbers(on)
Show or hide point numbers.
showPointNormals(on)
Show or hide point normals.
showPointTextureCoordinates(on)
Show or hide point UVs. If the geometry does not have point UVs, nothing will be displayed (ie. no UVs or vertex UVs).
showPointPositions(on)
Show or hide point position text display, drawn by each point.
showPointTrails(on)
Show or hide point trails on all points. Geometry must have a velocity
attribute v
.
showCoincidentPoints(on)
Enable or disable coincident point detection. Orange points markers and a duplicate count are placed where coincident points are detected.
Coindicent point detection has affects viewport performance more significantly than other markers. It is best used when zoomed in on an area of the geometry for dense meshes, to avoid false positives.
Note
Coindicent point detection has affects viewport performance more significantly than other markers. It is best used when zoomed in on an area of the geometry for dense meshes, to avoid false positives.
showPrimHulls(on)
Enable or disable primitive hulls. Only certain primitive types have hulls, such as NURBS, volumes, agents, and bezier curves.
showPrimNumbers(on)
Enable or disable the display of primitive numbers, which are shown in the middle of the primitive.
showPrimNormals(on)
Enable or disable primitive face normals. This shows the face normals of
polygons, not the value of a primitive N
attribute.
showPrimBreakpoints(on)
Enable or disable breakpoints display. Breakpoints are only available on NURBS and bezier surfaces and curves, and appear as hollow circles along the isoparms.
showPrimProfiles(on)
Enable or disable profile curve display on NURBS surfaces.
showPrimProfileNumbers(on)
Enable or disable profile curve number display on NURBS surfaces. Each profile on a NURBS surface has an index from 0 to #profiles-1.
showVertexMarkers(on)
Enable or disable vertex markers. Vertex markers are drawn as small squares inset into its parent polygon slightly.
showVertexNumbers(on)
Enable or disable vertex numbers. Vertex numbers are drawn as numbers inset into its parent polygon slightly, ranging 0 to #edges-1.
showVertexNormals(on)
Enable or disable vertex normal display. Vertex normals are drawn inset
into its parent polygon slightly. The geometry must have vertex normals
to be shown (vertex N
).
showVertexTextureCoordinates(on)
Enable or disable vertex UV texture display. Vertex UVs are drawn inset
into its parent polygon. The geometry must have vertex texture coordinates
to be shown (vertex uv
).
showUVBackfaces(on)
Enable or disable UV backface highlighting in the UV viewport. Backfacing polygons would have the texture displayed on them backwards, from the point of view of the background image in the UV viewport.
showUVOverlap(on)
Enable or disable highlighting of UV overlap. Areas of the texture that would be share the same UVs are highlighted.
setPointMarkerVisibility(visibility)
Controls how point markers are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only markers for selected points are shown. -
hou.markerVisibility.AroundPointer
: Markers close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: Markers under the mouse cursor are shown.
setPointNumberVisibility(visibility)
Controls how point numbers are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only numbers for selected points are shown. -
hou.markerVisibility.AroundPointer
: Numbers close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: Numbers under the mouse cursor are shown.
setPointNormalVisibility(visibility)
Controls how point normals are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only normals for selected points are shown. -
hou.markerVisibility.AroundPointer
: Normals close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: Normals under the mouse cursor are shown.
setPointUVVisibility(visibility)
Controls how point UVs are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only UVs for selected points are shown. -
hou.markerVisibility.AroundPointer
: UVs close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: UVs under the mouse cursor are shown.
setPointPositionVisibility(visibility)
Controls how point positions are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only positions for selected points are shown. -
hou.markerVisibility.AroundPointer
: Positions close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: Positions under the mouse cursor are shown.
setPointTrailVisibility(visibility)
Controls how point trails are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only trails for selected points are shown. -
hou.markerVisibility.AroundPointer
: Trails close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: Trails under the mouse cursor are shown.
setPrimNumberVisibility(visibility)
Controls how primitive numbers are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only numbers for selected primitives are shown. -
hou.markerVisibility.AroundPointer
: Numbers close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: Numbers under the mouse cursor are shown.
setPrimNormalVisibility(visibility)
Controls how primitive face normals are shown when displayed.
-
hou.markerVisibility.Always
: All are shown. -
hou.markerVisibility.Selected
: Only normals for selected primitives are shown. -
hou.markerVisibility.AroundPointer
: Normals close to the 3D point the mouse cursor is currently over are shown. -
hou.markerVisibility.UnderPointer
: Normals under the mouse cursor are shown.
setPrimBreakpointVisibility(visibility)
Controls how primitive breakpoints are shown when displayed.
setVertexMarkerVisibility(visibility)
Controls how vertex markers are shown when displayed.
setVertexNumberVisibility(visibility)
Controls how vertex numbers are shown when displayed.
setVertexNormalVisibility(visibility)
Controls how vertex normals are shown when displayed.
setVertexUVVisibility(visibility)
Controls how vertex normals are shown when displayed.
pointMarkerVisibility()
→ hou.markerVisibility
Query the visibility setting of point markers.
pointNumberVisibility()
→ hou.markerVisibility
Query the visibility setting of point numbers.
pointNormalVisibility()
→ hou.markerVisibility
Query the visibility setting of point normals.
pointUVVisibility()
→ hou.markerVisibility
Query the visibility setting of point UVs.
pointPositionVisibility()
→ hou.markerVisibility
Query the visibility setting of point UVs.
pointTrailVisibility()
→ hou.markerVisibility
Query the visibility setting of point trails.
primNumberVisibility()
→ hou.markerVisibility
Query the visibility setting of primitive numbers.
primNormalVisibility()
→ hou.markerVisibility
Query the visibility setting of primitive normals.
primBreakpointVisibility()
→ hou.markerVisibility
Query the visibility setting of primitive breakpoints.
vertexMarkerVisibility()
→ hou.markerVisibility
Query the visibility setting of vertex markers.
vertexNumberVisibility()
→ hou.markerVisibility
Query the visibility setting of vertex numbers.
vertexNormalVisibility()
→ hou.markerVisibility
Query the visibility setting of vertex normals.
vertexUVVisibility()
→ hou.markerVisibility
Query the visibility setting of vertex UVs.
shadedMode()
→ hou.glShadingType
Query the shading mode of the display set (hou.glShadingType
):
-
hou.glShadingType.WireBoundingBox
: no geometry, only bounding box outline -
hou.glShadingType.ShadedBoundingBox
: no geometry, solid bounding box -
hou.glShadingType.Wire
: wireframe -
hou.glShadingType.WireGhost
: wireframe with muted hidden lines -
hou.glShadingType.HiddenLineInvisible
: wireframe with hidden lines -
hou.glShadingType.HiddenLineGhost
: wireframe with solid constant faces -
hou.glShadingType.Flat
: shaded with primitive face normals -
hou.glShadingType.FlatWire
: shaded with primitive face normals, outlined polygons -
hou.glShadingType.Smooth
: shaded with point or vertex normals -
hou.glShadingType.SmoothWire
: shaded with point or vertex normals, outlined polygons
isShadingModeLocked()
→ bool
Query if the shading mode is locked. When locked, changing the shading mode in the viewport will not affect the look of geometry in this display set.
isUsingGhostedLook()
→ bool
Query if the display set is ghosted. Ghosted geometry appears transluscent so that geometry behind it can be easily seen.
isUsingFadedLook()
→ bool
Query if the display set is faded. Faded geometry suppresses the display of geometry color.
isUsingXRay()
→ bool
Query if the display set is drawn with XRay. XRay geometry will appear as a faded wireframe behind other geometry that occludes it.
isUsingLighting()
→ bool
Query if lighting is used for this display set. When off, the geometry is displayed without any lighting (often much brighter).
isShowingBoundaries()
→ hou.boundaryDisplay
Query the boundary mode displayed for the display set (hou.boundaryDisplay
):
-
hou.boundaryDisplay.Off
: No boundaries are displayed. -
hou.boundaryDisplay.Connect3D
: Boundaries for 3D connectivity are displayed. Hard edges will be highlighted. -
hou.boundaryDisplay.ConnectUV
: Boundaries for UV connectivity are displayed. Hard UV edges will be highlighted. -
hou.boundaryDisplay.
: Either 3D or UV connectivity is displayed, depending on the context of the viewport (a 3D view or a UV view).
isToolbarLinked()
→ bool
Query if the display set is linked to the right viewport toolbar. When linked, clicking a display option button on this toolbar will affect the corresponding option in this display set.
linkedToDisplaySet()
→ hou.displaySetType
A display set can be linked to another display set, so that all of its options are taken from that linked set rather than its own. This method returns the display set this set is linked to. If it is not linked to another set, it will return the its own set.
isUniqueDisplaySet()
→ bool
A display set can be linked to another display set, so that all of its options are taken from that linked set rather than its own. This method returns True if the display set is unique, in that it is not linked to another display set, and False if the set refers to another display set.
setShadedMode(shaded_mode)
Sets the shading mode for this display set:
-
hou.glShadingType.WireBoundingBox
: no geometry, only bounding box outline -
hou.glShadingType.ShadedBoundingBox
: no geometry, solid bounding box -
hou.glShadingType.Wire
: wireframe -
hou.glShadingType.WireGhost
: wireframe with muted hidden lines -
hou.glShadingType.HiddenLineInvisible
: wireframe with hidden lines -
hou.glShadingType.HiddenLineGhost
: wireframe with solid constant faces -
hou.glShadingType.Flat
: shaded with primitive face normals -
hou.glShadingType.FlatWire
: shaded with primitive face normals, outlined polygons -
hou.glShadingType.Smooth
: shaded with point or vertex normals -
hou.glShadingType.SmoothWire
: shaded with point or vertex normals, outlined polygons
setShadingModeLocked(on)
Locks the shading mode so that it cannot be changed by the user using the
Shading Mode menu in the viewport or the wireframe toggle hotkey. Passing
False
unlocks the display set so that it follows the viewport’s shading
mode.
useGhostedLook(on)
Make all geometry in the display set appear ghosted - slightly translucent. This allows geometry behind the ghosted to seen and de-emphasizes the ghosted geometry in the viewport. This is normal used to direct focus to other geometry (displayed SOP within an object, for example).
useFadedLook(on)
Suppress geometry color (Cd attribute, point, primitive, or vertex) on the geometry in the display set.
useXRay(on)
Draw the geometry in the display set as XRay, which draws the geometry normally if not occluded, and as a dimmed wireframe where occluded by other geometry.
useLighting(on)
Enable lighting for the geometry in the display set. This works in conjunction with the global lighting mode in the viewport. Both this option and the global lighting mode must be set to a lighting mode in order to see lighting (ie, enabling Lighting on this display set will not cause it to be lit if the global viewport mode is "No Lighting").
setShowingBoundaries(view_boundary_mode)
Set the boundary highlight mode for the geometry in the display set. This can be either off, 3D connectivity, UV connectivity, or context-based:
-
hou.boundaryDisplay.Off
: No boundaries are displayed. -
hou.boundaryDisplay.Connect3D
: Boundaries for 3D connectivity are displayed. Hard edges will be highlighted. -
hou.boundaryDisplay.ConnectUV
: Boundaries for UV connectivity are displayed. Hard UV edges will be highlighted. -
hou.boundaryDisplay.
: Either 3D or UV connectivity is displayed, depending on the context of the viewport (a 3D view or a UV view).
setToolbarLinked(on)
Link the display set’s options to the option toggles in the right viewport toolbar. When linked, clicking a display option button on this toolbar will affect the corresponding option in this display set.
setLinkToDisplaySet(view_display_set)
Link this display set to the settings of another display set. This display set’s option settings are then ignored, and the other sets are used in their place. Linking a set to itself restores its own settings.
-
hou.displaySetType.SceneObject
-
hou.displaySetType.SelectedObject
-
hou.displaySetType.GhostObject
-
hou.displaySetType.DisplayModel
-
hou.displaySetType.CurrentModel
-
hou.displaySetType.TemplateModel
setUniqueDisplaySet(on)
When True, remove any link from this display set to another display
set. Its own settings will be used. Passing False has no effect;
use setLinkToDisplaySet
to link this set to another display set.