ov-kit-doc / UsdHydra.md
larkZ's picture
Upload 253 files
d8ab1df verified

UsdHydra module — pxr-usd-api 105.1 documentation

pxr-usd-api

» Modules » UsdHydra module

 

UsdHydra module

Summary: The UsdHydra module.

Classes:

GenerativeProceduralAPI This API extends and configures the core UsdProcGenerativeProcedural schema defined within usdProc for use with hydra generative procedurals as defined within hdGp.

Tokens

class pxr.UsdHydra.GenerativeProceduralAPI This API extends and configures the core UsdProcGenerativeProcedural schema defined within usdProc for use with hydra generative procedurals as defined within hdGp. For any described attribute Fallback Value or Allowed Values below that are text/tokens, the actual token is published and defined in UsdHydraTokens. So to set an attribute to the value”rightHanded”, use UsdHydraTokens->rightHanded as the value. Methods:

Apply classmethod Apply(prim) -> GenerativeProceduralAPI

CanApply classmethod CanApply(prim, whyNot) -> bool

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

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

Get classmethod Get(stage, path) -> GenerativeProceduralAPI

GetProceduralSystemAttr() This value should correspond to a configured instance of HdGpGenerativeProceduralResolvingSceneIndex which will evaluate the procedural.

GetProceduralTypeAttr() The registered name of a HdGpGenerativeProceduralPlugin to be executed.

GetSchemaAttributeNames classmethod GetSchemaAttributeNames(includeInherited) -> list[TfToken]

static Apply() classmethod Apply(prim) -> GenerativeProceduralAPI Applies this single-apply API schema to the given prim . This information is stored by adding”HydraGenerativeProceduralAPI”to the token-valued, listOp metadata apiSchemas on the prim. A valid UsdHydraGenerativeProceduralAPI object is returned upon success. An invalid (or empty) UsdHydraGenerativeProceduralAPI object is returned upon failure. See UsdPrim::ApplyAPI() for conditions resulting in failure. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI()

Parameters prim (Prim) –

static CanApply() classmethod CanApply(prim, whyNot) -> bool Returns true if this single-apply API schema can be applied to the given prim . If this schema can not be a applied to the prim, this returns false and, if provided, populates whyNot with the reason it can not be applied. Note that if CanApply returns false, that does not necessarily imply that calling Apply will fail. Callers are expected to call CanApply before calling Apply if they want to ensure that it is valid to apply a schema. UsdPrim::GetAppliedSchemas() UsdPrim::HasAPI() UsdPrim::CanApplyAPI() UsdPrim::ApplyAPI() UsdPrim::RemoveAPI()

Parameters

prim (Prim) – whyNot (str) –

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

CreateProceduralTypeAttr(defaultValue, writeSparsely) → Attribute See GetProceduralTypeAttr() , 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 Get() classmethod Get(stage, path) -> GenerativeProceduralAPI Return a UsdHydraGenerativeProceduralAPI 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: UsdHydraGenerativeProceduralAPI(stage->GetPrimAtPath(path));

Parameters

stage (Stage) – path (Path) –

GetProceduralSystemAttr() → Attribute This value should correspond to a configured instance of HdGpGenerativeProceduralResolvingSceneIndex which will evaluate the procedural. The default value of”hydraGenerativeProcedural”matches the equivalent default of HdGpGenerativeProceduralResolvingSceneIndex. Multiple instances of the scene index can be used to determine where within a scene index chain a given procedural will be evaluated. Declaration token proceduralSystem ="hydraGenerativeProcedural" C++ Type TfToken Usd Type SdfValueTypeNames->Token

GetProceduralTypeAttr() → Attribute The registered name of a HdGpGenerativeProceduralPlugin to be executed. Declaration token primvars:hdGp:proceduralType 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.UsdHydra.Tokens Attributes:

HwPrimvar_1

HwPtexTexture_1

HwUvTexture_1

black

clamp

displayLookBxdf

faceIndex

faceOffset

frame

hydraGenerativeProcedural

infoFilename

infoVarname

linear

linearMipmapLinear

linearMipmapNearest

magFilter

minFilter

mirror

nearest

nearestMipmapLinear

nearestMipmapNearest

primvarsHdGpProceduralType

proceduralSystem

repeat

textureMemory

useMetadata

uv

wrapS

wrapT

HwPrimvar_1 = 'HwPrimvar_1'

HwPtexTexture_1 = 'HwPtexTexture_1'

HwUvTexture_1 = 'HwUvTexture_1'

black = 'black'

clamp = 'clamp'

displayLookBxdf = 'displayLook:bxdf'

faceIndex = 'faceIndex'

faceOffset = 'faceOffset'

frame = 'frame'

hydraGenerativeProcedural = 'hydraGenerativeProcedural'

infoFilename = 'inputs:file'

infoVarname = 'inputs:varname'

linear = 'linear'

linearMipmapLinear = 'linearMipmapLinear'

linearMipmapNearest = 'linearMipmapNearest'

magFilter = 'magFilter'

minFilter = 'minFilter'

mirror = 'mirror'

nearest = 'nearest'

nearestMipmapLinear = 'nearestMipmapLinear'

nearestMipmapNearest = 'nearestMipmapNearest'

primvarsHdGpProceduralType = 'primvars:hdGp:proceduralType'

proceduralSystem = 'proceduralSystem'

repeat = 'repeat'

textureMemory = 'textureMemory'

useMetadata = 'useMetadata'

uv = 'uv'

wrapS = 'wrapS'

wrapT = 'wrapT'

© Copyright 2019-2023, NVIDIA. Last updated on Nov 14, 2023.