UsdGeomMesh#

Fully qualified name: usdrt::UsdGeomMesh

class UsdGeomMesh : public usdrt::UsdGeomPointBased#

Encodes a mesh with optional subdivision properties and features.

As a point-based primitive, meshes are defined in terms of points that are connected into edges and faces. Many references to meshes use the term ‘vertex’ in place of or interchangeably with ‘points’, while some use ‘vertex’ to refer to the ‘face-vertices’ that define a face. To avoid confusion, the term ‘vertex’ is intentionally avoided in favor of ‘points’ or ‘face-vertices’.

The connectivity between points, edges and faces is encoded using a common minimal topological description of the faces of the mesh. Each face is defined by a set of face-vertices using indices into the Mesh’s points array (inherited from UsdGeomPointBased) and laid out in a single linear faceVertexIndices array for efficiency. A companion faceVertexCounts array provides, for each face, the number of consecutive face-vertices in faceVertexIndices that define the face. No additional connectivity information is required or constructed, so no adjacency or neighborhood queries are available.

A key property of this mesh schema is that it encodes both subdivision surfaces and simpler polygonal meshes. This is achieved by varying the subdivisionScheme attribute, which is set to specify Catmull-Clark subdivision by default, so polygonal meshes must always be explicitly declared. The available subdivision schemes and additional subdivision features encoded in optional attributes conform to the feature set of OpenSubdiv (https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html).

A Note About Primvars

The following list clarifies the number of elements for and the interpolation behavior of the different primvar interpolation types for meshes:

  • constant: One element for the entire mesh; no interpolation.

  • uniform: One element for each face of the mesh; elements are typically not interpolated but are inherited by other faces derived from a given face (via subdivision, tessellation, etc.).

  • varying: One element for each point of the mesh; interpolation of point data is always linear.

  • vertex: One element for each point of the mesh; interpolation of point data is applied according to the subdivisionScheme attribute.

  • faceVarying: One element for each of the face-vertices that define the mesh topology; interpolation of face-vertex data may be smooth or linear, according to the subdivisionScheme and faceVaryingLinearInterpolation attributes.

Primvar interpolation types and related utilities are described more generally in Usd_InterpolationVals.

A Note About Normals

Normals should not be authored on a subdivision mesh, since subdivision algorithms define their own normals. They should only be authored for polygonal meshes (subdivisionScheme = “none”).

The normals attribute inherited from UsdGeomPointBased is not a generic primvar, but the number of elements in this attribute will be determined by its interpolation. See UsdGeomPointBased::GetNormalsInterpolation() . If normals and primvars:normals are both specified, the latter has precedence. If a polygonal mesh specifies neither normals nor primvars:normals, then it should be treated and rendered as faceted, with no attempt to compute smooth normals.

The normals generated for smooth subdivision schemes, e.g. Catmull-Clark and Loop, will likewise be smooth, but others, e.g. Bilinear, may be discontinuous between faces and/or within non-planar irregular faces. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdGeomTokens. So to set an attribute to the value “rightHanded”, use UsdGeomTokens->rightHanded as the value.

Subclassed by usdrt::PhysxSchemaPlane

Public Functions

inline explicit UsdGeomMesh(const UsdPrim &prim = UsdPrim())#

Construct a UsdGeomMesh on UsdPrim prim. Equivalent to UsdGeomMesh::Get(prim.GetStage(), prim.GetPath()) for a valid prim , but will not immediately throw an error for an invalid prim.

inline explicit UsdGeomMesh(const UsdSchemaBase &schemaObj)#

Construct a UsdGeomMesh on the prim held by schemaObj . Should be preferred over UsdGeomMesh(schemaObj.GetPrim()), as it preserves SchemaBase state.

inline virtual ~UsdGeomMesh()#

Destructor.

inline UsdAttribute GetFaceVertexIndicesAttr() const#

Flat list of the index (into the points attribute) of each vertex of each face in the mesh. If this attribute has more than one timeSample, the mesh is considered to be topologically varying.

Declaration

int[] faceVertexIndices

C++ Type

VtArray<int>

Usd Type

SdfValueTypeNames->IntArray

inline UsdAttribute CreateFaceVertexIndicesAttr() const#

See GetFaceVertexIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetFaceVertexCountsAttr() const#

