usdrt::UsdGeomMotionAPI
Defined in usdrt/scenegraph/usd/usdGeom/motionAPI.h
Functions
usdrt::UsdGeomMotionAPI::Apply: Applies this single-apply API schema to the given
prim
. This information is stored by adding "MotionAPI" to the token-valued, listOp metadata apiSchemas on the prim.usdrt::UsdGeomMotionAPI::CreateMotionBlurScaleAttr: See GetMotionBlurScaleAttr() , 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::UsdGeomMotionAPI::CreateNonlinearSampleCountAttr: See GetNonlinearSampleCountAttr() , 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::UsdGeomMotionAPI::CreateVelocityScaleAttr: See GetVelocityScaleAttr() , 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.usdrt::UsdGeomMotionAPI::GetMotionBlurScaleAttr: BlurScale is an inherited float attribute that stipulates the rendered motion blur (as typically specified via UsdGeomCamera 's shutter:open and shutter:close properties) should be scaled for all objects at and beneath the prim in namespace on which the motion:blurScale value is specified.
usdrt::UsdGeomMotionAPI::GetNonlinearSampleCountAttr: Determines the number of position or transformation samples created when motion is described by attributes contributing non-linear terms.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPath: Return the SdfPath to this schema object's held prim.
usdrt::DestructionSchemaDestructibleBaseAPI::GetPrim: Return this schema object's held prim.
usdrt::UsdGeomMotionAPI::UsdGeomMotionAPI: Construct a UsdGeomMotionAPI on the prim held by
schemaObj
. Should be preferred over UsdGeomMotionAPI (schemaObj.GetPrim()), as it preserves SchemaBase state.usdrt::UsdGeomMotionAPI::UsdGeomMotionAPI: Construct a UsdGeomMotionAPI on UsdPrim
prim
. Equivalent to UsdGeomMotionAPI::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.usdrt::DestructionSchemaDestructibleBaseAPI::_GetInstanceName: Returns the instance name of the API schema object belonging to a multiple-apply API schema.
usdrt::UsdGeomMotionAPI::operator bool: Boolean operator.
usdrt::UsdGeomMotionAPI::~UsdGeomMotionAPI: Destructor.
Variables
usdrt::UsdGeomMotionAPI::schemaType: Compile time constant representing what kind of schema this class is.
-
class UsdGeomMotionAPI : public usdrt::UsdAPISchemaBase
UsdGeomMotionAPI encodes data that can live on any prim that may affect computations involving:
computed motion for motion blur
sampling for motion blur
The motion:blurScale attribute allows artists to scale the amount of motion blur to be rendered for parts of the scene without changing the recorded animation. See UsdGeomMotionAPI_blurScale for use and implementation details.
Public Functions
-
inline explicit UsdGeomMotionAPI(const UsdPrim &prim = UsdPrim())
Construct a UsdGeomMotionAPI on UsdPrim
prim
. Equivalent to UsdGeomMotionAPI::Get(prim.GetStage(), prim.GetPath()) for a validprim
, but will not immediately throw an error for an invalidprim
.
-
inline explicit UsdGeomMotionAPI(const UsdSchemaBase &schemaObj)
Construct a UsdGeomMotionAPI on the prim held by
schemaObj
. Should be preferred over UsdGeomMotionAPI(schemaObj.GetPrim()), as it preserves SchemaBase state.
-
inline virtual ~UsdGeomMotionAPI()
Destructor.
-
inline operator bool() const
Boolean operator.
- Returns
Return true if the contained prim is has this api schema applied using
HasAPI
, and false otherwise.
-
inline UsdAttribute GetMotionBlurScaleAttr() const
BlurScale is an inherited float attribute that stipulates the rendered motion blur (as typically specified via UsdGeomCamera’s shutter:open and shutter:close properties) should be scaled for all objects at and beneath the prim in namespace on which the motion:blurScale value is specified.
Without changing any other data in the scene, blurScale allows artists to “dial in” the amount of blur on a per-object basis. A blurScale value of zero removes all blur, a value of 0.5 reduces blur by half, and a value of 2.0 doubles the blur. The legal range for blurScale is [0, inf), although very high values may result in extremely expensive renders, and may exceed the capabilities of some renderers.
Although renderers are free to implement this feature however they see fit, see UsdGeomMotionAPI_blurScale for our guidance on implementing the feature universally and efficiently.
Declaration
float motion:blurScale = 1
C++ Type
float
Usd Type
SdfValueTypeNames->Float
See also
ComputeMotionBlurScale()
-
inline UsdAttribute CreateMotionBlurScaleAttr() const
See GetMotionBlurScaleAttr(), 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
inline UsdAttribute GetVelocityScaleAttr() const
-
VelocityScale is an inherited float attribute that velocity-based schemas (e.g. PointBased, PointInstancer) can consume to compute interpolated positions and orientations by applying velocity and angularVelocity, which is required for interpolating between samples when topology is varying over time. Although these quantities are generally physically computed by a simulator, sometimes we require more or less motion-blur to achieve the desired look. VelocityScale allows artists to dial-in, as a post-sim correction, a scale factor to be applied to the velocity prior to computing interpolated positions from it.
Declaration
float motion:velocityScale = 1
C++ Type
float
Usd Type
SdfValueTypeNames->Float
-
inline UsdAttribute CreateVelocityScaleAttr() const
See GetVelocityScaleAttr(), 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
-
inline UsdAttribute GetNonlinearSampleCountAttr() const
Determines the number of position or transformation samples created when motion is described by attributes contributing non-linear terms.
To give an example, imagine an application (such as a renderer) consuming ‘points’ and the USD document also contains ‘accelerations’ for the same prim. Unless the application can consume these ‘accelerations’ itself, an intermediate layer has to compute samples within the sampling interval for the point positions based on the value of ‘points’, ‘velocities’ and ‘accelerations’. The number of these samples is given by ‘nonlinearSampleCount’. The samples are equally spaced within the sampling interval.
Another example involves the PointInstancer where ‘nonlinearSampleCount’ is relevant when ‘angularVelocities’ or ‘accelerations’ are authored.
‘nonlinearSampleCount’ is an inherited attribute, also see ComputeNonlinearSampleCount()
Declaration
int motion:nonlinearSampleCount = 3
C++ Type
int
Usd Type
SdfValueTypeNames->Int
-
inline UsdAttribute CreateNonlinearSampleCountAttr() const
See GetNonlinearSampleCountAttr(), 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) ifwriteSparsely
istrue
- the default forwriteSparsely
isfalse
.
Public Static Functions
-
static inline UsdGeomMotionAPI Apply(const UsdPrim &prim)
Applies this single-apply API schema to the given
prim
. This information is stored by adding “MotionAPI” to the token-valued, listOp metadata apiSchemas on the prim.See also
UsdPrim::GetAppliedSchemas()
See also
UsdPrim::HasAPI()
See also
UsdPrim::ApplyAPI()
See also
UsdPrim::RemoveAPI()
- Returns
A valid UsdGeomMotionAPI object is returned upon success. An invalid (or empty) UsdGeomMotionAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure.
Public Static Attributes
-
static const UsdSchemaType schemaType = UsdSchemaType::SingleApplyAPI
Compile time constant representing what kind of schema this class is.
See also
UsdSchemaType