All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdGeomModelAPI Class Reference

UsdGeomModelAPI extends the generic UsdModelAPI schema with geometry specific concepts such as cached extents for the entire model, constraint targets, and geometry-inspired extensions to the payload lofting process. More...

+ Inheritance diagram for UsdGeomModelAPI:

Public Member Functions

 UsdGeomModelAPI (const UsdPrim &prim=UsdPrim())
 Construct a UsdGeomModelAPI on UsdPrim prim . More...
 
 UsdGeomModelAPI (const UsdSchemaBase &schemaObj)
 Construct a UsdGeomModelAPI on the prim held by schemaObj . More...
 
virtual USDGEOM_API ~UsdGeomModelAPI ()
 Destructor. More...
 
USDGEOM_API UsdAttribute GetModelDrawModeAttr () const
 Alternate imaging mode; applied to this prim or child prims where model:applyDrawMode is true, or where the prim has kind component. More...
 
USDGEOM_API UsdAttribute CreateModelDrawModeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelDrawModeAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelApplyDrawModeAttr () const
 If true, and this prim or parent prims have model:drawMode set, apply an alternate imaging mode to this prim. More...
 
USDGEOM_API UsdAttribute CreateModelApplyDrawModeAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelApplyDrawModeAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelDrawModeColorAttr () const
 The base color of imaging prims inserted for alternate imaging modes. More...
 
USDGEOM_API UsdAttribute CreateModelDrawModeColorAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelDrawModeColorAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelCardGeometryAttr () const
 The geometry to generate for imaging prims inserted for cards imaging mode. More...
 
USDGEOM_API UsdAttribute CreateModelCardGeometryAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelCardGeometryAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelCardTextureXPosAttr () const
 In cards imaging mode, the texture applied to the X+ quad. More...
 
USDGEOM_API UsdAttribute CreateModelCardTextureXPosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelCardTextureXPosAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelCardTextureYPosAttr () const
 In cards imaging mode, the texture applied to the Y+ quad. More...
 
USDGEOM_API UsdAttribute CreateModelCardTextureYPosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelCardTextureYPosAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelCardTextureZPosAttr () const
 In cards imaging mode, the texture applied to the Z+ quad. More...
 
USDGEOM_API UsdAttribute CreateModelCardTextureZPosAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelCardTextureZPosAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelCardTextureXNegAttr () const
 In cards imaging mode, the texture applied to the X- quad. More...
 
USDGEOM_API UsdAttribute CreateModelCardTextureXNegAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelCardTextureXNegAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelCardTextureYNegAttr () const
 In cards imaging mode, the texture applied to the Y- quad. More...
 
USDGEOM_API UsdAttribute CreateModelCardTextureYNegAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelCardTextureYNegAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API UsdAttribute GetModelCardTextureZNegAttr () const
 In cards imaging mode, the texture applied to the Z- quad. More...
 
USDGEOM_API UsdAttribute CreateModelCardTextureZNegAttr (VtValue const &defaultValue=VtValue(), bool writeSparsely=false) const
 See GetModelCardTextureZNegAttr(), and also Create vs Get Property Methods for when to use Get vs Create. More...
 
USDGEOM_API TfToken ComputeModelDrawMode (const TfToken &parentDrawMode=TfToken()) const
 Calculate the effective model:drawMode of this prim, as defined by its closest ancestral authored opinion, if any. More...
 
Model Extents Hint API

Methods for querying, authoring and computing the model's "extentsHint".

USDGEOM_API bool GetExtentsHint (VtVec3fArray *extents, const UsdTimeCode &time=UsdTimeCode::Default()) const
 Retrieve the authored value (if any) of this model's "extentsHint". More...
 
USDGEOM_API bool SetExtentsHint (VtVec3fArray const &extents, const UsdTimeCode &time=UsdTimeCode::Default()) const
 Authors the extentsHint array for this model at the given time. More...
 
USDGEOM_API UsdAttribute GetExtentsHintAttr () const
 Returns the custom 'extentsHint' attribute if it exits. More...
 
USDGEOM_API VtVec3fArray ComputeExtentsHint (UsdGeomBBoxCache &bboxCache) const
 For the given model, compute the value for the extents hint with the given bboxCache. More...
 