Provides the number of vertices in each face of the mesh, which is also the number of consecutive indices in faceVertexIndices that define the face. The length of this attribute is the number of faces in the mesh. If this attribute has more than one timeSample, the mesh is considered to be topologically varying.

Declaration

int[] faceVertexCounts

C++ Type

VtArray<int>

Usd Type

SdfValueTypeNames->IntArray

inline UsdAttribute CreateFaceVertexCountsAttr() const#

See GetFaceVertexCountsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetSubdivisionSchemeAttr() const#

The subdivision scheme to be applied to the surface. Valid values are:

  • catmullClark: The default, Catmull-Clark subdivision; preferred for quad-dominant meshes (generalizes B-splines); interpolation of point data is smooth (non-linear)

  • loop: Loop subdivision; preferred for purely triangular meshes; interpolation of point data is smooth (non-linear)

  • bilinear: Subdivision reduces all faces to quads (topologically similar to “catmullClark”); interpolation of point data is bilinear

  • none: No subdivision, i.e. a simple polygonal mesh; interpolation of point data is linear

Polygonal meshes are typically lighter weight and faster to render, depending on renderer and render mode. Use of “bilinear” will produce a similar shape to a polygonal mesh and may offer additional guarantees of watertightness and additional subdivision features (e.g. holes) but may also not respect authored normals.

Declaration

uniform token subdivisionScheme = "catmullClark"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Allowed Values

catmullClark, loop, bilinear, none

inline UsdAttribute CreateSubdivisionSchemeAttr() const#

See GetSubdivisionSchemeAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetInterpolateBoundaryAttr() const#

Specifies how subdivision is applied for faces adjacent to boundary edges and boundary points. Valid values correspond to choices available in OpenSubdiv:

  • none: No boundary interpolation is applied and boundary faces are effectively treated as holes

  • edgeOnly: A sequence of boundary edges defines a smooth curve to which the edges of subdivided boundary faces converge

  • edgeAndCorner: The default, similar to “edgeOnly” but the smooth boundary curve is made sharp at corner points

These are illustrated and described in more detail in the OpenSubdiv documentation: https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html#boundary-interpolation-rules

Declaration

token interpolateBoundary = "edgeAndCorner"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Allowed Values

none, edgeOnly, edgeAndCorner

inline UsdAttribute CreateInterpolateBoundaryAttr() const#

See GetInterpolateBoundaryAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetFaceVaryingLinearInterpolationAttr() const#

Specifies how elements of a primvar of interpolation type “faceVarying” are interpolated for subdivision surfaces. Interpolation can be as smooth as a “vertex” primvar or constrained to be linear at features specified by several options. Valid values correspond to choices available in OpenSubdiv:

  • none: No linear constraints or sharpening, smooth everywhere

  • cornersOnly: Sharpen corners of discontinuous boundaries only, smooth everywhere else

  • cornersPlus1: The default, same as “cornersOnly” plus additional sharpening at points where three or more distinct face-varying values occur

  • cornersPlus2: Same as “cornersPlus1” plus additional sharpening at points with at least one discontinuous boundary corner or only one discontinuous boundary edge (a dart)

  • boundaries: Piecewise linear along discontinuous boundaries, smooth interior

  • all: Piecewise linear everywhere

These are illustrated and described in more detail in the OpenSubdiv documentation: https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html#face-varying-interpolation-rules

Declaration

token faceVaryingLinearInterpolation = "cornersPlus1"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Allowed Values

none, cornersOnly, cornersPlus1, cornersPlus2, boundaries, all

inline UsdAttribute CreateFaceVaryingLinearInterpolationAttr() const#

See GetFaceVaryingLinearInterpolationAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetTriangleSubdivisionRuleAttr() const#

Specifies an option to the subdivision rules for the Catmull-Clark scheme to try and improve undesirable artifacts when subdividing triangles. Valid values are “catmullClark” for the standard rules (the default) and “smooth” for the improvement.

See https://graphics.pixar.com/opensubdiv/docs/subdivision_surfaces.html#triangle-subdivision-rule

Declaration

token triangleSubdivisionRule = "catmullClark"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Allowed Values

catmullClark, smooth

inline UsdAttribute CreateTriangleSubdivisionRuleAttr() const#

See GetTriangleSubdivisionRuleAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetHoleIndicesAttr() const#

The indices of all faces that should be treated as holes, i.e. made invisible. This is traditionally a feature of subdivision surfaces and not generally applied to polygonal meshes.

