File size: 6,825 Bytes
d8ab1df
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295


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.