Model Constraint Targets API

Methods for adding and listing constraint targets.

USDGEOM_API UsdGeomConstraintTarget GetConstraintTarget (const std::string &constraintName) const
 Get the constraint target with the given name, constraintName. More...
 
USDGEOM_API UsdGeomConstraintTarget CreateConstraintTarget (const std::string &constraintName) const
 Creates a new constraint target with the given name, constraintName. More...
 
USDGEOM_API std::vector
< UsdGeomConstraintTarget
GetConstraintTargets () const
 Returns all the constraint targets belonging to the model. More...
 
- Public Member Functions inherited from UsdAPISchemaBase
 UsdAPISchemaBase (const UsdPrim &prim=UsdPrim())
 Construct a UsdAPISchemaBase on UsdPrim prim . More...
 
 UsdAPISchemaBase (const UsdSchemaBase &schemaObj)
 Construct a UsdAPISchemaBase on the prim held by schemaObj . More...
 
virtual USD_API ~UsdAPISchemaBase ()=0
 Destructor. More...
 
- Public Member Functions inherited from UsdSchemaBase
bool IsConcrete () const
 Returns whether or not this class corresponds to a concrete instantiable prim type in scene description. More...
 
bool IsTyped () const
 Returns whether or not this class inherits from UsdTyped. More...
 
bool IsAPISchema () const
 Returns whether this is an API schema or not. More...
 
bool IsAppliedAPISchema () const
 Returns whether this is an applied API schema or not. More...
 
bool IsMultipleApplyAPISchema () const
 Returns whether this is an applied API schema or not. More...
 
UsdSchemaType GetSchemaType () const
 
USD_API UsdSchemaBase (const UsdPrim &prim=UsdPrim())
 Construct and store prim as the held prim. More...
 
USD_API UsdSchemaBase (const UsdSchemaBase &otherSchema)
 Construct and store for the same prim held by otherSchema. More...
 
virtual USD_API ~UsdSchemaBase ()
 Destructor. More...
 
USD_API operator bool () const
 Return true if this schema object is compatible with its held prim, false otherwise. More...
 
UsdPrim GetPrim () const
 Return this schema object's held prim. More...
 
SdfPath GetPath () const
 Shorthand for GetPrim()->GetPath(). More...
 
USD_API SdfPrimSpecHandle GetSchemaClassPrimDefinition () const
 Return the prim definition associated with this schema instance if one exists, otherwise return null. More...
 

Static Public Member Functions

static USDGEOM_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. More...
 
static USDGEOM_API UsdGeomModelAPI Get (const UsdStagePtr &stage, const SdfPath &path)
 Return a UsdGeomModelAPI holding the prim adhering to this schema at path on stage. More...
 
static USDGEOM_API UsdGeomModelAPI Apply (const UsdPrim &prim)
 Applies this single-apply API schema to the given prim. More...
 
- Static Public Member Functions inherited from UsdAPISchemaBase
static USD_API const
TfTokenVector
GetSchemaAttributeNames (bool includeInherited=true)
 Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes. More...
 
- Static Public Member Functions inherited from UsdSchemaBase
static const TfTokenVectorGetSchemaAttributeNames (bool includeInherited=true)
 

Static Public Attributes

static const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI
 Compile time constant representing what kind of schema this class is. More...
 
- Static Public Attributes inherited from UsdAPISchemaBase
static const UsdSchemaType schemaType = UsdSchemaType::AbstractBase
 Compile time constant representing what kind of schema this class is. More...
 
- Static Public Attributes inherited from UsdSchemaBase
static const UsdSchemaType schemaType = UsdSchemaType::AbstractBase
 Compile time constant representing what kind of schema this class is. More...
 

Protected Member Functions

USDGEOM_API UsdSchemaType _GetSchemaType () const override
 Returns the type of schema this class belongs to. More...
 
- Protected Member Functions inherited from UsdAPISchemaBase
 UsdAPISchemaBase (const UsdPrim &prim, const TfToken &instanceName)
 Construct a multiple-apply UsdAPISchemaBase on UsdPrim prim with the specified instanceName. More...
 
 UsdAPISchemaBase (const UsdSchemaBase &schemaObj, const TfToken &instanceName)
 Construct a multiple-apply UsdAPISchemaBase on the prim held by schemaObj with the given instanceName. More...
 