Declaration

int[] holeIndices = []

C++ Type

VtArray<int>

Usd Type

SdfValueTypeNames->IntArray

inline UsdAttribute CreateHoleIndicesAttr() const#

See GetHoleIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetCornerIndicesAttr() const#

The indices of points for which a corresponding sharpness value is specified in cornerSharpnesses (so the size of this array must match that of cornerSharpnesses).

Declaration

int[] cornerIndices = []

C++ Type

VtArray<int>

Usd Type

SdfValueTypeNames->IntArray

inline UsdAttribute CreateCornerIndicesAttr() const#

See GetCornerIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetCornerSharpnessesAttr() const#

The sharpness values associated with a corresponding set of points specified in cornerIndices (so the size of this array must match that of cornerIndices). Use the constant SHARPNESS_INFINITE for a perfectly sharp corner.

Declaration

float[] cornerSharpnesses = []

C++ Type

VtArray<float>

Usd Type

SdfValueTypeNames->FloatArray

inline UsdAttribute CreateCornerSharpnessesAttr() const#

See GetCornerSharpnessesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetCreaseIndicesAttr() const#

The indices of points grouped into sets of successive pairs that identify edges to be creased. The size of this array must be equal to the sum of all elements of the creaseLengths attribute.

Declaration

int[] creaseIndices = []

C++ Type

VtArray<int>

Usd Type

SdfValueTypeNames->IntArray

inline UsdAttribute CreateCreaseIndicesAttr() const#

See GetCreaseIndicesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetCreaseLengthsAttr() const#

The length of this array specifies the number of creases (sets of adjacent sharpened edges) on the mesh. Each element gives the number of points of each crease, whose indices are successively laid out in the creaseIndices attribute. Since each crease must be at least one edge long, each element of this array must be at least two.

Declaration

int[] creaseLengths = []

C++ Type

VtArray<int>

Usd Type

SdfValueTypeNames->IntArray

inline UsdAttribute CreateCreaseLengthsAttr() const#

See GetCreaseLengthsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetCreaseSharpnessesAttr() const#

The per-crease or per-edge sharpness values for all creases. Since creaseLengths encodes the number of points in each crease, the number of elements in this array will be either len(creaseLengths) or the sum over all X of (creaseLengths[X] - 1). Note that while the RI spec allows each crease to have either a single sharpness or a value per-edge, USD will encode either a single sharpness per crease on a mesh, or sharpnesses for all edges making up the creases on a mesh. Use the constant SHARPNESS_INFINITE for a perfectly sharp crease.

Declaration

float[] creaseSharpnesses = []

C++ Type

VtArray<float>

Usd Type

SdfValueTypeNames->FloatArray

inline UsdAttribute CreateCreaseSharpnessesAttr() const#

See GetCreaseSharpnessesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetPointsAttr() const#

The primary geometry attribute for all PointBased primitives, describes points in (local) space.

Declaration

point3f[] points

C++ Type

VtArray<GfVec3f>

Usd Type

SdfValueTypeNames->Point3fArray

inline UsdAttribute CreatePointsAttr() const#

See GetPointsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetVelocitiesAttr() const#

If provided, ‘velocities’ should be used by renderers to.

compute positions between samples for the ‘points’ attribute, rather than interpolating between neighboring ‘points’ samples. This is the only reasonable means of computing motion blur for topologically varying PointBased primitives. It follows that the length of each ‘velocities’ sample must match the length of the corresponding ‘points’ sample. Velocity is measured in position units per second, as per most simulation software. To convert to position units per UsdTimeCode, divide by UsdStage::GetTimeCodesPerSecond().

See also UsdGeom_VelocityInterpolation .

Declaration

vector3f[] velocities

C++ Type

VtArray<GfVec3f>

Usd Type

SdfValueTypeNames->Vector3fArray

inline UsdAttribute CreateVelocitiesAttr() const#

See GetVelocitiesAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetAccelerationsAttr() const#

If provided, ‘accelerations’ should be used with velocities to compute positions between samples for the ‘points’ attribute rather than interpolating between neighboring ‘points’ samples. Acceleration is measured in position units per second-squared. To convert to position units per squared UsdTimeCode, divide by the square of UsdStage::GetTimeCodesPerSecond().

Declaration

vector3f[] accelerations

C++ Type

VtArray<GfVec3f>

Usd Type

