nodebpy 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- nodebpy/__init__.py +12 -0
- nodebpy/arrange.py +362 -0
- nodebpy/builder.py +931 -0
- nodebpy/nodes/__init__.py +12 -0
- nodebpy/nodes/attribute.py +580 -0
- nodebpy/nodes/curve.py +2006 -0
- nodebpy/nodes/geometry.py +7304 -0
- nodebpy/nodes/input.py +762 -0
- nodebpy/nodes/manually_specified.py +1356 -0
- nodebpy/nodes/mesh.py +1408 -0
- nodebpy/nodes/types.py +119 -0
- nodebpy/nodes/utilities.py +2344 -0
- nodebpy/screenshot.py +531 -0
- nodebpy/screenshot_subprocess.py +422 -0
- nodebpy/sockets.py +46 -0
- nodebpy-0.1.0.dist-info/METADATA +160 -0
- nodebpy-0.1.0.dist-info/RECORD +19 -0
- nodebpy-0.1.0.dist-info/WHEEL +4 -0
- nodebpy-0.1.0.dist-info/entry_points.txt +3 -0
nodebpy/nodes/input.py
ADDED
|
@@ -0,0 +1,762 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Auto-generated Blender Geometry Node classes.
|
|
3
|
+
|
|
4
|
+
DO NOT EDIT THIS FILE MANUALLY.
|
|
5
|
+
This file is generated by molecularnodes/nodes/generator.py
|
|
6
|
+
|
|
7
|
+
To regenerate: Run generator.py from within Blender
|
|
8
|
+
|
|
9
|
+
KNOWN LIMITATIONS:
|
|
10
|
+
- Dynamic multi-input/output sockets are not yet supported
|
|
11
|
+
(these are the unnamed sockets that appear in the UI for nodes like
|
|
12
|
+
"Evaluate Closure", "Join Geometry", etc. that allow dragging in
|
|
13
|
+
multiple connections)
|
|
14
|
+
- TODO: Add support for dynamic socket creation
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
import bpy
|
|
19
|
+
from ..builder import NodeBuilder, NodeSocket
|
|
20
|
+
from .types import LINKABLE, TYPE_INPUT_BOOLEAN
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Boolean(NodeBuilder):
|
|
24
|
+
"""Provide a True/False value that can be connected to other nodes in the tree"""
|
|
25
|
+
|
|
26
|
+
name = "FunctionNodeInputBool"
|
|
27
|
+
node: bpy.types.FunctionNodeInputBool
|
|
28
|
+
|
|
29
|
+
def __init__(self, boolean: bool = False, **kwargs):
|
|
30
|
+
super().__init__()
|
|
31
|
+
key_args = kwargs
|
|
32
|
+
self.boolean = boolean
|
|
33
|
+
self._establish_links(**key_args)
|
|
34
|
+
|
|
35
|
+
@property
|
|
36
|
+
def o_boolean(self) -> bpy.types.NodeSocketBool:
|
|
37
|
+
"""Output socket: Boolean"""
|
|
38
|
+
return self._output("Boolean")
|
|
39
|
+
|
|
40
|
+
@property
|
|
41
|
+
def boolean(self) -> bool:
|
|
42
|
+
return self.node.boolean
|
|
43
|
+
|
|
44
|
+
@boolean.setter
|
|
45
|
+
def boolean(self, value: bool):
|
|
46
|
+
self.node.boolean = value
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
class Color(NodeBuilder):
|
|
50
|
+
"""Output a color value chosen with the color picker widget"""
|
|
51
|
+
|
|
52
|
+
name = "FunctionNodeInputColor"
|
|
53
|
+
node: bpy.types.FunctionNodeInputColor
|
|
54
|
+
|
|
55
|
+
def __init__(self, value: float = 0.0, **kwargs):
|
|
56
|
+
super().__init__()
|
|
57
|
+
key_args = kwargs
|
|
58
|
+
self.value = value
|
|
59
|
+
self._establish_links(**key_args)
|
|
60
|
+
|
|
61
|
+
@property
|
|
62
|
+
def o_color(self) -> bpy.types.NodeSocketColor:
|
|
63
|
+
"""Output socket: Color"""
|
|
64
|
+
return self._output("Color")
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def value(self) -> float:
|
|
68
|
+
return self.node.value
|
|
69
|
+
|
|
70
|
+
@value.setter
|
|
71
|
+
def value(self, value: float):
|
|
72
|
+
self.node.value = value
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class Integer(NodeBuilder):
|
|
76
|
+
"""Provide an integer value that can be connected to other nodes in the tree"""
|
|
77
|
+
|
|
78
|
+
name = "FunctionNodeInputInt"
|
|
79
|
+
node: bpy.types.FunctionNodeInputInt
|
|
80
|
+
|
|
81
|
+
def __init__(self, integer: int = 1, **kwargs):
|
|
82
|
+
super().__init__()
|
|
83
|
+
key_args = kwargs
|
|
84
|
+
self.integer = integer
|
|
85
|
+
self._establish_links(**key_args)
|
|
86
|
+
|
|
87
|
+
@property
|
|
88
|
+
def o_integer(self) -> bpy.types.NodeSocketInt:
|
|
89
|
+
"""Output socket: Integer"""
|
|
90
|
+
return self._output("Integer")
|
|
91
|
+
|
|
92
|
+
@property
|
|
93
|
+
def integer(self) -> int:
|
|
94
|
+
return self.node.integer
|
|
95
|
+
|
|
96
|
+
@integer.setter
|
|
97
|
+
def integer(self, value: int):
|
|
98
|
+
self.node.integer = value
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class Rotation(NodeBuilder):
|
|
102
|
+
"""Provide a rotation value that can be connected to other nodes in the tree"""
|
|
103
|
+
|
|
104
|
+
name = "FunctionNodeInputRotation"
|
|
105
|
+
node: bpy.types.FunctionNodeInputRotation
|
|
106
|
+
|
|
107
|
+
def __init__(self, rotation_euler: float = 0.0, **kwargs):
|
|
108
|
+
super().__init__()
|
|
109
|
+
key_args = kwargs
|
|
110
|
+
self.rotation_euler = rotation_euler
|
|
111
|
+
self._establish_links(**key_args)
|
|
112
|
+
|
|
113
|
+
@property
|
|
114
|
+
def o_rotation(self) -> bpy.types.NodeSocketRotation:
|
|
115
|
+
"""Output socket: Rotation"""
|
|
116
|
+
return self._output("Rotation")
|
|
117
|
+
|
|
118
|
+
@property
|
|
119
|
+
def rotation_euler(self) -> float:
|
|
120
|
+
return self.node.rotation_euler
|
|
121
|
+
|
|
122
|
+
@rotation_euler.setter
|
|
123
|
+
def rotation_euler(self, value: float):
|
|
124
|
+
self.node.rotation_euler = value
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
class SpecialCharacters(NodeBuilder):
|
|
128
|
+
"""Output string characters that cannot be typed directly with the keyboard"""
|
|
129
|
+
|
|
130
|
+
name = "FunctionNodeInputSpecialCharacters"
|
|
131
|
+
node: bpy.types.FunctionNodeInputSpecialCharacters
|
|
132
|
+
|
|
133
|
+
def __init__(self, **kwargs):
|
|
134
|
+
super().__init__()
|
|
135
|
+
key_args = kwargs
|
|
136
|
+
|
|
137
|
+
self._establish_links(**key_args)
|
|
138
|
+
|
|
139
|
+
@property
|
|
140
|
+
def o_line_break(self) -> bpy.types.NodeSocketString:
|
|
141
|
+
"""Output socket: Line Break"""
|
|
142
|
+
return self._output("Line Break")
|
|
143
|
+
|
|
144
|
+
@property
|
|
145
|
+
def o_tab(self) -> bpy.types.NodeSocketString:
|
|
146
|
+
"""Output socket: Tab"""
|
|
147
|
+
return self._output("Tab")
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
class String(NodeBuilder):
|
|
151
|
+
"""Provide a string value that can be connected to other nodes in the tree"""
|
|
152
|
+
|
|
153
|
+
name = "FunctionNodeInputString"
|
|
154
|
+
node: bpy.types.FunctionNodeInputString
|
|
155
|
+
|
|
156
|
+
def __init__(self, string: str = "", **kwargs):
|
|
157
|
+
super().__init__()
|
|
158
|
+
key_args = kwargs
|
|
159
|
+
self.string = string
|
|
160
|
+
self._establish_links(**key_args)
|
|
161
|
+
|
|
162
|
+
@property
|
|
163
|
+
def o_string(self) -> bpy.types.NodeSocketString:
|
|
164
|
+
"""Output socket: String"""
|
|
165
|
+
return self._output("String")
|
|
166
|
+
|
|
167
|
+
@property
|
|
168
|
+
def string(self) -> str:
|
|
169
|
+
return self.node.string
|
|
170
|
+
|
|
171
|
+
@string.setter
|
|
172
|
+
def string(self, value: str):
|
|
173
|
+
self.node.string = value
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
class Vector(NodeBuilder):
|
|
177
|
+
"""Provide a vector value that can be connected to other nodes in the tree"""
|
|
178
|
+
|
|
179
|
+
name = "FunctionNodeInputVector"
|
|
180
|
+
node: bpy.types.FunctionNodeInputVector
|
|
181
|
+
|
|
182
|
+
def __init__(self, vector: float = 0.0, **kwargs):
|
|
183
|
+
super().__init__()
|
|
184
|
+
key_args = kwargs
|
|
185
|
+
self.vector = vector
|
|
186
|
+
self._establish_links(**key_args)
|
|
187
|
+
|
|
188
|
+
@property
|
|
189
|
+
def o_vector(self) -> bpy.types.NodeSocketVector:
|
|
190
|
+
"""Output socket: Vector"""
|
|
191
|
+
return self._output("Vector")
|
|
192
|
+
|
|
193
|
+
@property
|
|
194
|
+
def vector(self) -> list[float, float, float]:
|
|
195
|
+
return self.node.vector
|
|
196
|
+
|
|
197
|
+
@vector.setter
|
|
198
|
+
def vector(self, value: list[float, float, float]):
|
|
199
|
+
self.node.vector = value
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class ForEachGeometryElementInput(NodeBuilder):
|
|
203
|
+
"""For Each Geometry Element Input node"""
|
|
204
|
+
|
|
205
|
+
name = "GeometryNodeForeachGeometryElementInput"
|
|
206
|
+
node: bpy.types.GeometryNodeForeachGeometryElementInput
|
|
207
|
+
|
|
208
|
+
def __init__(
|
|
209
|
+
self,
|
|
210
|
+
geometry: LINKABLE = None,
|
|
211
|
+
selection: TYPE_INPUT_BOOLEAN = True,
|
|
212
|
+
extend: LINKABLE | None = None,
|
|
213
|
+
**kwargs,
|
|
214
|
+
):
|
|
215
|
+
super().__init__()
|
|
216
|
+
key_args = {"Geometry": geometry, "Selection": selection, "__extend__": extend}
|
|
217
|
+
key_args.update(kwargs)
|
|
218
|
+
|
|
219
|
+
self._establish_links(**key_args)
|
|
220
|
+
|
|
221
|
+
@property
|
|
222
|
+
def i_geometry(self) -> NodeSocket:
|
|
223
|
+
"""Input socket: Geometry"""
|
|
224
|
+
return self._input("Geometry")
|
|
225
|
+
|
|
226
|
+
@property
|
|
227
|
+
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
228
|
+
"""Input socket: Selection"""
|
|
229
|
+
return self._input("Selection")
|
|
230
|
+
|
|
231
|
+
@property
|
|
232
|
+
def i_input_socket(self) -> NodeSocket:
|
|
233
|
+
"""Input socket:"""
|
|
234
|
+
return self._input("__extend__")
|
|
235
|
+
|
|
236
|
+
@property
|
|
237
|
+
def o_index(self) -> bpy.types.NodeSocketInt:
|
|
238
|
+
"""Output socket: Index"""
|
|
239
|
+
return self._output("Index")
|
|
240
|
+
|
|
241
|
+
@property
|
|
242
|
+
def o_input_socket(self) -> NodeSocket:
|
|
243
|
+
"""Output socket:"""
|
|
244
|
+
return self._output("__extend__")
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
class ActiveCamera(NodeBuilder):
|
|
248
|
+
"""Retrieve the scene's active camera"""
|
|
249
|
+
|
|
250
|
+
name = "GeometryNodeInputActiveCamera"
|
|
251
|
+
node: bpy.types.GeometryNodeInputActiveCamera
|
|
252
|
+
|
|
253
|
+
def __init__(self, **kwargs):
|
|
254
|
+
super().__init__()
|
|
255
|
+
key_args = kwargs
|
|
256
|
+
|
|
257
|
+
self._establish_links(**key_args)
|
|
258
|
+
|
|
259
|
+
@property
|
|
260
|
+
def o_active_camera(self) -> bpy.types.NodeSocketObject:
|
|
261
|
+
"""Output socket: Active Camera"""
|
|
262
|
+
return self._output("Active Camera")
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
class Collection(NodeBuilder):
|
|
266
|
+
"""Output a single collection"""
|
|
267
|
+
|
|
268
|
+
name = "GeometryNodeInputCollection"
|
|
269
|
+
node: bpy.types.GeometryNodeInputCollection
|
|
270
|
+
|
|
271
|
+
def __init__(self, **kwargs):
|
|
272
|
+
super().__init__()
|
|
273
|
+
key_args = kwargs
|
|
274
|
+
|
|
275
|
+
self._establish_links(**key_args)
|
|
276
|
+
|
|
277
|
+
@property
|
|
278
|
+
def o_collection(self) -> bpy.types.NodeSocketCollection:
|
|
279
|
+
"""Output socket: Collection"""
|
|
280
|
+
return self._output("Collection")
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
class IsEdgeSmooth(NodeBuilder):
|
|
284
|
+
"""Retrieve whether each edge is marked for smooth or split normals"""
|
|
285
|
+
|
|
286
|
+
name = "GeometryNodeInputEdgeSmooth"
|
|
287
|
+
node: bpy.types.GeometryNodeInputEdgeSmooth
|
|
288
|
+
|
|
289
|
+
def __init__(self, **kwargs):
|
|
290
|
+
super().__init__()
|
|
291
|
+
key_args = kwargs
|
|
292
|
+
|
|
293
|
+
self._establish_links(**key_args)
|
|
294
|
+
|
|
295
|
+
@property
|
|
296
|
+
def o_smooth(self) -> bpy.types.NodeSocketBool:
|
|
297
|
+
"""Output socket: Smooth"""
|
|
298
|
+
return self._output("Smooth")
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
class Id(NodeBuilder):
|
|
302
|
+
"""Retrieve a stable random identifier value from the "id" attribute on the point domain, or the index if the attribute does not exist"""
|
|
303
|
+
|
|
304
|
+
name = "GeometryNodeInputID"
|
|
305
|
+
node: bpy.types.GeometryNodeInputID
|
|
306
|
+
|
|
307
|
+
def __init__(self, **kwargs):
|
|
308
|
+
super().__init__()
|
|
309
|
+
key_args = kwargs
|
|
310
|
+
|
|
311
|
+
self._establish_links(**key_args)
|
|
312
|
+
|
|
313
|
+
@property
|
|
314
|
+
def o_id(self) -> bpy.types.NodeSocketInt:
|
|
315
|
+
"""Output socket: ID"""
|
|
316
|
+
return self._output("ID")
|
|
317
|
+
|
|
318
|
+
|
|
319
|
+
class Image(NodeBuilder):
|
|
320
|
+
"""Input an image data-block"""
|
|
321
|
+
|
|
322
|
+
name = "GeometryNodeInputImage"
|
|
323
|
+
node: bpy.types.GeometryNodeInputImage
|
|
324
|
+
|
|
325
|
+
def __init__(self, **kwargs):
|
|
326
|
+
super().__init__()
|
|
327
|
+
key_args = kwargs
|
|
328
|
+
|
|
329
|
+
self._establish_links(**key_args)
|
|
330
|
+
|
|
331
|
+
@property
|
|
332
|
+
def o_image(self) -> bpy.types.NodeSocketImage:
|
|
333
|
+
"""Output socket: Image"""
|
|
334
|
+
return self._output("Image")
|
|
335
|
+
|
|
336
|
+
|
|
337
|
+
class Index(NodeBuilder):
|
|
338
|
+
"""Retrieve an integer value indicating the position of each element in the list, starting at zero"""
|
|
339
|
+
|
|
340
|
+
name = "GeometryNodeInputIndex"
|
|
341
|
+
node: bpy.types.GeometryNodeInputIndex
|
|
342
|
+
|
|
343
|
+
def __init__(self, **kwargs):
|
|
344
|
+
super().__init__()
|
|
345
|
+
key_args = kwargs
|
|
346
|
+
|
|
347
|
+
self._establish_links(**key_args)
|
|
348
|
+
|
|
349
|
+
@property
|
|
350
|
+
def o_index(self) -> bpy.types.NodeSocketInt:
|
|
351
|
+
"""Output socket: Index"""
|
|
352
|
+
return self._output("Index")
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
class InstanceBounds(NodeBuilder):
|
|
356
|
+
"""Calculate position bounds of each instance's geometry set"""
|
|
357
|
+
|
|
358
|
+
name = "GeometryNodeInputInstanceBounds"
|
|
359
|
+
node: bpy.types.GeometryNodeInputInstanceBounds
|
|
360
|
+
|
|
361
|
+
def __init__(self, use_radius: TYPE_INPUT_BOOLEAN = True, **kwargs):
|
|
362
|
+
super().__init__()
|
|
363
|
+
key_args = {"Use Radius": use_radius}
|
|
364
|
+
key_args.update(kwargs)
|
|
365
|
+
|
|
366
|
+
self._establish_links(**key_args)
|
|
367
|
+
|
|
368
|
+
@property
|
|
369
|
+
def i_use_radius(self) -> bpy.types.NodeSocketBool:
|
|
370
|
+
"""Input socket: Use Radius"""
|
|
371
|
+
return self._input("Use Radius")
|
|
372
|
+
|
|
373
|
+
@property
|
|
374
|
+
def o_min(self) -> bpy.types.NodeSocketVector:
|
|
375
|
+
"""Output socket: Min"""
|
|
376
|
+
return self._output("Min")
|
|
377
|
+
|
|
378
|
+
@property
|
|
379
|
+
def o_max(self) -> bpy.types.NodeSocketVector:
|
|
380
|
+
"""Output socket: Max"""
|
|
381
|
+
return self._output("Max")
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
class InstanceRotation(NodeBuilder):
|
|
385
|
+
"""Retrieve the rotation of each instance in the geometry"""
|
|
386
|
+
|
|
387
|
+
name = "GeometryNodeInputInstanceRotation"
|
|
388
|
+
node: bpy.types.GeometryNodeInputInstanceRotation
|
|
389
|
+
|
|
390
|
+
def __init__(self, **kwargs):
|
|
391
|
+
super().__init__()
|
|
392
|
+
key_args = kwargs
|
|
393
|
+
|
|
394
|
+
self._establish_links(**key_args)
|
|
395
|
+
|
|
396
|
+
@property
|
|
397
|
+
def o_rotation(self) -> bpy.types.NodeSocketRotation:
|
|
398
|
+
"""Output socket: Rotation"""
|
|
399
|
+
return self._output("Rotation")
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
class InstanceScale(NodeBuilder):
|
|
403
|
+
"""Retrieve the scale of each instance in the geometry"""
|
|
404
|
+
|
|
405
|
+
name = "GeometryNodeInputInstanceScale"
|
|
406
|
+
node: bpy.types.GeometryNodeInputInstanceScale
|
|
407
|
+
|
|
408
|
+
def __init__(self, **kwargs):
|
|
409
|
+
super().__init__()
|
|
410
|
+
key_args = kwargs
|
|
411
|
+
|
|
412
|
+
self._establish_links(**key_args)
|
|
413
|
+
|
|
414
|
+
@property
|
|
415
|
+
def o_scale(self) -> bpy.types.NodeSocketVector:
|
|
416
|
+
"""Output socket: Scale"""
|
|
417
|
+
return self._output("Scale")
|
|
418
|
+
|
|
419
|
+
|
|
420
|
+
class Material(NodeBuilder):
|
|
421
|
+
"""Output a single material"""
|
|
422
|
+
|
|
423
|
+
name = "GeometryNodeInputMaterial"
|
|
424
|
+
node: bpy.types.GeometryNodeInputMaterial
|
|
425
|
+
|
|
426
|
+
def __init__(self, **kwargs):
|
|
427
|
+
super().__init__()
|
|
428
|
+
key_args = kwargs
|
|
429
|
+
|
|
430
|
+
self._establish_links(**key_args)
|
|
431
|
+
|
|
432
|
+
@property
|
|
433
|
+
def o_material(self) -> bpy.types.NodeSocketMaterial:
|
|
434
|
+
"""Output socket: Material"""
|
|
435
|
+
return self._output("Material")
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
class MaterialIndex(NodeBuilder):
|
|
439
|
+
"""Retrieve the index of the material used for each element in the geometry's list of materials"""
|
|
440
|
+
|
|
441
|
+
name = "GeometryNodeInputMaterialIndex"
|
|
442
|
+
node: bpy.types.GeometryNodeInputMaterialIndex
|
|
443
|
+
|
|
444
|
+
def __init__(self, **kwargs):
|
|
445
|
+
super().__init__()
|
|
446
|
+
key_args = kwargs
|
|
447
|
+
|
|
448
|
+
self._establish_links(**key_args)
|
|
449
|
+
|
|
450
|
+
@property
|
|
451
|
+
def o_material_index(self) -> bpy.types.NodeSocketInt:
|
|
452
|
+
"""Output socket: Material Index"""
|
|
453
|
+
return self._output("Material Index")
|
|
454
|
+
|
|
455
|
+
|
|
456
|
+
class NamedLayerSelection(NodeBuilder):
|
|
457
|
+
"""Output a selection of a Grease Pencil layer"""
|
|
458
|
+
|
|
459
|
+
name = "GeometryNodeInputNamedLayerSelection"
|
|
460
|
+
node: bpy.types.GeometryNodeInputNamedLayerSelection
|
|
461
|
+
|
|
462
|
+
def __init__(self, name: str | LINKABLE | None = "", **kwargs):
|
|
463
|
+
super().__init__()
|
|
464
|
+
key_args = {"Name": name}
|
|
465
|
+
key_args.update(kwargs)
|
|
466
|
+
|
|
467
|
+
self._establish_links(**key_args)
|
|
468
|
+
|
|
469
|
+
@property
|
|
470
|
+
def i_name(self) -> bpy.types.NodeSocketString:
|
|
471
|
+
"""Input socket: Name"""
|
|
472
|
+
return self._input("Name")
|
|
473
|
+
|
|
474
|
+
@property
|
|
475
|
+
def o_selection(self) -> bpy.types.NodeSocketBool:
|
|
476
|
+
"""Output socket: Selection"""
|
|
477
|
+
return self._output("Selection")
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
class Normal(NodeBuilder):
|
|
481
|
+
"""Retrieve a unit length vector indicating the direction pointing away from the geometry at each element"""
|
|
482
|
+
|
|
483
|
+
name = "GeometryNodeInputNormal"
|
|
484
|
+
node: bpy.types.GeometryNodeInputNormal
|
|
485
|
+
|
|
486
|
+
def __init__(self, legacy_corner_normals: bool = False, **kwargs):
|
|
487
|
+
super().__init__()
|
|
488
|
+
key_args = kwargs
|
|
489
|
+
self.legacy_corner_normals = legacy_corner_normals
|
|
490
|
+
self._establish_links(**key_args)
|
|
491
|
+
|
|
492
|
+
@property
|
|
493
|
+
def o_normal(self) -> bpy.types.NodeSocketVector:
|
|
494
|
+
"""Output socket: Normal"""
|
|
495
|
+
return self._output("Normal")
|
|
496
|
+
|
|
497
|
+
@property
|
|
498
|
+
def o_true_normal(self) -> bpy.types.NodeSocketVector:
|
|
499
|
+
"""Output socket: True Normal"""
|
|
500
|
+
return self._output("True Normal")
|
|
501
|
+
|
|
502
|
+
@property
|
|
503
|
+
def legacy_corner_normals(self) -> bool:
|
|
504
|
+
return self.node.legacy_corner_normals
|
|
505
|
+
|
|
506
|
+
@legacy_corner_normals.setter
|
|
507
|
+
def legacy_corner_normals(self, value: bool):
|
|
508
|
+
self.node.legacy_corner_normals = value
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
class Object(NodeBuilder):
|
|
512
|
+
"""Output a single object"""
|
|
513
|
+
|
|
514
|
+
name = "GeometryNodeInputObject"
|
|
515
|
+
node: bpy.types.GeometryNodeInputObject
|
|
516
|
+
|
|
517
|
+
def __init__(self, **kwargs):
|
|
518
|
+
super().__init__()
|
|
519
|
+
key_args = kwargs
|
|
520
|
+
|
|
521
|
+
self._establish_links(**key_args)
|
|
522
|
+
|
|
523
|
+
@property
|
|
524
|
+
def o_object(self) -> bpy.types.NodeSocketObject:
|
|
525
|
+
"""Output socket: Object"""
|
|
526
|
+
return self._output("Object")
|
|
527
|
+
|
|
528
|
+
|
|
529
|
+
class Position(NodeBuilder):
|
|
530
|
+
"""Retrieve a vector indicating the location of each element"""
|
|
531
|
+
|
|
532
|
+
name = "GeometryNodeInputPosition"
|
|
533
|
+
node: bpy.types.GeometryNodeInputPosition
|
|
534
|
+
|
|
535
|
+
def __init__(self, **kwargs):
|
|
536
|
+
super().__init__()
|
|
537
|
+
key_args = kwargs
|
|
538
|
+
|
|
539
|
+
self._establish_links(**key_args)
|
|
540
|
+
|
|
541
|
+
@property
|
|
542
|
+
def o_position(self) -> bpy.types.NodeSocketVector:
|
|
543
|
+
"""Output socket: Position"""
|
|
544
|
+
return self._output("Position")
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
class Radius(NodeBuilder):
|
|
548
|
+
"""Retrieve the radius at each point on curve or point cloud geometry"""
|
|
549
|
+
|
|
550
|
+
name = "GeometryNodeInputRadius"
|
|
551
|
+
node: bpy.types.GeometryNodeInputRadius
|
|
552
|
+
|
|
553
|
+
def __init__(self, **kwargs):
|
|
554
|
+
super().__init__()
|
|
555
|
+
key_args = kwargs
|
|
556
|
+
|
|
557
|
+
self._establish_links(**key_args)
|
|
558
|
+
|
|
559
|
+
@property
|
|
560
|
+
def o_radius(self) -> bpy.types.NodeSocketFloat:
|
|
561
|
+
"""Output socket: Radius"""
|
|
562
|
+
return self._output("Radius")
|
|
563
|
+
|
|
564
|
+
|
|
565
|
+
class SceneTime(NodeBuilder):
|
|
566
|
+
"""Retrieve the current time in the scene's animation in units of seconds or frames"""
|
|
567
|
+
|
|
568
|
+
name = "GeometryNodeInputSceneTime"
|
|
569
|
+
node: bpy.types.GeometryNodeInputSceneTime
|
|
570
|
+
|
|
571
|
+
def __init__(self, **kwargs):
|
|
572
|
+
super().__init__()
|
|
573
|
+
key_args = kwargs
|
|
574
|
+
|
|
575
|
+
self._establish_links(**key_args)
|
|
576
|
+
|
|
577
|
+
@property
|
|
578
|
+
def o_seconds(self) -> bpy.types.NodeSocketFloat:
|
|
579
|
+
"""Output socket: Seconds"""
|
|
580
|
+
return self._output("Seconds")
|
|
581
|
+
|
|
582
|
+
@property
|
|
583
|
+
def o_frame(self) -> bpy.types.NodeSocketFloat:
|
|
584
|
+
"""Output socket: Frame"""
|
|
585
|
+
return self._output("Frame")
|
|
586
|
+
|
|
587
|
+
|
|
588
|
+
class IsFaceSmooth(NodeBuilder):
|
|
589
|
+
"""Retrieve whether each face is marked for smooth or sharp normals"""
|
|
590
|
+
|
|
591
|
+
name = "GeometryNodeInputShadeSmooth"
|
|
592
|
+
node: bpy.types.GeometryNodeInputShadeSmooth
|
|
593
|
+
|
|
594
|
+
def __init__(self, **kwargs):
|
|
595
|
+
super().__init__()
|
|
596
|
+
key_args = kwargs
|
|
597
|
+
|
|
598
|
+
self._establish_links(**key_args)
|
|
599
|
+
|
|
600
|
+
@property
|
|
601
|
+
def o_smooth(self) -> bpy.types.NodeSocketBool:
|
|
602
|
+
"""Output socket: Smooth"""
|
|
603
|
+
return self._output("Smooth")
|
|
604
|
+
|
|
605
|
+
|
|
606
|
+
class ShortestEdgePaths(NodeBuilder):
|
|
607
|
+
"""Find the shortest paths along mesh edges to selected end vertices, with customizable cost per edge"""
|
|
608
|
+
|
|
609
|
+
name = "GeometryNodeInputShortestEdgePaths"
|
|
610
|
+
node: bpy.types.GeometryNodeInputShortestEdgePaths
|
|
611
|
+
|
|
612
|
+
def __init__(
|
|
613
|
+
self,
|
|
614
|
+
end_vertex: TYPE_INPUT_BOOLEAN = False,
|
|
615
|
+
edge_cost: float | LINKABLE | None = 1.0,
|
|
616
|
+
**kwargs,
|
|
617
|
+
):
|
|
618
|
+
super().__init__()
|
|
619
|
+
key_args = {"End Vertex": end_vertex, "Edge Cost": edge_cost}
|
|
620
|
+
key_args.update(kwargs)
|
|
621
|
+
|
|
622
|
+
self._establish_links(**key_args)
|
|
623
|
+
|
|
624
|
+
@property
|
|
625
|
+
def i_end_vertex(self) -> bpy.types.NodeSocketBool:
|
|
626
|
+
"""Input socket: End Vertex"""
|
|
627
|
+
return self._input("End Vertex")
|
|
628
|
+
|
|
629
|
+
@property
|
|
630
|
+
def i_edge_cost(self) -> bpy.types.NodeSocketFloat:
|
|
631
|
+
"""Input socket: Edge Cost"""
|
|
632
|
+
return self._input("Edge Cost")
|
|
633
|
+
|
|
634
|
+
@property
|
|
635
|
+
def o_next_vertex_index(self) -> bpy.types.NodeSocketInt:
|
|
636
|
+
"""Output socket: Next Vertex Index"""
|
|
637
|
+
return self._output("Next Vertex Index")
|
|
638
|
+
|
|
639
|
+
@property
|
|
640
|
+
def o_total_cost(self) -> bpy.types.NodeSocketFloat:
|
|
641
|
+
"""Output socket: Total Cost"""
|
|
642
|
+
return self._output("Total Cost")
|
|
643
|
+
|
|
644
|
+
|
|
645
|
+
class IsSplineCyclic(NodeBuilder):
|
|
646
|
+
"""Retrieve whether each spline endpoint connects to the beginning"""
|
|
647
|
+
|
|
648
|
+
name = "GeometryNodeInputSplineCyclic"
|
|
649
|
+
node: bpy.types.GeometryNodeInputSplineCyclic
|
|
650
|
+
|
|
651
|
+
def __init__(self, **kwargs):
|
|
652
|
+
super().__init__()
|
|
653
|
+
key_args = kwargs
|
|
654
|
+
|
|
655
|
+
self._establish_links(**key_args)
|
|
656
|
+
|
|
657
|
+
@property
|
|
658
|
+
def o_cyclic(self) -> bpy.types.NodeSocketBool:
|
|
659
|
+
"""Output socket: Cyclic"""
|
|
660
|
+
return self._output("Cyclic")
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
class SplineResolution(NodeBuilder):
|
|
664
|
+
"""Retrieve the number of evaluated points that will be generated for every control point on curves"""
|
|
665
|
+
|
|
666
|
+
name = "GeometryNodeInputSplineResolution"
|
|
667
|
+
node: bpy.types.GeometryNodeInputSplineResolution
|
|
668
|
+
|
|
669
|
+
def __init__(self, **kwargs):
|
|
670
|
+
super().__init__()
|
|
671
|
+
key_args = kwargs
|
|
672
|
+
|
|
673
|
+
self._establish_links(**key_args)
|
|
674
|
+
|
|
675
|
+
@property
|
|
676
|
+
def o_resolution(self) -> bpy.types.NodeSocketInt:
|
|
677
|
+
"""Output socket: Resolution"""
|
|
678
|
+
return self._output("Resolution")
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
class CurveTangent(NodeBuilder):
|
|
682
|
+
"""Retrieve the direction of curves at each control point"""
|
|
683
|
+
|
|
684
|
+
name = "GeometryNodeInputTangent"
|
|
685
|
+
node: bpy.types.GeometryNodeInputTangent
|
|
686
|
+
|
|
687
|
+
def __init__(self, **kwargs):
|
|
688
|
+
super().__init__()
|
|
689
|
+
key_args = kwargs
|
|
690
|
+
|
|
691
|
+
self._establish_links(**key_args)
|
|
692
|
+
|
|
693
|
+
@property
|
|
694
|
+
def o_tangent(self) -> bpy.types.NodeSocketVector:
|
|
695
|
+
"""Output socket: Tangent"""
|
|
696
|
+
return self._output("Tangent")
|
|
697
|
+
|
|
698
|
+
|
|
699
|
+
class VoxelIndex(NodeBuilder):
|
|
700
|
+
"""Retrieve the integer coordinates of the voxel that the field is evaluated on"""
|
|
701
|
+
|
|
702
|
+
name = "GeometryNodeInputVoxelIndex"
|
|
703
|
+
node: bpy.types.GeometryNodeInputVoxelIndex
|
|
704
|
+
|
|
705
|
+
def __init__(self, **kwargs):
|
|
706
|
+
super().__init__()
|
|
707
|
+
key_args = kwargs
|
|
708
|
+
|
|
709
|
+
self._establish_links(**key_args)
|
|
710
|
+
|
|
711
|
+
@property
|
|
712
|
+
def o_x(self) -> bpy.types.NodeSocketInt:
|
|
713
|
+
"""Output socket: X"""
|
|
714
|
+
return self._output("X")
|
|
715
|
+
|
|
716
|
+
@property
|
|
717
|
+
def o_y(self) -> bpy.types.NodeSocketInt:
|
|
718
|
+
"""Output socket: Y"""
|
|
719
|
+
return self._output("Y")
|
|
720
|
+
|
|
721
|
+
@property
|
|
722
|
+
def o_z(self) -> bpy.types.NodeSocketInt:
|
|
723
|
+
"""Output socket: Z"""
|
|
724
|
+
return self._output("Z")
|
|
725
|
+
|
|
726
|
+
@property
|
|
727
|
+
def o_is_tile(self) -> bpy.types.NodeSocketBool:
|
|
728
|
+
"""Output socket: Is Tile"""
|
|
729
|
+
return self._output("Is Tile")
|
|
730
|
+
|
|
731
|
+
@property
|
|
732
|
+
def o_extent_x(self) -> bpy.types.NodeSocketInt:
|
|
733
|
+
"""Output socket: Extent X"""
|
|
734
|
+
return self._output("Extent X")
|
|
735
|
+
|
|
736
|
+
@property
|
|
737
|
+
def o_extent_y(self) -> bpy.types.NodeSocketInt:
|
|
738
|
+
"""Output socket: Extent Y"""
|
|
739
|
+
return self._output("Extent Y")
|
|
740
|
+
|
|
741
|
+
@property
|
|
742
|
+
def o_extent_z(self) -> bpy.types.NodeSocketInt:
|
|
743
|
+
"""Output socket: Extent Z"""
|
|
744
|
+
return self._output("Extent Z")
|
|
745
|
+
|
|
746
|
+
|
|
747
|
+
class Value(NodeBuilder):
|
|
748
|
+
"""Input numerical values to other nodes in the tree"""
|
|
749
|
+
|
|
750
|
+
name = "ShaderNodeValue"
|
|
751
|
+
node: bpy.types.ShaderNodeValue
|
|
752
|
+
|
|
753
|
+
def __init__(self, **kwargs):
|
|
754
|
+
super().__init__()
|
|
755
|
+
key_args = kwargs
|
|
756
|
+
|
|
757
|
+
self._establish_links(**key_args)
|
|
758
|
+
|
|
759
|
+
@property
|
|
760
|
+
def o_value(self) -> bpy.types.NodeSocketFloat:
|
|
761
|
+
"""Output socket: Value"""
|
|
762
|
+
return self._output("Value")
|