const TfToken_GetInstanceName () const
 Returns the instance name of the API schema object belonging to a multiple-apply API schema. More...
 
USD_API bool _IsCompatible () const override
 Check whether this APISchema object is valid for the currently held prim. More...
 
- Protected Member Functions inherited from UsdSchemaBase
const TfType_GetType () const
 
USD_API UsdAttribute _CreateAttr (TfToken const &attrName, SdfValueTypeName const &typeName, bool custom, SdfVariability variability, VtValue const &defaultValue, bool writeSparsely) const
 

Friends

class UsdSchemaRegistry
 

Additional Inherited Members

- Static Protected Member Functions inherited from UsdAPISchemaBase
template<typename APISchemaType >
static APISchemaType _ApplyAPISchema (const UsdPrim &prim, const TfToken &apiSchemaName)
 Helper method to apply a single-apply API schema with the given schema name apiSchemaName' and C++ type 'APISchemaType'. More...
 
template<typename APISchemaType >
static APISchemaType _MultipleApplyAPISchema (const UsdPrim &prim, const TfToken &apiSchemaName, const TfToken &instanceName)
 Helper method to apply a multiple-apply API schema with the given schema name apiSchemaName', C++ type 'APISchemaType' and instance name instanceName. More...
 

Detailed Description

UsdGeomModelAPI extends the generic UsdModelAPI schema with geometry specific concepts such as cached extents for the entire model, constraint targets, and geometry-inspired extensions to the payload lofting process.

As described in GetExtentsHint() below, it is useful to cache extents at the model level. UsdGeomModelAPI provides schema for computing and storing these cached extents, which can be consumed by UsdGeomBBoxCache to provide fast access to precomputed extents that will be used as the model's bounds ( see UsdGeomBBoxCache::UsdGeomBBoxCache() ).

Draw Modes

Draw modes provide optional alternate imaging behavior for USD subtrees with kind model. model:drawMode (which is inheritable) and model:applyDrawMode (which is not) are resolved into a decision to stop traversing the scene graph at a certain point, and replace a USD subtree with proxy geometry.

The value of model:drawMode determines the type of proxy geometry:

  • origin - Draw the model-space basis vectors of the replaced prim.
  • bounds - Draw the model-space bounding box of the replaced prim.
  • cards - Draw textured quads as a placeholder for the replaced prim.
  • default - An explicit opinion to draw the USD subtree as normal.

model:drawMode is inheritable so that a whole scene, a large group, or all prototypes of a model hierarchy PointInstancer can be assigned a draw mode with a single attribute edit. model:applyDrawMode is meant to be written when an asset is authored, and provides flexibility for different asset types. For example, a character assembly (composed of character, clothes, etc) might have model:applyDrawMode set at the top of the subtree so the whole group can be drawn as a single card object. An effects subtree might have model:applyDrawMode set at a lower level so each particle group draws individually.

Models of kind component are treated as if model:applyDrawMode were true. This means a prim is drawn with proxy geometry when: the prim has kind component, and/or model:applyDrawMode is set; and the prim or an ancestor has a non-default value for model:drawMode. A value for model:drawMode on a child prim takes precedence over a value on a parent prim.

Cards Geometry

The specific geometry used in cards mode is controlled by the model:cardGeometry attribute:

  • cross - Generate a quad normal to each basis direction and negative. Locate each quad so that it bisects the model extents.
  • box - Generate a quad normal to each basis direction and negative. Locate each quad on a face of the model extents, facing out.
  • fromTexture - Generate a quad for each supplied texture from attributes stored in that texture's metadata.

For cross and box mode, the extents are calculated for purposes default, proxy, and render, at their earliest authored time. If the model has no textures, all six card faces are rendered using model:drawModeColor. If one or more textures are present, only axes with one or more textures assigned are drawn. For each axis, if both textures (positive and negative) are specified, they'll be used on the corresponding card faces; if only one texture is specified, it will be mapped to the opposite card face after being flipped on the texture's s-axis. Any card faces with invalid asset paths will be drawn with model:drawModeColor.

