UsdProc module#
Summary: The UsdProc module defines schemas for the scene description of procedural data meaningful to downstream systems.
Classes:
Represents an abstract generative procedural prim which delivers its input parameters via properties (including relationships) within the"primvars:"namespace. |
|
- class pxr.UsdProc.GenerativeProcedural#
Represents an abstract generative procedural prim which delivers its input parameters via properties (including relationships) within the”primvars:”namespace.
It does not itself have any awareness or participation in the execution of the procedural but rather serves as a means of delivering a procedural’s definition and input parameters.
The value of its”proceduralSystem”property (either authored or provided by API schema fallback) indicates to which system the procedural definition is meaningful.
For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdProcTokens. So to set an attribute to the value”rightHanded”, use UsdProcTokens->rightHanded as the value.
Methods:
CreateProceduralSystemAttr
(defaultValue, ...)See GetProceduralSystemAttr() , and also Create vs Get Property Methods for when to use Get vs Create.
classmethod Define(stage, path) -> GenerativeProcedural
classmethod Get(stage, path) -> GenerativeProcedural
The name or convention of the system responsible for evaluating the procedural.
classmethod GetSchemaAttributeNames(includeInherited) -> list[str]
- CreateProceduralSystemAttr(
- defaultValue,
- writeSparsely,
See GetProceduralSystemAttr() , 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
.- Parameters:
defaultValue (VtValue)
writeSparsely (bool)
- static Define()#
classmethod Define(stage, path) -> GenerativeProcedural
Attempt to ensure a UsdPrim adhering to this schema at
path
is defined (according to UsdPrim::IsDefined() ) on this stage.If a prim adhering to this schema at
path
is already defined on this stage, return that prim. Otherwise author an SdfPrimSpec with specifier == SdfSpecifierDef and this schema’s prim type name for the prim atpath
at the current EditTarget. Author SdfPrimSpec s withspecifier
== SdfSpecifierDef and empty typeName at the current EditTarget for any nonexistent, or existing but not Defined ancestors.The given path must be an absolute prim path that does not contain any variant selections.
If it is impossible to author any of the necessary PrimSpecs, (for example, in case path cannot map to the current UsdEditTarget ‘s namespace) issue an error and return an invalid UsdPrim.
Note that this method may return a defined prim whose typeName does not specify this schema class, in case a stronger typeName opinion overrides the opinion at the current EditTarget.
- static Get()#
classmethod Get(stage, path) -> GenerativeProcedural
Return a UsdProcGenerativeProcedural holding the prim adhering to this schema at
path
onstage
.If no prim exists at
path
onstage
, or if the prim at that path does not adhere to this schema, return an invalid schema object. This is shorthand for the following:UsdProcGenerativeProcedural(stage->GetPrimAtPath(path));
- GetProceduralSystemAttr() Attribute #
The name or convention of the system responsible for evaluating the procedural.
NOTE: A fallback value for this is typically set via an API schema.
Declaration
token proceduralSystem
C++ Type
TfToken
Usd Type
SdfValueTypeNames->Token
- static GetSchemaAttributeNames()#
classmethod GetSchemaAttributeNames(includeInherited) -> list[str]
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.
- Parameters:
includeInherited (bool)