UsdProc module

Summary: The UsdProc module defines schemas for the scene description of procedural data meaningful to downstream systems.


Classes:

GenerativeProcedural

Represents an abstract generative procedural prim which delivers its input parameters via properties (including relationships) within the"primvars:"namespace.

Tokens

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.

Define

classmethod Define(stage, path) -> GenerativeProcedural

Get

classmethod Get(stage, path) -> GenerativeProcedural

GetProceduralSystemAttr()

The name or convention of the system responsible for evaluating the procedural.

GetSchemaAttributeNames

classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]

CreateProceduralSystemAttr(defaultValue, writeSparsely) Attribute

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) if writeSparsely is true - the default for writeSparsely is false .

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 at path at the current EditTarget. Author SdfPrimSpec s with specifier == 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.

Parameters
static Get()

classmethod Get(stage, path) -> GenerativeProcedural

Return a UsdProcGenerativeProcedural 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:

UsdProcGenerativeProcedural(stage->GetPrimAtPath(path));
Parameters
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[TfToken]

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) –

class pxr.UsdProc.Tokens

Attributes:

proceduralSystem

proceduralSystem = 'proceduralSystem'