Both model:cardGeometry and model:drawModeColor should be authored on the prim where the draw mode takes effect, since these attributes are not inherited.

For fromTexture mode, only card faces with valid textures assigned are drawn. The geometry is generated by pulling the worldtoscreen attribute out of texture metadata. This is expected to be a 4x4 matrix mapping the model-space position of the card quad to the clip-space quad with corners (-1,-1,0) and (1,1,0). The card vertices are generated by transforming the clip-space corners by the inverse of worldtoscreen. Textures are mapped so that (s) and (t) map to (+x) and (+y) in clip space. If the metadata cannot be read in the right format, or the matrix can't be inverted, the card face is not drawn.

All card faces are drawn and textured as single-sided.

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.

Definition at line 146 of file modelAPI.h.

Constructor & Destructor Documentation

UsdGeomModelAPI ( const UsdPrim prim = UsdPrim())
inlineexplicit

Construct a UsdGeomModelAPI on UsdPrim prim .

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

Definition at line 158 of file modelAPI.h.

UsdGeomModelAPI ( const UsdSchemaBase schemaObj)
inlineexplicit

Construct a UsdGeomModelAPI on the prim held by schemaObj .

Should be preferred over UsdGeomModelAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.

Definition at line 166 of file modelAPI.h.

virtual USDGEOM_API ~UsdGeomModelAPI ( )
virtual

Destructor.

Member Function Documentation

USDGEOM_API UsdSchemaType _GetSchemaType ( ) const
overrideprotectedvirtual

Returns the type of schema this class belongs to.

See Also
UsdSchemaType

Reimplemented from UsdAPISchemaBase.

static USDGEOM_API UsdGeomModelAPI Apply ( const UsdPrim prim)
static

Applies this single-apply API schema to the given prim.

This information is stored by adding "GeomModelAPI" to the token-valued, listOp metadata apiSchemas on the prim.

Returns
A valid UsdGeomModelAPI object is returned upon success. An invalid (or empty) UsdGeomModelAPI object is returned upon failure. See UsdAPISchemaBase::_ApplyAPISchema() for conditions resulting in failure.
See Also
UsdPrim::GetAppliedSchemas()
UsdPrim::HasAPI()
USDGEOM_API VtVec3fArray ComputeExtentsHint ( UsdGeomBBoxCache bboxCache) const

For the given model, compute the value for the extents hint with the given bboxCache.

bboxCache should be setup with the appropriate time. After calling this function, the bboxCache may have it's included purposes changed.

Note
bboxCache should not be in use by any other thread while this method is using it in a thread.
USDGEOM_API TfToken ComputeModelDrawMode ( const TfToken parentDrawMode = TfToken()) const

Calculate the effective model:drawMode of this prim, as defined by its closest ancestral authored opinion, if any.

If no opinion for model:drawMode is authored on this prim or any of its ancestors, its computed model:drawMode is UsdGeomTokens->default_ . Otherwise, its computed model:drawMode is that of its closest ancestor with an authored model:drawMode.

If this function is being called in a traversal context to compute the draw mode of an entire hierarchy of prims, it would be beneficial to cache and pass in the computed parent draw-mode via the parentDrawMode parameter. This avoids repeated upward traversal to look for ancestor opinions.

When parentDrawMode is empty (or unspecified), this function does an upward traversal to find the closest ancestor with an authored model:drawMode.

See Also
GetModelDrawModeAttr()
USDGEOM_API UsdGeomConstraintTarget CreateConstraintTarget ( const std::string &  constraintName) const

Creates a new constraint target with the given name, constraintName.

If the constraint target already exists, then the existing target is returned. If it does not exist, a new one is created and returned.

USDGEOM_API UsdAttribute CreateModelApplyDrawModeAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelApplyDrawModeAttr(), 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.

USDGEOM_API UsdAttribute CreateModelCardGeometryAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardGeometryAttr(), 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.

USDGEOM_API UsdAttribute CreateModelCardTextureXNegAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureXNegAttr(), 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.