SdfValueTypeNames->Vector3fArray

inline UsdAttribute CreateAccelerationsAttr() const#

See GetAccelerationsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetNormalsAttr() const#

Provide an object-space orientation for individual points, which, depending on subclass, may define a surface, curve, or free points. Note that ‘normals’ should not be authored on any Mesh that is subdivided, since the subdivision algorithm will define its own normals. ‘normals’ is not a generic primvar, but the number of elements in this attribute will be determined by its ‘interpolation’. See SetNormalsInterpolation() . If ‘normals’ and ‘primvars:normals’ are both specified, the latter has precedence.

Declaration

normal3f[] normals

C++ Type

VtArray<GfVec3f>

Usd Type

SdfValueTypeNames->Normal3fArray

inline UsdAttribute CreateNormalsAttr() const#

See GetNormalsAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetDisplayColorAttr() const#

It is useful to have an “official” colorSet that can be used as a display or modeling color, even in the absence of any specified shader for a gprim. DisplayColor serves this role; because it is a UsdGeomPrimvar, it can also be used as a gprim override for any shader that consumes a displayColor parameter.

Declaration

color3f[] primvars:displayColor

C++ Type

VtArray<GfVec3f>

Usd Type

SdfValueTypeNames->Color3fArray

inline UsdAttribute CreateDisplayColorAttr() const#

See GetDisplayColorAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetDisplayOpacityAttr() const#

Companion to displayColor that specifies opacity, broken out as an independent attribute rather than an rgba color, both so that each can be independently overridden, and because shaders rarely consume rgba parameters.

Declaration

float[] primvars:displayOpacity

C++ Type

VtArray<float>

Usd Type

SdfValueTypeNames->FloatArray

inline UsdAttribute CreateDisplayOpacityAttr() const#

See GetDisplayOpacityAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetDoubleSidedAttr() const#

Although some renderers treat all parametric or polygonal surfaces as if they were effectively laminae with outward-facing normals on both sides, some renderers derive significant optimizations by considering these surfaces to have only a single outward side, typically determined by control-point winding order and/or orientation. By doing so they can perform “backface culling” to avoid drawing the many polygons of most closed surfaces that face away from the viewer.

However, it is often advantageous to model thin objects such as paper and cloth as single, open surfaces that must be viewable from both sides, always. Setting a gprim’s doubleSided attribute to true instructs all renderers to disable optimizations such as backface culling for the gprim, and attempt (not all renderers are able to do so, but the USD reference GL renderer always will) to provide forward-facing normals on each side of the surface for lighting calculations.

Declaration

uniform bool doubleSided = 0

C++ Type

bool

Usd Type

SdfValueTypeNames->Bool

Variability

SdfVariabilityUniform

inline UsdAttribute CreateDoubleSidedAttr() const#

See GetDoubleSidedAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetOrientationAttr() const#

Orientation specifies whether the gprim’s surface normal should be computed using the right hand rule, or the left hand rule. Please see UsdGeom_WindingOrder for a deeper explanation and generalization of orientation to composed scenes with transformation hierarchies.

Declaration

uniform token orientation = "rightHanded"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Allowed Values

rightHanded, leftHanded

inline UsdAttribute CreateOrientationAttr() const#

See GetOrientationAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetExtentAttr() const#

Extent is a three dimensional range measuring the geometric extent of the authored gprim in its own local space (i.e. its own transform not applied), without accounting for any shader-induced displacement. If any extent value has been authored for a given Boundable, then it should be authored at every timeSample at which geometry-affecting properties are authored, to ensure correct evaluation via ComputeExtent(). If no extent value has been authored, then ComputeExtent() will call the Boundable’s registered ComputeExtentFunction(), which may be expensive, which is why we strongly encourage proper authoring of extent.

An authored extent on a prim which has children is expected to include the extent of all children, as they will be pruned from BBox computation during traversal.

See also

ComputeExtent()

Declaration

float3[] extent

C++ Type

VtArray<GfVec3f>

Usd Type

SdfValueTypeNames->Float3Array

inline UsdAttribute CreateExtentAttr() const#

See GetExtentAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetXformOpOrderAttr() const#

Encodes the sequence of transformation operations in the order in which they should be pushed onto a transform stack while visiting a UsdStage’s prims in a graph traversal that will effect the desired positioning for this prim and its descendant prims.

You should rarely, if ever, need to manipulate this attribute directly. It is managed by the AddXformOp(), SetResetXformStack(), and SetXformOpOrder(), and consulted by GetOrderedXformOps() and GetLocalTransformation().

Declaration

uniform token[] xformOpOrder

C++ Type

VtArray<TfToken>

Usd Type

SdfValueTypeNames->TokenArray

Variability

SdfVariabilityUniform

inline UsdAttribute CreateXformOpOrderAttr() const#

See GetXformOpOrderAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetVisibilityAttr() const#

Visibility is meant to be the simplest form of “pruning” visibility that is supported by most DCC apps. Visibility is animatable, allowing a sub-tree of geometry to be present for some segment of a shot, and absent from others; unlike the action of deactivating geometry prims, invisible geometry is still available for inspection, for positioning, for defining volumes, etc.

Declaration

token visibility = "inherited"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Allowed Values

inherited, invisible

inline UsdAttribute CreateVisibilityAttr() const#

See GetVisibilityAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdAttribute GetPurposeAttr() const#

Purpose is a classification of geometry into categories that can each be independently included or excluded from traversals of prims on a stage, such as rendering or bounding-box computation traversals.

See UsdGeom_ImageablePurpose for more detail about how purpose is computed and used.

Declaration

uniform token purpose = "default"

C++ Type

TfToken

Usd Type

SdfValueTypeNames->Token

Variability

SdfVariabilityUniform

Allowed Values

default, render, proxy, guide

inline UsdAttribute CreatePurposeAttr() const#

See GetPurposeAttr(), and also Create vs Get Property Methods for when to use Get vs Create. If specified, author defaultValue as the attribute’s default, sparsely (when it makes sense to do so) if writeSparsely is true - the default for writeSparsely is false.

inline UsdRelationship GetProxyPrimRel() const#

The proxyPrim relationship allows us to link a prim whose purpose is “render” to its (single target) purpose=”proxy” prim. This is entirely optional, but can be useful in several scenarios:

  • In a pipeline that does pruning (for complexity management) by deactivating prims composed from asset references, when we deactivate a purpose=”render” prim, we will be able to discover and additionally deactivate its associated purpose=”proxy” prim, so that preview renders reflect the pruning accurately.

  • DCC importers may be able to make more aggressive optimizations for interactive processing and display if they can discover the proxy for a given render prim.

  • With a little more work, a Hydra-based application will be able to map a picked proxy prim back to its render geometry for selection.

Note

It is only valid to author the proxyPrim relationship on prims whose purpose is “render”.

inline UsdRelationship CreateProxyPrimRel() const#

See GetProxyPrimRel(), and also Create vs Get Property Methods for when to use Get vs Create.

UsdPrim GetPrim() const#

Return this schema object’s held prim.

SdfPath GetPath() const#

Return the SdfPath to this schema object’s held prim.

inline explicit operator bool() const#

Check if this schema object is compatible with it’s held prim and that the prim is valid.

A typed schema object is compatible if the held prim’s type is or is a subtype of the schema’s type. Based on prim.IsA().

An API schema object is compatible if the API is of type SingleApplyAPI or UsdSchemaType::MultipleApplyAPI, and the schema has been applied to the prim. Based on prim.HasAPI.

This method invokes polymorphic behaviour.

Returns:

True if the help prim is valid, and the schema object is compatible with its held prim.

Public Static Functions

static inline UsdGeomMesh Define(
const UsdStageRefPtr &stage,
const SdfPath &path,
)#

Attempt to ensure a UsdPrim adhering to this schema at path is defined (according to UsdPrim::IsDefined()) on this stage.

Public Static Attributes

static const UsdSchemaType schemaType = UsdSchemaType::ConcreteTyped#

Compile time constant representing what kind of schema this class is.

See also

UsdSchemaType

Protected Functions

inline virtual bool _IsCompatible() const#

Helper for subclasses to do specific compatibility checking with the given prim. Subclassess may override _isCompatible to for example check type compatibility or value compatibility on the prim.

Overrides exist for UsdTyped and UsdAPISchemaBase.

This check is called when clients invoke the bool operator.

Returns:

True if the schema object is compatible with its held prim.

inline const TfToken _GetType() const#

Helper for subclasses to get this schema’s type token.

Note

This diverges from Usd and returns a TfToken, since we don’t implements TfType.

Returns:

The token representing the schema’s TfType.