USDGEOM_API UsdAttribute CreateModelCardTextureXPosAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureXPosAttr(), 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.

USDGEOM_API UsdAttribute CreateModelCardTextureYNegAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureYNegAttr(), 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.

USDGEOM_API UsdAttribute CreateModelCardTextureYPosAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureYPosAttr(), 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.

USDGEOM_API UsdAttribute CreateModelCardTextureZNegAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureZNegAttr(), 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.

USDGEOM_API UsdAttribute CreateModelCardTextureZPosAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelCardTextureZPosAttr(), 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.

USDGEOM_API UsdAttribute CreateModelDrawModeAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelDrawModeAttr(), 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.

USDGEOM_API UsdAttribute CreateModelDrawModeColorAttr ( VtValue const &  defaultValue = VtValue(),
bool  writeSparsely = false 
) const

See GetModelDrawModeColorAttr(), 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.

static USDGEOM_API UsdGeomModelAPI Get ( const UsdStagePtr &  stage,
const SdfPath path 
)
static

Return a UsdGeomModelAPI holding the prim adhering to this schema at path on stage.

If no prim exists at path on stage, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:

* UsdGeomModelAPI(stage->GetPrimAtPath(path));
*
USDGEOM_API UsdGeomConstraintTarget GetConstraintTarget ( const std::string &  constraintName) const

Get the constraint target with the given name, constraintName.

If the requested constraint target does not exist, then an invalid UsdConstraintTarget object is returned.

USDGEOM_API std::vector<UsdGeomConstraintTarget> GetConstraintTargets ( ) const

Returns all the constraint targets belonging to the model.

Only valid constraint targets in the "constraintTargets" namespace are returned by this method.

USDGEOM_API bool GetExtentsHint ( VtVec3fArray *  extents,
const UsdTimeCode time = UsdTimeCode::Default() 
) const

Retrieve the authored value (if any) of this model's "extentsHint".

Persistent caching of bounds in USD is a potentially perilous endeavor, given that:

  • It is very easy to add overrides in new super-layers that invalidate the cached bounds, and no practical way to automatically detect when this happens
  • It is possible for references to be allowed to "float", so that asset updates can flow directly into cached scenes. Such changes in referenced scene description can also invalidate cached bounds in referencing layers.

For these reasons, as a general rule, we only persistently cache leaf gprim extents in object space. However, even with cached gprim extents, computing bounds can be expensive. Since model-level bounds are so useful to many graphics applications, we make an exception, with some caveats. The "extentsHint" should be considered entirely optional (whereas gprim extent is not); if authored, it should contains the extents for various values of gprim purposes. The extents for different values of purpose are stored in a linear Vec3f array as pairs of GfVec3f values in the order specified by UsdGeomImageable::GetOrderedPurposeTokens(). This list is trimmed to only include non-empty extents. i.e., if a model has only default and render geoms, then it will only have 4 GfVec3f values in its extentsHint array. We do not skip over zero extents, so if a model has only default and proxy geom, we will author six GfVec3f's, the middle two representing an zero extent for render geometry.

A UsdGeomBBoxCache can be configured to first consult the cached extents when evaluating model roots, rather than descending into the models for the full computation. This is not the default behavior, and gives us a convenient way to validate that the cached extentsHint is still valid.

Returns
true if a value was fetched; false if no value was authored, or on error. It is an error to make this query of a prim that is not a model root.
See Also
UsdGeomImageable::GetPurposeAttr(), UsdGeomImageable::GetOrderedPurposeTokens()
USDGEOM_API UsdAttribute GetExtentsHintAttr ( ) const

Returns the custom 'extentsHint' attribute if it exits.

USDGEOM_API UsdAttribute GetModelApplyDrawModeAttr ( ) const

If true, and this prim or parent prims have model:drawMode set, apply an alternate imaging mode to this prim.

See Draw Modes.


C++ Type: bool
Usd Type: SdfValueTypeNames->Bool
Variability: SdfVariabilityUniform
Fallback Value: No Fallback

USDGEOM_API UsdAttribute GetModelCardGeometryAttr ( ) const

The geometry to generate for imaging prims inserted for cards imaging mode.

See Cards Geometry for geometry descriptions. If unspecified, it should be interpreted as cross.


C++ Type: TfToken
Usd Type: SdfValueTypeNames->Token
Variability: SdfVariabilityUniform
Fallback Value: No Fallback
Allowed Values: [cross, box, fromTexture]

USDGEOM_API UsdAttribute GetModelCardTextureXNegAttr ( ) const

In cards imaging mode, the texture applied to the X- quad.

The texture axes (s,t) are mapped to model-space axes (y, -z).


C++ Type: SdfAssetPath
Usd Type: SdfValueTypeNames->Asset
Variability: SdfVariabilityVarying
Fallback Value: No Fallback

USDGEOM_API UsdAttribute GetModelCardTextureXPosAttr ( ) const

In cards imaging mode, the texture applied to the X+ quad.

The texture axes (s,t) are mapped to model-space axes (-y, -z).


C++ Type: SdfAssetPath
Usd Type: SdfValueTypeNames->Asset
Variability: SdfVariabilityVarying
Fallback Value: No Fallback

USDGEOM_API UsdAttribute GetModelCardTextureYNegAttr ( ) const

In cards imaging mode, the texture applied to the Y- quad.

The texture axes (s,t) are mapped to model-space axes (-x, -z).


C++ Type: SdfAssetPath
Usd Type: SdfValueTypeNames->Asset
Variability: SdfVariabilityVarying
Fallback Value: No Fallback

USDGEOM_API UsdAttribute GetModelCardTextureYPosAttr ( ) const

In cards imaging mode, the texture applied to the Y+ quad.

The texture axes (s,t) are mapped to model-space axes (x, -z).


C++ Type: SdfAssetPath
Usd Type: SdfValueTypeNames->Asset
Variability: SdfVariabilityVarying
Fallback Value: No Fallback

USDGEOM_API UsdAttribute GetModelCardTextureZNegAttr ( ) const

In cards imaging mode, the texture applied to the Z- quad.

The texture axes (s,t) are mapped to model-space axes (-x, -y).


C++ Type: SdfAssetPath
Usd Type: SdfValueTypeNames->Asset
Variability: SdfVariabilityVarying
Fallback Value: No Fallback

USDGEOM_API UsdAttribute GetModelCardTextureZPosAttr ( ) const

In cards imaging mode, the texture applied to the Z+ quad.

The texture axes (s,t) are mapped to model-space axes (x, -y).


C++ Type: SdfAssetPath
Usd Type: SdfValueTypeNames->Asset
Variability: SdfVariabilityVarying
Fallback Value: No Fallback

USDGEOM_API UsdAttribute GetModelDrawModeAttr ( ) const

Alternate imaging mode; applied to this prim or child prims where model:applyDrawMode is true, or where the prim has kind component.

See Draw Modes for mode descriptions.


C++ Type: TfToken
Usd Type: SdfValueTypeNames->Token
Variability: SdfVariabilityUniform
Fallback Value: No Fallback
Allowed Values: [origin, bounds, cards, default]

USDGEOM_API UsdAttribute GetModelDrawModeColorAttr ( ) const

The base color of imaging prims inserted for alternate imaging modes.

For origin and bounds modes, this controls line color; for cards mode, this controls the fallback quad color. If unspecified, it should be interpreted as (0.18, 0.18, 0.18).


C++ Type: GfVec3f
Usd Type: SdfValueTypeNames->Float3
Variability: SdfVariabilityUniform
Fallback Value: No Fallback

static USDGEOM_API const TfTokenVector& GetSchemaAttributeNames ( bool  includeInherited = true)
static

Return a vector of names of all pre-declared attributes for this schema class and all its ancestor classes.

Does not include attributes that may be authored by custom/extended methods of the schemas involved.

USDGEOM_API bool SetExtentsHint ( VtVec3fArray const &  extents,
const UsdTimeCode time = UsdTimeCode::Default() 
) const

Authors the extentsHint array for this model at the given time.

See Also
GetExtentsHint()

Member Data Documentation

const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI
static

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

See Also
UsdSchemaType

Definition at line 152 of file modelAPI.h.


The documentation for this class was generated from the following file: