nodebpy 0.1.1__py3-none-any.whl → 0.2.1__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/builder.py +786 -316
- nodebpy/nodes/__init__.py +641 -10
- nodebpy/nodes/attribute.py +345 -389
- nodebpy/nodes/color.py +72 -0
- nodebpy/nodes/converter.py +3527 -0
- nodebpy/nodes/experimental.py +312 -0
- nodebpy/nodes/geometry.py +3677 -4717
- nodebpy/nodes/grid.py +1713 -0
- nodebpy/nodes/group.py +17 -0
- nodebpy/nodes/input.py +1821 -316
- nodebpy/nodes/interface.py +519 -0
- nodebpy/nodes/manual.py +2022 -0
- nodebpy/nodes/output.py +85 -0
- nodebpy/nodes/texture.py +930 -0
- nodebpy/nodes/vector.py +528 -0
- nodebpy/nodes/zone.py +442 -0
- nodebpy/screenshot.py +2 -1
- nodebpy/sockets.py +12 -12
- nodebpy/types.py +445 -0
- {nodebpy-0.1.1.dist-info → nodebpy-0.2.1.dist-info}/METADATA +5 -5
- nodebpy-0.2.1.dist-info/RECORD +26 -0
- nodebpy/nodes/curve.py +0 -2006
- nodebpy/nodes/manually_specified.py +0 -1382
- nodebpy/nodes/mesh.py +0 -1408
- nodebpy/nodes/types.py +0 -119
- nodebpy/nodes/utilities.py +0 -2344
- nodebpy-0.1.1.dist-info/RECORD +0 -19
- {nodebpy-0.1.1.dist-info → nodebpy-0.2.1.dist-info}/WHEEL +0 -0
- {nodebpy-0.1.1.dist-info → nodebpy-0.2.1.dist-info}/entry_points.txt +0 -0
nodebpy/nodes/curve.py
DELETED
|
@@ -1,2006 +0,0 @@
|
|
|
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 typing_extensions import Literal
|
|
20
|
-
from ..builder import NodeBuilder, NodeSocket
|
|
21
|
-
from .types import LINKABLE, TYPE_INPUT_BOOLEAN, TYPE_INPUT_VECTOR
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class Arc(NodeBuilder):
|
|
25
|
-
"""Generate a poly spline arc"""
|
|
26
|
-
|
|
27
|
-
name = "GeometryNodeCurveArc"
|
|
28
|
-
node: bpy.types.GeometryNodeCurveArc
|
|
29
|
-
|
|
30
|
-
def __init__(
|
|
31
|
-
self,
|
|
32
|
-
resolution: LINKABLE | None = 16,
|
|
33
|
-
radius: LINKABLE | None = 1.0,
|
|
34
|
-
start_angle: LINKABLE | None = 0.0,
|
|
35
|
-
sweep_angle: LINKABLE | None = 5.497786998748779,
|
|
36
|
-
connect_center: TYPE_INPUT_BOOLEAN = False,
|
|
37
|
-
invert_arc: TYPE_INPUT_BOOLEAN = False,
|
|
38
|
-
mode: Literal["POINTS", "RADIUS"] = "RADIUS",
|
|
39
|
-
**kwargs,
|
|
40
|
-
):
|
|
41
|
-
super().__init__()
|
|
42
|
-
key_args = {
|
|
43
|
-
"Resolution": resolution,
|
|
44
|
-
"Radius": radius,
|
|
45
|
-
"Start Angle": start_angle,
|
|
46
|
-
"Sweep Angle": sweep_angle,
|
|
47
|
-
"Connect Center": connect_center,
|
|
48
|
-
"Invert Arc": invert_arc,
|
|
49
|
-
}
|
|
50
|
-
key_args.update(kwargs)
|
|
51
|
-
self.mode = mode
|
|
52
|
-
self._establish_links(**key_args)
|
|
53
|
-
|
|
54
|
-
@property
|
|
55
|
-
def i_resolution(self) -> NodeSocket:
|
|
56
|
-
"""Input socket: Resolution"""
|
|
57
|
-
return self._input("Resolution")
|
|
58
|
-
|
|
59
|
-
@property
|
|
60
|
-
def i_radius(self) -> NodeSocket:
|
|
61
|
-
"""Input socket: Radius"""
|
|
62
|
-
return self._input("Radius")
|
|
63
|
-
|
|
64
|
-
@property
|
|
65
|
-
def i_start_angle(self) -> NodeSocket:
|
|
66
|
-
"""Input socket: Start Angle"""
|
|
67
|
-
return self._input("Start Angle")
|
|
68
|
-
|
|
69
|
-
@property
|
|
70
|
-
def i_sweep_angle(self) -> NodeSocket:
|
|
71
|
-
"""Input socket: Sweep Angle"""
|
|
72
|
-
return self._input("Sweep Angle")
|
|
73
|
-
|
|
74
|
-
@property
|
|
75
|
-
def i_connect_center(self) -> bpy.types.NodeSocketBool:
|
|
76
|
-
"""Input socket: Connect Center"""
|
|
77
|
-
return self._input("Connect Center")
|
|
78
|
-
|
|
79
|
-
@property
|
|
80
|
-
def i_invert_arc(self) -> bpy.types.NodeSocketBool:
|
|
81
|
-
"""Input socket: Invert Arc"""
|
|
82
|
-
return self._input("Invert Arc")
|
|
83
|
-
|
|
84
|
-
@property
|
|
85
|
-
def o_curve(self) -> NodeSocket:
|
|
86
|
-
"""Output socket: Curve"""
|
|
87
|
-
return self._output("Curve")
|
|
88
|
-
|
|
89
|
-
@property
|
|
90
|
-
def mode(self) -> Literal["POINTS", "RADIUS"]:
|
|
91
|
-
return self.node.mode
|
|
92
|
-
|
|
93
|
-
@mode.setter
|
|
94
|
-
def mode(self, value: Literal["POINTS", "RADIUS"]):
|
|
95
|
-
self.node.mode = value
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
class EndpointSelection(NodeBuilder):
|
|
99
|
-
"""Provide a selection for an arbitrary number of endpoints in each spline"""
|
|
100
|
-
|
|
101
|
-
name = "GeometryNodeCurveEndpointSelection"
|
|
102
|
-
node: bpy.types.GeometryNodeCurveEndpointSelection
|
|
103
|
-
|
|
104
|
-
def __init__(
|
|
105
|
-
self,
|
|
106
|
-
start_size: int | LINKABLE | None = 1,
|
|
107
|
-
end_size: int | LINKABLE | None = 1,
|
|
108
|
-
**kwargs,
|
|
109
|
-
):
|
|
110
|
-
super().__init__()
|
|
111
|
-
key_args = {"Start Size": start_size, "End Size": end_size}
|
|
112
|
-
key_args.update(kwargs)
|
|
113
|
-
|
|
114
|
-
self._establish_links(**key_args)
|
|
115
|
-
|
|
116
|
-
@property
|
|
117
|
-
def i_start_size(self) -> bpy.types.NodeSocketInt:
|
|
118
|
-
"""Input socket: Start Size"""
|
|
119
|
-
return self._input("Start Size")
|
|
120
|
-
|
|
121
|
-
@property
|
|
122
|
-
def i_end_size(self) -> bpy.types.NodeSocketInt:
|
|
123
|
-
"""Input socket: End Size"""
|
|
124
|
-
return self._input("End Size")
|
|
125
|
-
|
|
126
|
-
@property
|
|
127
|
-
def o_selection(self) -> bpy.types.NodeSocketBool:
|
|
128
|
-
"""Output socket: Selection"""
|
|
129
|
-
return self._output("Selection")
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
class HandleTypeSelection(NodeBuilder):
|
|
133
|
-
"""Provide a selection based on the handle types of Bézier control points"""
|
|
134
|
-
|
|
135
|
-
name = "GeometryNodeCurveHandleTypeSelection"
|
|
136
|
-
node: bpy.types.GeometryNodeCurveHandleTypeSelection
|
|
137
|
-
|
|
138
|
-
def __init__(
|
|
139
|
-
self,
|
|
140
|
-
handle_type: Literal["FREE", "AUTO", "VECTOR", "ALIGN"] = "AUTO",
|
|
141
|
-
mode: Literal["LEFT", "RIGHT"] = "{'LEFT', 'RIGHT'}",
|
|
142
|
-
**kwargs,
|
|
143
|
-
):
|
|
144
|
-
super().__init__()
|
|
145
|
-
key_args = kwargs
|
|
146
|
-
self.handle_type = handle_type
|
|
147
|
-
self.mode = mode
|
|
148
|
-
self._establish_links(**key_args)
|
|
149
|
-
|
|
150
|
-
@property
|
|
151
|
-
def o_selection(self) -> bpy.types.NodeSocketBool:
|
|
152
|
-
"""Output socket: Selection"""
|
|
153
|
-
return self._output("Selection")
|
|
154
|
-
|
|
155
|
-
@property
|
|
156
|
-
def handle_type(self) -> Literal["FREE", "AUTO", "VECTOR", "ALIGN"]:
|
|
157
|
-
return self.node.handle_type
|
|
158
|
-
|
|
159
|
-
@handle_type.setter
|
|
160
|
-
def handle_type(self, value: Literal["FREE", "AUTO", "VECTOR", "ALIGN"]):
|
|
161
|
-
self.node.handle_type = value
|
|
162
|
-
|
|
163
|
-
@property
|
|
164
|
-
def mode(self) -> Literal["LEFT", "RIGHT"]:
|
|
165
|
-
return self.node.mode
|
|
166
|
-
|
|
167
|
-
@mode.setter
|
|
168
|
-
def mode(self, value: Literal["LEFT", "RIGHT"]):
|
|
169
|
-
self.node.mode = value
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
class CurveLength(NodeBuilder):
|
|
173
|
-
"""Retrieve the length of all splines added together"""
|
|
174
|
-
|
|
175
|
-
name = "GeometryNodeCurveLength"
|
|
176
|
-
node: bpy.types.GeometryNodeCurveLength
|
|
177
|
-
|
|
178
|
-
def __init__(self, curve: LINKABLE = None, **kwargs):
|
|
179
|
-
super().__init__()
|
|
180
|
-
key_args = {"Curve": curve}
|
|
181
|
-
key_args.update(kwargs)
|
|
182
|
-
|
|
183
|
-
self._establish_links(**key_args)
|
|
184
|
-
|
|
185
|
-
@property
|
|
186
|
-
def i_curve(self) -> NodeSocket:
|
|
187
|
-
"""Input socket: Curve"""
|
|
188
|
-
return self._input("Curve")
|
|
189
|
-
|
|
190
|
-
@property
|
|
191
|
-
def o_length(self) -> bpy.types.NodeSocketFloat:
|
|
192
|
-
"""Output socket: Length"""
|
|
193
|
-
return self._output("Length")
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
class CurveOfPoint(NodeBuilder):
|
|
197
|
-
"""Retrieve the curve a control point is part of"""
|
|
198
|
-
|
|
199
|
-
name = "GeometryNodeCurveOfPoint"
|
|
200
|
-
node: bpy.types.GeometryNodeCurveOfPoint
|
|
201
|
-
|
|
202
|
-
def __init__(self, point_index: int | LINKABLE | None = 0, **kwargs):
|
|
203
|
-
super().__init__()
|
|
204
|
-
key_args = {"Point Index": point_index}
|
|
205
|
-
key_args.update(kwargs)
|
|
206
|
-
|
|
207
|
-
self._establish_links(**key_args)
|
|
208
|
-
|
|
209
|
-
@property
|
|
210
|
-
def i_point_index(self) -> bpy.types.NodeSocketInt:
|
|
211
|
-
"""Input socket: Point Index"""
|
|
212
|
-
return self._input("Point Index")
|
|
213
|
-
|
|
214
|
-
@property
|
|
215
|
-
def o_curve_index(self) -> bpy.types.NodeSocketInt:
|
|
216
|
-
"""Output socket: Curve Index"""
|
|
217
|
-
return self._output("Curve Index")
|
|
218
|
-
|
|
219
|
-
@property
|
|
220
|
-
def o_index_in_curve(self) -> bpy.types.NodeSocketInt:
|
|
221
|
-
"""Output socket: Index in Curve"""
|
|
222
|
-
return self._output("Index in Curve")
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
class BézierSegment(NodeBuilder):
|
|
226
|
-
"""Generate a 2D Bézier spline from the given control points and handles"""
|
|
227
|
-
|
|
228
|
-
name = "GeometryNodeCurvePrimitiveBezierSegment"
|
|
229
|
-
node: bpy.types.GeometryNodeCurvePrimitiveBezierSegment
|
|
230
|
-
|
|
231
|
-
def __init__(
|
|
232
|
-
self,
|
|
233
|
-
resolution: LINKABLE | None = 16,
|
|
234
|
-
start: LINKABLE | None = [-1.0, 0.0, 0.0],
|
|
235
|
-
start_handle: LINKABLE | None = [-0.5, 0.5, 0.0],
|
|
236
|
-
end_handle: LINKABLE | None = [0.0, 0.0, 0.0],
|
|
237
|
-
end: LINKABLE | None = [1.0, 0.0, 0.0],
|
|
238
|
-
mode: Literal["POSITION", "OFFSET"] = "POSITION",
|
|
239
|
-
**kwargs,
|
|
240
|
-
):
|
|
241
|
-
super().__init__()
|
|
242
|
-
key_args = {
|
|
243
|
-
"Resolution": resolution,
|
|
244
|
-
"Start": start,
|
|
245
|
-
"Start Handle": start_handle,
|
|
246
|
-
"End Handle": end_handle,
|
|
247
|
-
"End": end,
|
|
248
|
-
}
|
|
249
|
-
key_args.update(kwargs)
|
|
250
|
-
self.mode = mode
|
|
251
|
-
self._establish_links(**key_args)
|
|
252
|
-
|
|
253
|
-
@property
|
|
254
|
-
def i_resolution(self) -> NodeSocket:
|
|
255
|
-
"""Input socket: Resolution"""
|
|
256
|
-
return self._input("Resolution")
|
|
257
|
-
|
|
258
|
-
@property
|
|
259
|
-
def i_start(self) -> NodeSocket:
|
|
260
|
-
"""Input socket: Start"""
|
|
261
|
-
return self._input("Start")
|
|
262
|
-
|
|
263
|
-
@property
|
|
264
|
-
def i_start_handle(self) -> NodeSocket:
|
|
265
|
-
"""Input socket: Start Handle"""
|
|
266
|
-
return self._input("Start Handle")
|
|
267
|
-
|
|
268
|
-
@property
|
|
269
|
-
def i_end_handle(self) -> NodeSocket:
|
|
270
|
-
"""Input socket: End Handle"""
|
|
271
|
-
return self._input("End Handle")
|
|
272
|
-
|
|
273
|
-
@property
|
|
274
|
-
def i_end(self) -> NodeSocket:
|
|
275
|
-
"""Input socket: End"""
|
|
276
|
-
return self._input("End")
|
|
277
|
-
|
|
278
|
-
@property
|
|
279
|
-
def o_curve(self) -> NodeSocket:
|
|
280
|
-
"""Output socket: Curve"""
|
|
281
|
-
return self._output("Curve")
|
|
282
|
-
|
|
283
|
-
@property
|
|
284
|
-
def mode(self) -> Literal["POSITION", "OFFSET"]:
|
|
285
|
-
return self.node.mode
|
|
286
|
-
|
|
287
|
-
@mode.setter
|
|
288
|
-
def mode(self, value: Literal["POSITION", "OFFSET"]):
|
|
289
|
-
self.node.mode = value
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
class CurveCircle(NodeBuilder):
|
|
293
|
-
"""Generate a poly spline circle"""
|
|
294
|
-
|
|
295
|
-
name = "GeometryNodeCurvePrimitiveCircle"
|
|
296
|
-
node: bpy.types.GeometryNodeCurvePrimitiveCircle
|
|
297
|
-
|
|
298
|
-
def __init__(
|
|
299
|
-
self,
|
|
300
|
-
resolution: int | LINKABLE | None = 32,
|
|
301
|
-
radius: LINKABLE | None = 1.0,
|
|
302
|
-
mode: Literal["POINTS", "RADIUS"] = "RADIUS",
|
|
303
|
-
**kwargs,
|
|
304
|
-
):
|
|
305
|
-
super().__init__()
|
|
306
|
-
key_args = {"Resolution": resolution, "Radius": radius}
|
|
307
|
-
key_args.update(kwargs)
|
|
308
|
-
self.mode = mode
|
|
309
|
-
self._establish_links(**key_args)
|
|
310
|
-
|
|
311
|
-
@property
|
|
312
|
-
def i_resolution(self) -> bpy.types.NodeSocketInt:
|
|
313
|
-
"""Input socket: Resolution"""
|
|
314
|
-
return self._input("Resolution")
|
|
315
|
-
|
|
316
|
-
@property
|
|
317
|
-
def i_radius(self) -> NodeSocket:
|
|
318
|
-
"""Input socket: Radius"""
|
|
319
|
-
return self._input("Radius")
|
|
320
|
-
|
|
321
|
-
@property
|
|
322
|
-
def o_curve(self) -> NodeSocket:
|
|
323
|
-
"""Output socket: Curve"""
|
|
324
|
-
return self._output("Curve")
|
|
325
|
-
|
|
326
|
-
@property
|
|
327
|
-
def mode(self) -> Literal["POINTS", "RADIUS"]:
|
|
328
|
-
return self.node.mode
|
|
329
|
-
|
|
330
|
-
@mode.setter
|
|
331
|
-
def mode(self, value: Literal["POINTS", "RADIUS"]):
|
|
332
|
-
self.node.mode = value
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
class CurveLine(NodeBuilder):
|
|
336
|
-
"""Generate a poly spline line with two points"""
|
|
337
|
-
|
|
338
|
-
name = "GeometryNodeCurvePrimitiveLine"
|
|
339
|
-
node: bpy.types.GeometryNodeCurvePrimitiveLine
|
|
340
|
-
|
|
341
|
-
def __init__(
|
|
342
|
-
self,
|
|
343
|
-
start: LINKABLE | None = [0.0, 0.0, 0.0],
|
|
344
|
-
end: LINKABLE | None = [0.0, 0.0, 1.0],
|
|
345
|
-
mode: Literal["POINTS", "DIRECTION"] = "POINTS",
|
|
346
|
-
**kwargs,
|
|
347
|
-
):
|
|
348
|
-
super().__init__()
|
|
349
|
-
key_args = {"Start": start, "End": end}
|
|
350
|
-
key_args.update(kwargs)
|
|
351
|
-
self.mode = mode
|
|
352
|
-
self._establish_links(**key_args)
|
|
353
|
-
|
|
354
|
-
@property
|
|
355
|
-
def i_start(self) -> NodeSocket:
|
|
356
|
-
"""Input socket: Start"""
|
|
357
|
-
return self._input("Start")
|
|
358
|
-
|
|
359
|
-
@property
|
|
360
|
-
def i_end(self) -> NodeSocket:
|
|
361
|
-
"""Input socket: End"""
|
|
362
|
-
return self._input("End")
|
|
363
|
-
|
|
364
|
-
@property
|
|
365
|
-
def o_curve(self) -> NodeSocket:
|
|
366
|
-
"""Output socket: Curve"""
|
|
367
|
-
return self._output("Curve")
|
|
368
|
-
|
|
369
|
-
@property
|
|
370
|
-
def mode(self) -> Literal["POINTS", "DIRECTION"]:
|
|
371
|
-
return self.node.mode
|
|
372
|
-
|
|
373
|
-
@mode.setter
|
|
374
|
-
def mode(self, value: Literal["POINTS", "DIRECTION"]):
|
|
375
|
-
self.node.mode = value
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
class Quadrilateral(NodeBuilder):
|
|
379
|
-
"""Generate a polygon with four points"""
|
|
380
|
-
|
|
381
|
-
name = "GeometryNodeCurvePrimitiveQuadrilateral"
|
|
382
|
-
node: bpy.types.GeometryNodeCurvePrimitiveQuadrilateral
|
|
383
|
-
|
|
384
|
-
def __init__(
|
|
385
|
-
self,
|
|
386
|
-
width: LINKABLE | None = 2.0,
|
|
387
|
-
height: LINKABLE | None = 2.0,
|
|
388
|
-
mode: Literal[
|
|
389
|
-
"RECTANGLE", "PARALLELOGRAM", "TRAPEZOID", "KITE", "POINTS"
|
|
390
|
-
] = "RECTANGLE",
|
|
391
|
-
**kwargs,
|
|
392
|
-
):
|
|
393
|
-
super().__init__()
|
|
394
|
-
key_args = {"Width": width, "Height": height}
|
|
395
|
-
key_args.update(kwargs)
|
|
396
|
-
self.mode = mode
|
|
397
|
-
self._establish_links(**key_args)
|
|
398
|
-
|
|
399
|
-
@property
|
|
400
|
-
def i_width(self) -> NodeSocket:
|
|
401
|
-
"""Input socket: Width"""
|
|
402
|
-
return self._input("Width")
|
|
403
|
-
|
|
404
|
-
@property
|
|
405
|
-
def i_height(self) -> NodeSocket:
|
|
406
|
-
"""Input socket: Height"""
|
|
407
|
-
return self._input("Height")
|
|
408
|
-
|
|
409
|
-
@property
|
|
410
|
-
def o_curve(self) -> NodeSocket:
|
|
411
|
-
"""Output socket: Curve"""
|
|
412
|
-
return self._output("Curve")
|
|
413
|
-
|
|
414
|
-
@property
|
|
415
|
-
def mode(
|
|
416
|
-
self,
|
|
417
|
-
) -> Literal["RECTANGLE", "PARALLELOGRAM", "TRAPEZOID", "KITE", "POINTS"]:
|
|
418
|
-
return self.node.mode
|
|
419
|
-
|
|
420
|
-
@mode.setter
|
|
421
|
-
def mode(
|
|
422
|
-
self,
|
|
423
|
-
value: Literal["RECTANGLE", "PARALLELOGRAM", "TRAPEZOID", "KITE", "POINTS"],
|
|
424
|
-
):
|
|
425
|
-
self.node.mode = value
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
class QuadraticBézier(NodeBuilder):
|
|
429
|
-
"""Generate a poly spline in a parabola shape with control points positions"""
|
|
430
|
-
|
|
431
|
-
name = "GeometryNodeCurveQuadraticBezier"
|
|
432
|
-
node: bpy.types.GeometryNodeCurveQuadraticBezier
|
|
433
|
-
|
|
434
|
-
def __init__(
|
|
435
|
-
self,
|
|
436
|
-
resolution: LINKABLE | None = 16,
|
|
437
|
-
start: LINKABLE | None = [-1.0, 0.0, 0.0],
|
|
438
|
-
middle: LINKABLE | None = [0.0, 2.0, 0.0],
|
|
439
|
-
end: LINKABLE | None = [1.0, 0.0, 0.0],
|
|
440
|
-
**kwargs,
|
|
441
|
-
):
|
|
442
|
-
super().__init__()
|
|
443
|
-
key_args = {
|
|
444
|
-
"Resolution": resolution,
|
|
445
|
-
"Start": start,
|
|
446
|
-
"Middle": middle,
|
|
447
|
-
"End": end,
|
|
448
|
-
}
|
|
449
|
-
key_args.update(kwargs)
|
|
450
|
-
|
|
451
|
-
self._establish_links(**key_args)
|
|
452
|
-
|
|
453
|
-
@property
|
|
454
|
-
def i_resolution(self) -> NodeSocket:
|
|
455
|
-
"""Input socket: Resolution"""
|
|
456
|
-
return self._input("Resolution")
|
|
457
|
-
|
|
458
|
-
@property
|
|
459
|
-
def i_start(self) -> NodeSocket:
|
|
460
|
-
"""Input socket: Start"""
|
|
461
|
-
return self._input("Start")
|
|
462
|
-
|
|
463
|
-
@property
|
|
464
|
-
def i_middle(self) -> NodeSocket:
|
|
465
|
-
"""Input socket: Middle"""
|
|
466
|
-
return self._input("Middle")
|
|
467
|
-
|
|
468
|
-
@property
|
|
469
|
-
def i_end(self) -> NodeSocket:
|
|
470
|
-
"""Input socket: End"""
|
|
471
|
-
return self._input("End")
|
|
472
|
-
|
|
473
|
-
@property
|
|
474
|
-
def o_curve(self) -> NodeSocket:
|
|
475
|
-
"""Output socket: Curve"""
|
|
476
|
-
return self._output("Curve")
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
class SetHandleType(NodeBuilder):
|
|
480
|
-
"""Set the handle type for the control points of a Bézier curve"""
|
|
481
|
-
|
|
482
|
-
name = "GeometryNodeCurveSetHandles"
|
|
483
|
-
node: bpy.types.GeometryNodeCurveSetHandles
|
|
484
|
-
|
|
485
|
-
def __init__(
|
|
486
|
-
self,
|
|
487
|
-
curve: LINKABLE = None,
|
|
488
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
489
|
-
handle_type: Literal["FREE", "AUTO", "VECTOR", "ALIGN"] = "AUTO",
|
|
490
|
-
mode: Literal["LEFT", "RIGHT"] = "{'LEFT', 'RIGHT'}",
|
|
491
|
-
**kwargs,
|
|
492
|
-
):
|
|
493
|
-
super().__init__()
|
|
494
|
-
key_args = {"Curve": curve, "Selection": selection}
|
|
495
|
-
key_args.update(kwargs)
|
|
496
|
-
self.handle_type = handle_type
|
|
497
|
-
self.mode = mode
|
|
498
|
-
self._establish_links(**key_args)
|
|
499
|
-
|
|
500
|
-
@property
|
|
501
|
-
def i_curve(self) -> NodeSocket:
|
|
502
|
-
"""Input socket: Curve"""
|
|
503
|
-
return self._input("Curve")
|
|
504
|
-
|
|
505
|
-
@property
|
|
506
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
507
|
-
"""Input socket: Selection"""
|
|
508
|
-
return self._input("Selection")
|
|
509
|
-
|
|
510
|
-
@property
|
|
511
|
-
def o_curve(self) -> NodeSocket:
|
|
512
|
-
"""Output socket: Curve"""
|
|
513
|
-
return self._output("Curve")
|
|
514
|
-
|
|
515
|
-
@property
|
|
516
|
-
def handle_type(self) -> Literal["FREE", "AUTO", "VECTOR", "ALIGN"]:
|
|
517
|
-
return self.node.handle_type
|
|
518
|
-
|
|
519
|
-
@handle_type.setter
|
|
520
|
-
def handle_type(self, value: Literal["FREE", "AUTO", "VECTOR", "ALIGN"]):
|
|
521
|
-
self.node.handle_type = value
|
|
522
|
-
|
|
523
|
-
@property
|
|
524
|
-
def mode(self) -> Literal["LEFT", "RIGHT"]:
|
|
525
|
-
return self.node.mode
|
|
526
|
-
|
|
527
|
-
@mode.setter
|
|
528
|
-
def mode(self, value: Literal["LEFT", "RIGHT"]):
|
|
529
|
-
self.node.mode = value
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
class Spiral(NodeBuilder):
|
|
533
|
-
"""Generate a poly spline in a spiral shape"""
|
|
534
|
-
|
|
535
|
-
name = "GeometryNodeCurveSpiral"
|
|
536
|
-
node: bpy.types.GeometryNodeCurveSpiral
|
|
537
|
-
|
|
538
|
-
def __init__(
|
|
539
|
-
self,
|
|
540
|
-
resolution: LINKABLE | None = 32,
|
|
541
|
-
rotations: float | LINKABLE | None = 2.0,
|
|
542
|
-
start_radius: LINKABLE | None = 1.0,
|
|
543
|
-
end_radius: LINKABLE | None = 2.0,
|
|
544
|
-
height: LINKABLE | None = 2.0,
|
|
545
|
-
reverse: TYPE_INPUT_BOOLEAN = False,
|
|
546
|
-
**kwargs,
|
|
547
|
-
):
|
|
548
|
-
super().__init__()
|
|
549
|
-
key_args = {
|
|
550
|
-
"Resolution": resolution,
|
|
551
|
-
"Rotations": rotations,
|
|
552
|
-
"Start Radius": start_radius,
|
|
553
|
-
"End Radius": end_radius,
|
|
554
|
-
"Height": height,
|
|
555
|
-
"Reverse": reverse,
|
|
556
|
-
}
|
|
557
|
-
key_args.update(kwargs)
|
|
558
|
-
|
|
559
|
-
self._establish_links(**key_args)
|
|
560
|
-
|
|
561
|
-
@property
|
|
562
|
-
def i_resolution(self) -> NodeSocket:
|
|
563
|
-
"""Input socket: Resolution"""
|
|
564
|
-
return self._input("Resolution")
|
|
565
|
-
|
|
566
|
-
@property
|
|
567
|
-
def i_rotations(self) -> bpy.types.NodeSocketFloat:
|
|
568
|
-
"""Input socket: Rotations"""
|
|
569
|
-
return self._input("Rotations")
|
|
570
|
-
|
|
571
|
-
@property
|
|
572
|
-
def i_start_radius(self) -> NodeSocket:
|
|
573
|
-
"""Input socket: Start Radius"""
|
|
574
|
-
return self._input("Start Radius")
|
|
575
|
-
|
|
576
|
-
@property
|
|
577
|
-
def i_end_radius(self) -> NodeSocket:
|
|
578
|
-
"""Input socket: End Radius"""
|
|
579
|
-
return self._input("End Radius")
|
|
580
|
-
|
|
581
|
-
@property
|
|
582
|
-
def i_height(self) -> NodeSocket:
|
|
583
|
-
"""Input socket: Height"""
|
|
584
|
-
return self._input("Height")
|
|
585
|
-
|
|
586
|
-
@property
|
|
587
|
-
def i_reverse(self) -> bpy.types.NodeSocketBool:
|
|
588
|
-
"""Input socket: Reverse"""
|
|
589
|
-
return self._input("Reverse")
|
|
590
|
-
|
|
591
|
-
@property
|
|
592
|
-
def o_curve(self) -> NodeSocket:
|
|
593
|
-
"""Output socket: Curve"""
|
|
594
|
-
return self._output("Curve")
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
class SetSplineType(NodeBuilder):
|
|
598
|
-
"""Change the type of curves"""
|
|
599
|
-
|
|
600
|
-
name = "GeometryNodeCurveSplineType"
|
|
601
|
-
node: bpy.types.GeometryNodeCurveSplineType
|
|
602
|
-
|
|
603
|
-
def __init__(
|
|
604
|
-
self,
|
|
605
|
-
curve: LINKABLE = None,
|
|
606
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
607
|
-
spline_type: Literal["CATMULL_ROM", "POLY", "BEZIER", "NURBS"] = "POLY",
|
|
608
|
-
**kwargs,
|
|
609
|
-
):
|
|
610
|
-
super().__init__()
|
|
611
|
-
key_args = {"Curve": curve, "Selection": selection}
|
|
612
|
-
key_args.update(kwargs)
|
|
613
|
-
self.spline_type = spline_type
|
|
614
|
-
self._establish_links(**key_args)
|
|
615
|
-
|
|
616
|
-
@property
|
|
617
|
-
def i_curve(self) -> NodeSocket:
|
|
618
|
-
"""Input socket: Curve"""
|
|
619
|
-
return self._input("Curve")
|
|
620
|
-
|
|
621
|
-
@property
|
|
622
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
623
|
-
"""Input socket: Selection"""
|
|
624
|
-
return self._input("Selection")
|
|
625
|
-
|
|
626
|
-
@property
|
|
627
|
-
def o_curve(self) -> NodeSocket:
|
|
628
|
-
"""Output socket: Curve"""
|
|
629
|
-
return self._output("Curve")
|
|
630
|
-
|
|
631
|
-
@property
|
|
632
|
-
def spline_type(self) -> Literal["CATMULL_ROM", "POLY", "BEZIER", "NURBS"]:
|
|
633
|
-
return self.node.spline_type
|
|
634
|
-
|
|
635
|
-
@spline_type.setter
|
|
636
|
-
def spline_type(self, value: Literal["CATMULL_ROM", "POLY", "BEZIER", "NURBS"]):
|
|
637
|
-
self.node.spline_type = value
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
class Star(NodeBuilder):
|
|
641
|
-
"""Generate a poly spline in a star pattern by connecting alternating points of two circles"""
|
|
642
|
-
|
|
643
|
-
name = "GeometryNodeCurveStar"
|
|
644
|
-
node: bpy.types.GeometryNodeCurveStar
|
|
645
|
-
|
|
646
|
-
def __init__(
|
|
647
|
-
self,
|
|
648
|
-
points: LINKABLE | None = 8,
|
|
649
|
-
inner_radius: LINKABLE | None = 1.0,
|
|
650
|
-
outer_radius: LINKABLE | None = 2.0,
|
|
651
|
-
twist: LINKABLE | None = 0.0,
|
|
652
|
-
**kwargs,
|
|
653
|
-
):
|
|
654
|
-
super().__init__()
|
|
655
|
-
key_args = {
|
|
656
|
-
"Points": points,
|
|
657
|
-
"Inner Radius": inner_radius,
|
|
658
|
-
"Outer Radius": outer_radius,
|
|
659
|
-
"Twist": twist,
|
|
660
|
-
}
|
|
661
|
-
key_args.update(kwargs)
|
|
662
|
-
|
|
663
|
-
self._establish_links(**key_args)
|
|
664
|
-
|
|
665
|
-
@property
|
|
666
|
-
def i_points(self) -> NodeSocket:
|
|
667
|
-
"""Input socket: Points"""
|
|
668
|
-
return self._input("Points")
|
|
669
|
-
|
|
670
|
-
@property
|
|
671
|
-
def i_inner_radius(self) -> NodeSocket:
|
|
672
|
-
"""Input socket: Inner Radius"""
|
|
673
|
-
return self._input("Inner Radius")
|
|
674
|
-
|
|
675
|
-
@property
|
|
676
|
-
def i_outer_radius(self) -> NodeSocket:
|
|
677
|
-
"""Input socket: Outer Radius"""
|
|
678
|
-
return self._input("Outer Radius")
|
|
679
|
-
|
|
680
|
-
@property
|
|
681
|
-
def i_twist(self) -> NodeSocket:
|
|
682
|
-
"""Input socket: Twist"""
|
|
683
|
-
return self._input("Twist")
|
|
684
|
-
|
|
685
|
-
@property
|
|
686
|
-
def o_curve(self) -> NodeSocket:
|
|
687
|
-
"""Output socket: Curve"""
|
|
688
|
-
return self._output("Curve")
|
|
689
|
-
|
|
690
|
-
@property
|
|
691
|
-
def o_outer_points(self) -> bpy.types.NodeSocketBool:
|
|
692
|
-
"""Output socket: Outer Points"""
|
|
693
|
-
return self._output("Outer Points")
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
class CurveToPoints(NodeBuilder):
|
|
697
|
-
"""Generate a point cloud by sampling positions along curves"""
|
|
698
|
-
|
|
699
|
-
name = "GeometryNodeCurveToPoints"
|
|
700
|
-
node: bpy.types.GeometryNodeCurveToPoints
|
|
701
|
-
|
|
702
|
-
def __init__(
|
|
703
|
-
self,
|
|
704
|
-
curve: LINKABLE = None,
|
|
705
|
-
count: int | LINKABLE | None = 10,
|
|
706
|
-
mode: Literal["EVALUATED", "COUNT", "LENGTH"] = "COUNT",
|
|
707
|
-
**kwargs,
|
|
708
|
-
):
|
|
709
|
-
super().__init__()
|
|
710
|
-
key_args = {"Curve": curve, "Count": count}
|
|
711
|
-
key_args.update(kwargs)
|
|
712
|
-
self.mode = mode
|
|
713
|
-
self._establish_links(**key_args)
|
|
714
|
-
|
|
715
|
-
@property
|
|
716
|
-
def i_curve(self) -> NodeSocket:
|
|
717
|
-
"""Input socket: Curve"""
|
|
718
|
-
return self._input("Curve")
|
|
719
|
-
|
|
720
|
-
@property
|
|
721
|
-
def i_count(self) -> bpy.types.NodeSocketInt:
|
|
722
|
-
"""Input socket: Count"""
|
|
723
|
-
return self._input("Count")
|
|
724
|
-
|
|
725
|
-
@property
|
|
726
|
-
def o_points(self) -> NodeSocket:
|
|
727
|
-
"""Output socket: Points"""
|
|
728
|
-
return self._output("Points")
|
|
729
|
-
|
|
730
|
-
@property
|
|
731
|
-
def o_tangent(self) -> bpy.types.NodeSocketVector:
|
|
732
|
-
"""Output socket: Tangent"""
|
|
733
|
-
return self._output("Tangent")
|
|
734
|
-
|
|
735
|
-
@property
|
|
736
|
-
def o_normal(self) -> bpy.types.NodeSocketVector:
|
|
737
|
-
"""Output socket: Normal"""
|
|
738
|
-
return self._output("Normal")
|
|
739
|
-
|
|
740
|
-
@property
|
|
741
|
-
def o_rotation(self) -> bpy.types.NodeSocketRotation:
|
|
742
|
-
"""Output socket: Rotation"""
|
|
743
|
-
return self._output("Rotation")
|
|
744
|
-
|
|
745
|
-
@property
|
|
746
|
-
def mode(self) -> Literal["EVALUATED", "COUNT", "LENGTH"]:
|
|
747
|
-
return self.node.mode
|
|
748
|
-
|
|
749
|
-
@mode.setter
|
|
750
|
-
def mode(self, value: Literal["EVALUATED", "COUNT", "LENGTH"]):
|
|
751
|
-
self.node.mode = value
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
class CurvesToGreasePencil(NodeBuilder):
|
|
755
|
-
"""Convert the curves in each top-level instance into Grease Pencil layer"""
|
|
756
|
-
|
|
757
|
-
name = "GeometryNodeCurvesToGreasePencil"
|
|
758
|
-
node: bpy.types.GeometryNodeCurvesToGreasePencil
|
|
759
|
-
|
|
760
|
-
def __init__(
|
|
761
|
-
self,
|
|
762
|
-
curves: LINKABLE = None,
|
|
763
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
764
|
-
instances_as_layers: TYPE_INPUT_BOOLEAN = True,
|
|
765
|
-
**kwargs,
|
|
766
|
-
):
|
|
767
|
-
super().__init__()
|
|
768
|
-
key_args = {
|
|
769
|
-
"Curves": curves,
|
|
770
|
-
"Selection": selection,
|
|
771
|
-
"Instances as Layers": instances_as_layers,
|
|
772
|
-
}
|
|
773
|
-
key_args.update(kwargs)
|
|
774
|
-
|
|
775
|
-
self._establish_links(**key_args)
|
|
776
|
-
|
|
777
|
-
@property
|
|
778
|
-
def i_curves(self) -> NodeSocket:
|
|
779
|
-
"""Input socket: Curves"""
|
|
780
|
-
return self._input("Curves")
|
|
781
|
-
|
|
782
|
-
@property
|
|
783
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
784
|
-
"""Input socket: Selection"""
|
|
785
|
-
return self._input("Selection")
|
|
786
|
-
|
|
787
|
-
@property
|
|
788
|
-
def i_instances_as_layers(self) -> bpy.types.NodeSocketBool:
|
|
789
|
-
"""Input socket: Instances as Layers"""
|
|
790
|
-
return self._input("Instances as Layers")
|
|
791
|
-
|
|
792
|
-
@property
|
|
793
|
-
def o_grease_pencil(self) -> NodeSocket:
|
|
794
|
-
"""Output socket: Grease Pencil"""
|
|
795
|
-
return self._output("Grease Pencil")
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
class DeformCurvesOnSurface(NodeBuilder):
|
|
799
|
-
"""Translate and rotate curves based on changes between the object's original and evaluated surface mesh"""
|
|
800
|
-
|
|
801
|
-
name = "GeometryNodeDeformCurvesOnSurface"
|
|
802
|
-
node: bpy.types.GeometryNodeDeformCurvesOnSurface
|
|
803
|
-
|
|
804
|
-
def __init__(self, curves: LINKABLE = None, **kwargs):
|
|
805
|
-
super().__init__()
|
|
806
|
-
key_args = {"Curves": curves}
|
|
807
|
-
key_args.update(kwargs)
|
|
808
|
-
|
|
809
|
-
self._establish_links(**key_args)
|
|
810
|
-
|
|
811
|
-
@property
|
|
812
|
-
def i_curves(self) -> NodeSocket:
|
|
813
|
-
"""Input socket: Curves"""
|
|
814
|
-
return self._input("Curves")
|
|
815
|
-
|
|
816
|
-
@property
|
|
817
|
-
def o_curves(self) -> NodeSocket:
|
|
818
|
-
"""Output socket: Curves"""
|
|
819
|
-
return self._output("Curves")
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
class EdgePathsToCurves(NodeBuilder):
|
|
823
|
-
"""Output curves following paths across mesh edges"""
|
|
824
|
-
|
|
825
|
-
name = "GeometryNodeEdgePathsToCurves"
|
|
826
|
-
node: bpy.types.GeometryNodeEdgePathsToCurves
|
|
827
|
-
|
|
828
|
-
def __init__(
|
|
829
|
-
self,
|
|
830
|
-
mesh: LINKABLE = None,
|
|
831
|
-
start_vertices: TYPE_INPUT_BOOLEAN = True,
|
|
832
|
-
next_vertex_index: int | LINKABLE | None = -1,
|
|
833
|
-
**kwargs,
|
|
834
|
-
):
|
|
835
|
-
super().__init__()
|
|
836
|
-
key_args = {
|
|
837
|
-
"Mesh": mesh,
|
|
838
|
-
"Start Vertices": start_vertices,
|
|
839
|
-
"Next Vertex Index": next_vertex_index,
|
|
840
|
-
}
|
|
841
|
-
key_args.update(kwargs)
|
|
842
|
-
|
|
843
|
-
self._establish_links(**key_args)
|
|
844
|
-
|
|
845
|
-
@property
|
|
846
|
-
def i_mesh(self) -> NodeSocket:
|
|
847
|
-
"""Input socket: Mesh"""
|
|
848
|
-
return self._input("Mesh")
|
|
849
|
-
|
|
850
|
-
@property
|
|
851
|
-
def i_start_vertices(self) -> bpy.types.NodeSocketBool:
|
|
852
|
-
"""Input socket: Start Vertices"""
|
|
853
|
-
return self._input("Start Vertices")
|
|
854
|
-
|
|
855
|
-
@property
|
|
856
|
-
def i_next_vertex_index(self) -> bpy.types.NodeSocketInt:
|
|
857
|
-
"""Input socket: Next Vertex Index"""
|
|
858
|
-
return self._input("Next Vertex Index")
|
|
859
|
-
|
|
860
|
-
@property
|
|
861
|
-
def o_curves(self) -> NodeSocket:
|
|
862
|
-
"""Output socket: Curves"""
|
|
863
|
-
return self._output("Curves")
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
class FillCurve(NodeBuilder):
|
|
867
|
-
"""Generate a mesh on the XY plane with faces on the inside of input curves"""
|
|
868
|
-
|
|
869
|
-
name = "GeometryNodeFillCurve"
|
|
870
|
-
node: bpy.types.GeometryNodeFillCurve
|
|
871
|
-
|
|
872
|
-
def __init__(
|
|
873
|
-
self,
|
|
874
|
-
curve: LINKABLE = None,
|
|
875
|
-
group_id: int | LINKABLE | None = 0,
|
|
876
|
-
mode: LINKABLE | None = "Triangles",
|
|
877
|
-
**kwargs,
|
|
878
|
-
):
|
|
879
|
-
super().__init__()
|
|
880
|
-
key_args = {"Curve": curve, "Group ID": group_id, "Mode": mode}
|
|
881
|
-
key_args.update(kwargs)
|
|
882
|
-
|
|
883
|
-
self._establish_links(**key_args)
|
|
884
|
-
|
|
885
|
-
@property
|
|
886
|
-
def i_curve(self) -> NodeSocket:
|
|
887
|
-
"""Input socket: Curve"""
|
|
888
|
-
return self._input("Curve")
|
|
889
|
-
|
|
890
|
-
@property
|
|
891
|
-
def i_group_id(self) -> bpy.types.NodeSocketInt:
|
|
892
|
-
"""Input socket: Group ID"""
|
|
893
|
-
return self._input("Group ID")
|
|
894
|
-
|
|
895
|
-
@property
|
|
896
|
-
def i_mode(self) -> NodeSocket:
|
|
897
|
-
"""Input socket: Mode"""
|
|
898
|
-
return self._input("Mode")
|
|
899
|
-
|
|
900
|
-
@property
|
|
901
|
-
def o_mesh(self) -> NodeSocket:
|
|
902
|
-
"""Output socket: Mesh"""
|
|
903
|
-
return self._output("Mesh")
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
class FilletCurve(NodeBuilder):
|
|
907
|
-
"""Round corners by generating circular arcs on each control point"""
|
|
908
|
-
|
|
909
|
-
name = "GeometryNodeFilletCurve"
|
|
910
|
-
node: bpy.types.GeometryNodeFilletCurve
|
|
911
|
-
|
|
912
|
-
def __init__(
|
|
913
|
-
self,
|
|
914
|
-
curve: LINKABLE = None,
|
|
915
|
-
radius: LINKABLE | None = 0.25,
|
|
916
|
-
limit_radius: TYPE_INPUT_BOOLEAN = False,
|
|
917
|
-
mode: LINKABLE | None = "Bézier",
|
|
918
|
-
count: int | LINKABLE | None = 1,
|
|
919
|
-
**kwargs,
|
|
920
|
-
):
|
|
921
|
-
super().__init__()
|
|
922
|
-
key_args = {
|
|
923
|
-
"Curve": curve,
|
|
924
|
-
"Radius": radius,
|
|
925
|
-
"Limit Radius": limit_radius,
|
|
926
|
-
"Mode": mode,
|
|
927
|
-
"Count": count,
|
|
928
|
-
}
|
|
929
|
-
key_args.update(kwargs)
|
|
930
|
-
|
|
931
|
-
self._establish_links(**key_args)
|
|
932
|
-
|
|
933
|
-
@property
|
|
934
|
-
def i_curve(self) -> NodeSocket:
|
|
935
|
-
"""Input socket: Curve"""
|
|
936
|
-
return self._input("Curve")
|
|
937
|
-
|
|
938
|
-
@property
|
|
939
|
-
def i_radius(self) -> NodeSocket:
|
|
940
|
-
"""Input socket: Radius"""
|
|
941
|
-
return self._input("Radius")
|
|
942
|
-
|
|
943
|
-
@property
|
|
944
|
-
def i_limit_radius(self) -> bpy.types.NodeSocketBool:
|
|
945
|
-
"""Input socket: Limit Radius"""
|
|
946
|
-
return self._input("Limit Radius")
|
|
947
|
-
|
|
948
|
-
@property
|
|
949
|
-
def i_mode(self) -> NodeSocket:
|
|
950
|
-
"""Input socket: Mode"""
|
|
951
|
-
return self._input("Mode")
|
|
952
|
-
|
|
953
|
-
@property
|
|
954
|
-
def i_count(self) -> bpy.types.NodeSocketInt:
|
|
955
|
-
"""Input socket: Count"""
|
|
956
|
-
return self._input("Count")
|
|
957
|
-
|
|
958
|
-
@property
|
|
959
|
-
def o_curve(self) -> NodeSocket:
|
|
960
|
-
"""Output socket: Curve"""
|
|
961
|
-
return self._output("Curve")
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
class GreasePencilToCurves(NodeBuilder):
|
|
965
|
-
"""Convert Grease Pencil layers into curve instances"""
|
|
966
|
-
|
|
967
|
-
name = "GeometryNodeGreasePencilToCurves"
|
|
968
|
-
node: bpy.types.GeometryNodeGreasePencilToCurves
|
|
969
|
-
|
|
970
|
-
def __init__(
|
|
971
|
-
self,
|
|
972
|
-
grease_pencil: LINKABLE = None,
|
|
973
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
974
|
-
layers_as_instances: TYPE_INPUT_BOOLEAN = True,
|
|
975
|
-
**kwargs,
|
|
976
|
-
):
|
|
977
|
-
super().__init__()
|
|
978
|
-
key_args = {
|
|
979
|
-
"Grease Pencil": grease_pencil,
|
|
980
|
-
"Selection": selection,
|
|
981
|
-
"Layers as Instances": layers_as_instances,
|
|
982
|
-
}
|
|
983
|
-
key_args.update(kwargs)
|
|
984
|
-
|
|
985
|
-
self._establish_links(**key_args)
|
|
986
|
-
|
|
987
|
-
@property
|
|
988
|
-
def i_grease_pencil(self) -> NodeSocket:
|
|
989
|
-
"""Input socket: Grease Pencil"""
|
|
990
|
-
return self._input("Grease Pencil")
|
|
991
|
-
|
|
992
|
-
@property
|
|
993
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
994
|
-
"""Input socket: Selection"""
|
|
995
|
-
return self._input("Selection")
|
|
996
|
-
|
|
997
|
-
@property
|
|
998
|
-
def i_layers_as_instances(self) -> bpy.types.NodeSocketBool:
|
|
999
|
-
"""Input socket: Layers as Instances"""
|
|
1000
|
-
return self._input("Layers as Instances")
|
|
1001
|
-
|
|
1002
|
-
@property
|
|
1003
|
-
def o_curves(self) -> NodeSocket:
|
|
1004
|
-
"""Output socket: Curves"""
|
|
1005
|
-
return self._output("Curves")
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
class CurveHandlePositions(NodeBuilder):
|
|
1009
|
-
"""Retrieve the position of each Bézier control point's handles"""
|
|
1010
|
-
|
|
1011
|
-
name = "GeometryNodeInputCurveHandlePositions"
|
|
1012
|
-
node: bpy.types.GeometryNodeInputCurveHandlePositions
|
|
1013
|
-
|
|
1014
|
-
def __init__(self, relative: TYPE_INPUT_BOOLEAN = False, **kwargs):
|
|
1015
|
-
super().__init__()
|
|
1016
|
-
key_args = {"Relative": relative}
|
|
1017
|
-
key_args.update(kwargs)
|
|
1018
|
-
|
|
1019
|
-
self._establish_links(**key_args)
|
|
1020
|
-
|
|
1021
|
-
@property
|
|
1022
|
-
def i_relative(self) -> bpy.types.NodeSocketBool:
|
|
1023
|
-
"""Input socket: Relative"""
|
|
1024
|
-
return self._input("Relative")
|
|
1025
|
-
|
|
1026
|
-
@property
|
|
1027
|
-
def o_left(self) -> bpy.types.NodeSocketVector:
|
|
1028
|
-
"""Output socket: Left"""
|
|
1029
|
-
return self._output("Left")
|
|
1030
|
-
|
|
1031
|
-
@property
|
|
1032
|
-
def o_right(self) -> bpy.types.NodeSocketVector:
|
|
1033
|
-
"""Output socket: Right"""
|
|
1034
|
-
return self._output("Right")
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
class CurveTilt(NodeBuilder):
|
|
1038
|
-
"""Retrieve the angle at each control point used to twist the curve's normal around its tangent"""
|
|
1039
|
-
|
|
1040
|
-
name = "GeometryNodeInputCurveTilt"
|
|
1041
|
-
node: bpy.types.GeometryNodeInputCurveTilt
|
|
1042
|
-
|
|
1043
|
-
def __init__(self, **kwargs):
|
|
1044
|
-
super().__init__()
|
|
1045
|
-
key_args = kwargs
|
|
1046
|
-
|
|
1047
|
-
self._establish_links(**key_args)
|
|
1048
|
-
|
|
1049
|
-
@property
|
|
1050
|
-
def o_tilt(self) -> bpy.types.NodeSocketFloat:
|
|
1051
|
-
"""Output socket: Tilt"""
|
|
1052
|
-
return self._output("Tilt")
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
class InterpolateCurves(NodeBuilder):
|
|
1056
|
-
"""Generate new curves on points by interpolating between existing curves"""
|
|
1057
|
-
|
|
1058
|
-
name = "GeometryNodeInterpolateCurves"
|
|
1059
|
-
node: bpy.types.GeometryNodeInterpolateCurves
|
|
1060
|
-
|
|
1061
|
-
def __init__(
|
|
1062
|
-
self,
|
|
1063
|
-
guide_curves: LINKABLE = None,
|
|
1064
|
-
guide_up: TYPE_INPUT_VECTOR = [0.0, 0.0, 0.0],
|
|
1065
|
-
guide_group_id: int | LINKABLE | None = 0,
|
|
1066
|
-
points: LINKABLE = None,
|
|
1067
|
-
point_up: TYPE_INPUT_VECTOR = [0.0, 0.0, 0.0],
|
|
1068
|
-
point_group_id: int | LINKABLE | None = 0,
|
|
1069
|
-
max_neighbors: int | LINKABLE | None = 4,
|
|
1070
|
-
**kwargs,
|
|
1071
|
-
):
|
|
1072
|
-
super().__init__()
|
|
1073
|
-
key_args = {
|
|
1074
|
-
"Guide Curves": guide_curves,
|
|
1075
|
-
"Guide Up": guide_up,
|
|
1076
|
-
"Guide Group ID": guide_group_id,
|
|
1077
|
-
"Points": points,
|
|
1078
|
-
"Point Up": point_up,
|
|
1079
|
-
"Point Group ID": point_group_id,
|
|
1080
|
-
"Max Neighbors": max_neighbors,
|
|
1081
|
-
}
|
|
1082
|
-
key_args.update(kwargs)
|
|
1083
|
-
|
|
1084
|
-
self._establish_links(**key_args)
|
|
1085
|
-
|
|
1086
|
-
@property
|
|
1087
|
-
def i_guide_curves(self) -> NodeSocket:
|
|
1088
|
-
"""Input socket: Guide Curves"""
|
|
1089
|
-
return self._input("Guide Curves")
|
|
1090
|
-
|
|
1091
|
-
@property
|
|
1092
|
-
def i_guide_up(self) -> bpy.types.NodeSocketVector:
|
|
1093
|
-
"""Input socket: Guide Up"""
|
|
1094
|
-
return self._input("Guide Up")
|
|
1095
|
-
|
|
1096
|
-
@property
|
|
1097
|
-
def i_guide_group_id(self) -> bpy.types.NodeSocketInt:
|
|
1098
|
-
"""Input socket: Guide Group ID"""
|
|
1099
|
-
return self._input("Guide Group ID")
|
|
1100
|
-
|
|
1101
|
-
@property
|
|
1102
|
-
def i_points(self) -> NodeSocket:
|
|
1103
|
-
"""Input socket: Points"""
|
|
1104
|
-
return self._input("Points")
|
|
1105
|
-
|
|
1106
|
-
@property
|
|
1107
|
-
def i_point_up(self) -> bpy.types.NodeSocketVector:
|
|
1108
|
-
"""Input socket: Point Up"""
|
|
1109
|
-
return self._input("Point Up")
|
|
1110
|
-
|
|
1111
|
-
@property
|
|
1112
|
-
def i_point_group_id(self) -> bpy.types.NodeSocketInt:
|
|
1113
|
-
"""Input socket: Point Group ID"""
|
|
1114
|
-
return self._input("Point Group ID")
|
|
1115
|
-
|
|
1116
|
-
@property
|
|
1117
|
-
def i_max_neighbors(self) -> bpy.types.NodeSocketInt:
|
|
1118
|
-
"""Input socket: Max Neighbors"""
|
|
1119
|
-
return self._input("Max Neighbors")
|
|
1120
|
-
|
|
1121
|
-
@property
|
|
1122
|
-
def o_curves(self) -> NodeSocket:
|
|
1123
|
-
"""Output socket: Curves"""
|
|
1124
|
-
return self._output("Curves")
|
|
1125
|
-
|
|
1126
|
-
@property
|
|
1127
|
-
def o_closest_index(self) -> bpy.types.NodeSocketInt:
|
|
1128
|
-
"""Output socket: Closest Index"""
|
|
1129
|
-
return self._output("Closest Index")
|
|
1130
|
-
|
|
1131
|
-
@property
|
|
1132
|
-
def o_closest_weight(self) -> bpy.types.NodeSocketFloat:
|
|
1133
|
-
"""Output socket: Closest Weight"""
|
|
1134
|
-
return self._output("Closest Weight")
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
class OffsetPointInCurve(NodeBuilder):
|
|
1138
|
-
"""Offset a control point index within its curve"""
|
|
1139
|
-
|
|
1140
|
-
name = "GeometryNodeOffsetPointInCurve"
|
|
1141
|
-
node: bpy.types.GeometryNodeOffsetPointInCurve
|
|
1142
|
-
|
|
1143
|
-
def __init__(
|
|
1144
|
-
self,
|
|
1145
|
-
point_index: int | LINKABLE | None = 0,
|
|
1146
|
-
offset: int | LINKABLE | None = 0,
|
|
1147
|
-
**kwargs,
|
|
1148
|
-
):
|
|
1149
|
-
super().__init__()
|
|
1150
|
-
key_args = {"Point Index": point_index, "Offset": offset}
|
|
1151
|
-
key_args.update(kwargs)
|
|
1152
|
-
|
|
1153
|
-
self._establish_links(**key_args)
|
|
1154
|
-
|
|
1155
|
-
@property
|
|
1156
|
-
def i_point_index(self) -> bpy.types.NodeSocketInt:
|
|
1157
|
-
"""Input socket: Point Index"""
|
|
1158
|
-
return self._input("Point Index")
|
|
1159
|
-
|
|
1160
|
-
@property
|
|
1161
|
-
def i_offset(self) -> bpy.types.NodeSocketInt:
|
|
1162
|
-
"""Input socket: Offset"""
|
|
1163
|
-
return self._input("Offset")
|
|
1164
|
-
|
|
1165
|
-
@property
|
|
1166
|
-
def o_is_valid_offset(self) -> bpy.types.NodeSocketBool:
|
|
1167
|
-
"""Output socket: Is Valid Offset"""
|
|
1168
|
-
return self._output("Is Valid Offset")
|
|
1169
|
-
|
|
1170
|
-
@property
|
|
1171
|
-
def o_point_index(self) -> bpy.types.NodeSocketInt:
|
|
1172
|
-
"""Output socket: Point Index"""
|
|
1173
|
-
return self._output("Point Index")
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
class PointsOfCurve(NodeBuilder):
|
|
1177
|
-
"""Retrieve a point index within a curve"""
|
|
1178
|
-
|
|
1179
|
-
name = "GeometryNodePointsOfCurve"
|
|
1180
|
-
node: bpy.types.GeometryNodePointsOfCurve
|
|
1181
|
-
|
|
1182
|
-
def __init__(
|
|
1183
|
-
self,
|
|
1184
|
-
curve_index: int | LINKABLE | None = 0,
|
|
1185
|
-
weights: float | LINKABLE | None = 0.0,
|
|
1186
|
-
sort_index: int | LINKABLE | None = 0,
|
|
1187
|
-
**kwargs,
|
|
1188
|
-
):
|
|
1189
|
-
super().__init__()
|
|
1190
|
-
key_args = {
|
|
1191
|
-
"Curve Index": curve_index,
|
|
1192
|
-
"Weights": weights,
|
|
1193
|
-
"Sort Index": sort_index,
|
|
1194
|
-
}
|
|
1195
|
-
key_args.update(kwargs)
|
|
1196
|
-
|
|
1197
|
-
self._establish_links(**key_args)
|
|
1198
|
-
|
|
1199
|
-
@property
|
|
1200
|
-
def i_curve_index(self) -> bpy.types.NodeSocketInt:
|
|
1201
|
-
"""Input socket: Curve Index"""
|
|
1202
|
-
return self._input("Curve Index")
|
|
1203
|
-
|
|
1204
|
-
@property
|
|
1205
|
-
def i_weights(self) -> bpy.types.NodeSocketFloat:
|
|
1206
|
-
"""Input socket: Weights"""
|
|
1207
|
-
return self._input("Weights")
|
|
1208
|
-
|
|
1209
|
-
@property
|
|
1210
|
-
def i_sort_index(self) -> bpy.types.NodeSocketInt:
|
|
1211
|
-
"""Input socket: Sort Index"""
|
|
1212
|
-
return self._input("Sort Index")
|
|
1213
|
-
|
|
1214
|
-
@property
|
|
1215
|
-
def o_point_index(self) -> bpy.types.NodeSocketInt:
|
|
1216
|
-
"""Output socket: Point Index"""
|
|
1217
|
-
return self._output("Point Index")
|
|
1218
|
-
|
|
1219
|
-
@property
|
|
1220
|
-
def o_total(self) -> bpy.types.NodeSocketInt:
|
|
1221
|
-
"""Output socket: Total"""
|
|
1222
|
-
return self._output("Total")
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
class PointsToCurves(NodeBuilder):
|
|
1226
|
-
"""Split all points to curve by its group ID and reorder by weight"""
|
|
1227
|
-
|
|
1228
|
-
name = "GeometryNodePointsToCurves"
|
|
1229
|
-
node: bpy.types.GeometryNodePointsToCurves
|
|
1230
|
-
|
|
1231
|
-
def __init__(
|
|
1232
|
-
self,
|
|
1233
|
-
points: LINKABLE = None,
|
|
1234
|
-
curve_group_id: int | LINKABLE | None = 0,
|
|
1235
|
-
weight: float | LINKABLE | None = 0.0,
|
|
1236
|
-
**kwargs,
|
|
1237
|
-
):
|
|
1238
|
-
super().__init__()
|
|
1239
|
-
key_args = {
|
|
1240
|
-
"Points": points,
|
|
1241
|
-
"Curve Group ID": curve_group_id,
|
|
1242
|
-
"Weight": weight,
|
|
1243
|
-
}
|
|
1244
|
-
key_args.update(kwargs)
|
|
1245
|
-
|
|
1246
|
-
self._establish_links(**key_args)
|
|
1247
|
-
|
|
1248
|
-
@property
|
|
1249
|
-
def i_points(self) -> NodeSocket:
|
|
1250
|
-
"""Input socket: Points"""
|
|
1251
|
-
return self._input("Points")
|
|
1252
|
-
|
|
1253
|
-
@property
|
|
1254
|
-
def i_curve_group_id(self) -> bpy.types.NodeSocketInt:
|
|
1255
|
-
"""Input socket: Curve Group ID"""
|
|
1256
|
-
return self._input("Curve Group ID")
|
|
1257
|
-
|
|
1258
|
-
@property
|
|
1259
|
-
def i_weight(self) -> bpy.types.NodeSocketFloat:
|
|
1260
|
-
"""Input socket: Weight"""
|
|
1261
|
-
return self._input("Weight")
|
|
1262
|
-
|
|
1263
|
-
@property
|
|
1264
|
-
def o_curves(self) -> NodeSocket:
|
|
1265
|
-
"""Output socket: Curves"""
|
|
1266
|
-
return self._output("Curves")
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
class ResampleCurve(NodeBuilder):
|
|
1270
|
-
"""Generate a poly spline for each input spline"""
|
|
1271
|
-
|
|
1272
|
-
name = "GeometryNodeResampleCurve"
|
|
1273
|
-
node: bpy.types.GeometryNodeResampleCurve
|
|
1274
|
-
|
|
1275
|
-
def __init__(
|
|
1276
|
-
self,
|
|
1277
|
-
curve: LINKABLE = None,
|
|
1278
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
1279
|
-
mode: LINKABLE | None = "Count",
|
|
1280
|
-
count: int | LINKABLE | None = 10,
|
|
1281
|
-
length: LINKABLE | None = 0.10000000149011612,
|
|
1282
|
-
keep_last_segment: bool = False,
|
|
1283
|
-
**kwargs,
|
|
1284
|
-
):
|
|
1285
|
-
super().__init__()
|
|
1286
|
-
key_args = {
|
|
1287
|
-
"Curve": curve,
|
|
1288
|
-
"Selection": selection,
|
|
1289
|
-
"Mode": mode,
|
|
1290
|
-
"Count": count,
|
|
1291
|
-
"Length": length,
|
|
1292
|
-
}
|
|
1293
|
-
key_args.update(kwargs)
|
|
1294
|
-
self.keep_last_segment = keep_last_segment
|
|
1295
|
-
self._establish_links(**key_args)
|
|
1296
|
-
|
|
1297
|
-
@property
|
|
1298
|
-
def i_curve(self) -> NodeSocket:
|
|
1299
|
-
"""Input socket: Curve"""
|
|
1300
|
-
return self._input("Curve")
|
|
1301
|
-
|
|
1302
|
-
@property
|
|
1303
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
1304
|
-
"""Input socket: Selection"""
|
|
1305
|
-
return self._input("Selection")
|
|
1306
|
-
|
|
1307
|
-
@property
|
|
1308
|
-
def i_mode(self) -> NodeSocket:
|
|
1309
|
-
"""Input socket: Mode"""
|
|
1310
|
-
return self._input("Mode")
|
|
1311
|
-
|
|
1312
|
-
@property
|
|
1313
|
-
def i_count(self) -> bpy.types.NodeSocketInt:
|
|
1314
|
-
"""Input socket: Count"""
|
|
1315
|
-
return self._input("Count")
|
|
1316
|
-
|
|
1317
|
-
@property
|
|
1318
|
-
def i_length(self) -> NodeSocket:
|
|
1319
|
-
"""Input socket: Length"""
|
|
1320
|
-
return self._input("Length")
|
|
1321
|
-
|
|
1322
|
-
@property
|
|
1323
|
-
def o_curve(self) -> NodeSocket:
|
|
1324
|
-
"""Output socket: Curve"""
|
|
1325
|
-
return self._output("Curve")
|
|
1326
|
-
|
|
1327
|
-
@property
|
|
1328
|
-
def keep_last_segment(self) -> bool:
|
|
1329
|
-
return self.node.keep_last_segment
|
|
1330
|
-
|
|
1331
|
-
@keep_last_segment.setter
|
|
1332
|
-
def keep_last_segment(self, value: bool):
|
|
1333
|
-
self.node.keep_last_segment = value
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
class ReverseCurve(NodeBuilder):
|
|
1337
|
-
"""Change the direction of curves by swapping their start and end data"""
|
|
1338
|
-
|
|
1339
|
-
name = "GeometryNodeReverseCurve"
|
|
1340
|
-
node: bpy.types.GeometryNodeReverseCurve
|
|
1341
|
-
|
|
1342
|
-
def __init__(
|
|
1343
|
-
self, curve: LINKABLE = None, selection: TYPE_INPUT_BOOLEAN = True, **kwargs
|
|
1344
|
-
):
|
|
1345
|
-
super().__init__()
|
|
1346
|
-
key_args = {"Curve": curve, "Selection": selection}
|
|
1347
|
-
key_args.update(kwargs)
|
|
1348
|
-
|
|
1349
|
-
self._establish_links(**key_args)
|
|
1350
|
-
|
|
1351
|
-
@property
|
|
1352
|
-
def i_curve(self) -> NodeSocket:
|
|
1353
|
-
"""Input socket: Curve"""
|
|
1354
|
-
return self._input("Curve")
|
|
1355
|
-
|
|
1356
|
-
@property
|
|
1357
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
1358
|
-
"""Input socket: Selection"""
|
|
1359
|
-
return self._input("Selection")
|
|
1360
|
-
|
|
1361
|
-
@property
|
|
1362
|
-
def o_curve(self) -> NodeSocket:
|
|
1363
|
-
"""Output socket: Curve"""
|
|
1364
|
-
return self._output("Curve")
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
class SampleCurve(NodeBuilder):
|
|
1368
|
-
"""Retrieve data from a point on a curve at a certain distance from its start"""
|
|
1369
|
-
|
|
1370
|
-
name = "GeometryNodeSampleCurve"
|
|
1371
|
-
node: bpy.types.GeometryNodeSampleCurve
|
|
1372
|
-
|
|
1373
|
-
def __init__(
|
|
1374
|
-
self,
|
|
1375
|
-
curves: LINKABLE = None,
|
|
1376
|
-
value: float | LINKABLE | None = 0.0,
|
|
1377
|
-
factor: LINKABLE | None = 0.0,
|
|
1378
|
-
curve_index: int | LINKABLE | None = 0,
|
|
1379
|
-
mode: Literal["FACTOR", "LENGTH"] = "FACTOR",
|
|
1380
|
-
use_all_curves: bool = False,
|
|
1381
|
-
data_type: Literal[
|
|
1382
|
-
"FLOAT",
|
|
1383
|
-
"INT",
|
|
1384
|
-
"BOOLEAN",
|
|
1385
|
-
"FLOAT_VECTOR",
|
|
1386
|
-
"FLOAT_COLOR",
|
|
1387
|
-
"QUATERNION",
|
|
1388
|
-
"FLOAT4X4",
|
|
1389
|
-
"STRING",
|
|
1390
|
-
"INT8",
|
|
1391
|
-
"INT16_2D",
|
|
1392
|
-
"INT32_2D",
|
|
1393
|
-
"FLOAT2",
|
|
1394
|
-
"BYTE_COLOR",
|
|
1395
|
-
] = "FLOAT",
|
|
1396
|
-
**kwargs,
|
|
1397
|
-
):
|
|
1398
|
-
super().__init__()
|
|
1399
|
-
key_args = {
|
|
1400
|
-
"Curves": curves,
|
|
1401
|
-
"Value": value,
|
|
1402
|
-
"Factor": factor,
|
|
1403
|
-
"Curve Index": curve_index,
|
|
1404
|
-
}
|
|
1405
|
-
key_args.update(kwargs)
|
|
1406
|
-
self.mode = mode
|
|
1407
|
-
self.use_all_curves = use_all_curves
|
|
1408
|
-
self.data_type = data_type
|
|
1409
|
-
self._establish_links(**key_args)
|
|
1410
|
-
|
|
1411
|
-
@property
|
|
1412
|
-
def i_curves(self) -> NodeSocket:
|
|
1413
|
-
"""Input socket: Curves"""
|
|
1414
|
-
return self._input("Curves")
|
|
1415
|
-
|
|
1416
|
-
@property
|
|
1417
|
-
def i_value(self) -> bpy.types.NodeSocketFloat:
|
|
1418
|
-
"""Input socket: Value"""
|
|
1419
|
-
return self._input("Value")
|
|
1420
|
-
|
|
1421
|
-
@property
|
|
1422
|
-
def i_factor(self) -> NodeSocket:
|
|
1423
|
-
"""Input socket: Factor"""
|
|
1424
|
-
return self._input("Factor")
|
|
1425
|
-
|
|
1426
|
-
@property
|
|
1427
|
-
def i_curve_index(self) -> bpy.types.NodeSocketInt:
|
|
1428
|
-
"""Input socket: Curve Index"""
|
|
1429
|
-
return self._input("Curve Index")
|
|
1430
|
-
|
|
1431
|
-
@property
|
|
1432
|
-
def o_value(self) -> bpy.types.NodeSocketFloat:
|
|
1433
|
-
"""Output socket: Value"""
|
|
1434
|
-
return self._output("Value")
|
|
1435
|
-
|
|
1436
|
-
@property
|
|
1437
|
-
def o_position(self) -> bpy.types.NodeSocketVector:
|
|
1438
|
-
"""Output socket: Position"""
|
|
1439
|
-
return self._output("Position")
|
|
1440
|
-
|
|
1441
|
-
@property
|
|
1442
|
-
def o_tangent(self) -> bpy.types.NodeSocketVector:
|
|
1443
|
-
"""Output socket: Tangent"""
|
|
1444
|
-
return self._output("Tangent")
|
|
1445
|
-
|
|
1446
|
-
@property
|
|
1447
|
-
def o_normal(self) -> bpy.types.NodeSocketVector:
|
|
1448
|
-
"""Output socket: Normal"""
|
|
1449
|
-
return self._output("Normal")
|
|
1450
|
-
|
|
1451
|
-
@property
|
|
1452
|
-
def mode(self) -> Literal["FACTOR", "LENGTH"]:
|
|
1453
|
-
return self.node.mode
|
|
1454
|
-
|
|
1455
|
-
@mode.setter
|
|
1456
|
-
def mode(self, value: Literal["FACTOR", "LENGTH"]):
|
|
1457
|
-
self.node.mode = value
|
|
1458
|
-
|
|
1459
|
-
@property
|
|
1460
|
-
def use_all_curves(self) -> bool:
|
|
1461
|
-
return self.node.use_all_curves
|
|
1462
|
-
|
|
1463
|
-
@use_all_curves.setter
|
|
1464
|
-
def use_all_curves(self, value: bool):
|
|
1465
|
-
self.node.use_all_curves = value
|
|
1466
|
-
|
|
1467
|
-
@property
|
|
1468
|
-
def data_type(
|
|
1469
|
-
self,
|
|
1470
|
-
) -> Literal[
|
|
1471
|
-
"FLOAT",
|
|
1472
|
-
"INT",
|
|
1473
|
-
"BOOLEAN",
|
|
1474
|
-
"FLOAT_VECTOR",
|
|
1475
|
-
"FLOAT_COLOR",
|
|
1476
|
-
"QUATERNION",
|
|
1477
|
-
"FLOAT4X4",
|
|
1478
|
-
"STRING",
|
|
1479
|
-
"INT8",
|
|
1480
|
-
"INT16_2D",
|
|
1481
|
-
"INT32_2D",
|
|
1482
|
-
"FLOAT2",
|
|
1483
|
-
"BYTE_COLOR",
|
|
1484
|
-
]:
|
|
1485
|
-
return self.node.data_type
|
|
1486
|
-
|
|
1487
|
-
@data_type.setter
|
|
1488
|
-
def data_type(
|
|
1489
|
-
self,
|
|
1490
|
-
value: Literal[
|
|
1491
|
-
"FLOAT",
|
|
1492
|
-
"INT",
|
|
1493
|
-
"BOOLEAN",
|
|
1494
|
-
"FLOAT_VECTOR",
|
|
1495
|
-
"FLOAT_COLOR",
|
|
1496
|
-
"QUATERNION",
|
|
1497
|
-
"FLOAT4X4",
|
|
1498
|
-
"STRING",
|
|
1499
|
-
"INT8",
|
|
1500
|
-
"INT16_2D",
|
|
1501
|
-
"INT32_2D",
|
|
1502
|
-
"FLOAT2",
|
|
1503
|
-
"BYTE_COLOR",
|
|
1504
|
-
],
|
|
1505
|
-
):
|
|
1506
|
-
self.node.data_type = value
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
class SetHandlePositions(NodeBuilder):
|
|
1510
|
-
"""Set the positions for the handles of Bézier curves"""
|
|
1511
|
-
|
|
1512
|
-
name = "GeometryNodeSetCurveHandlePositions"
|
|
1513
|
-
node: bpy.types.GeometryNodeSetCurveHandlePositions
|
|
1514
|
-
|
|
1515
|
-
def __init__(
|
|
1516
|
-
self,
|
|
1517
|
-
curve: LINKABLE = None,
|
|
1518
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
1519
|
-
position: TYPE_INPUT_VECTOR = [0.0, 0.0, 0.0],
|
|
1520
|
-
offset: LINKABLE | None = [0.0, 0.0, 0.0],
|
|
1521
|
-
mode: Literal["LEFT", "RIGHT"] = "LEFT",
|
|
1522
|
-
**kwargs,
|
|
1523
|
-
):
|
|
1524
|
-
super().__init__()
|
|
1525
|
-
key_args = {
|
|
1526
|
-
"Curve": curve,
|
|
1527
|
-
"Selection": selection,
|
|
1528
|
-
"Position": position,
|
|
1529
|
-
"Offset": offset,
|
|
1530
|
-
}
|
|
1531
|
-
key_args.update(kwargs)
|
|
1532
|
-
self.mode = mode
|
|
1533
|
-
self._establish_links(**key_args)
|
|
1534
|
-
|
|
1535
|
-
@property
|
|
1536
|
-
def i_curve(self) -> NodeSocket:
|
|
1537
|
-
"""Input socket: Curve"""
|
|
1538
|
-
return self._input("Curve")
|
|
1539
|
-
|
|
1540
|
-
@property
|
|
1541
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
1542
|
-
"""Input socket: Selection"""
|
|
1543
|
-
return self._input("Selection")
|
|
1544
|
-
|
|
1545
|
-
@property
|
|
1546
|
-
def i_position(self) -> bpy.types.NodeSocketVector:
|
|
1547
|
-
"""Input socket: Position"""
|
|
1548
|
-
return self._input("Position")
|
|
1549
|
-
|
|
1550
|
-
@property
|
|
1551
|
-
def i_offset(self) -> NodeSocket:
|
|
1552
|
-
"""Input socket: Offset"""
|
|
1553
|
-
return self._input("Offset")
|
|
1554
|
-
|
|
1555
|
-
@property
|
|
1556
|
-
def o_curve(self) -> NodeSocket:
|
|
1557
|
-
"""Output socket: Curve"""
|
|
1558
|
-
return self._output("Curve")
|
|
1559
|
-
|
|
1560
|
-
@property
|
|
1561
|
-
def mode(self) -> Literal["LEFT", "RIGHT"]:
|
|
1562
|
-
return self.node.mode
|
|
1563
|
-
|
|
1564
|
-
@mode.setter
|
|
1565
|
-
def mode(self, value: Literal["LEFT", "RIGHT"]):
|
|
1566
|
-
self.node.mode = value
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
class SetCurveNormal(NodeBuilder):
|
|
1570
|
-
"""Set the evaluation mode for curve normals"""
|
|
1571
|
-
|
|
1572
|
-
name = "GeometryNodeSetCurveNormal"
|
|
1573
|
-
node: bpy.types.GeometryNodeSetCurveNormal
|
|
1574
|
-
|
|
1575
|
-
def __init__(
|
|
1576
|
-
self,
|
|
1577
|
-
curve: LINKABLE = None,
|
|
1578
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
1579
|
-
mode: LINKABLE | None = "Minimum Twist",
|
|
1580
|
-
normal: LINKABLE | None = [0.0, 0.0, 1.0],
|
|
1581
|
-
**kwargs,
|
|
1582
|
-
):
|
|
1583
|
-
super().__init__()
|
|
1584
|
-
key_args = {
|
|
1585
|
-
"Curve": curve,
|
|
1586
|
-
"Selection": selection,
|
|
1587
|
-
"Mode": mode,
|
|
1588
|
-
"Normal": normal,
|
|
1589
|
-
}
|
|
1590
|
-
key_args.update(kwargs)
|
|
1591
|
-
|
|
1592
|
-
self._establish_links(**key_args)
|
|
1593
|
-
|
|
1594
|
-
@property
|
|
1595
|
-
def i_curve(self) -> NodeSocket:
|
|
1596
|
-
"""Input socket: Curve"""
|
|
1597
|
-
return self._input("Curve")
|
|
1598
|
-
|
|
1599
|
-
@property
|
|
1600
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
1601
|
-
"""Input socket: Selection"""
|
|
1602
|
-
return self._input("Selection")
|
|
1603
|
-
|
|
1604
|
-
@property
|
|
1605
|
-
def i_mode(self) -> NodeSocket:
|
|
1606
|
-
"""Input socket: Mode"""
|
|
1607
|
-
return self._input("Mode")
|
|
1608
|
-
|
|
1609
|
-
@property
|
|
1610
|
-
def i_normal(self) -> NodeSocket:
|
|
1611
|
-
"""Input socket: Normal"""
|
|
1612
|
-
return self._input("Normal")
|
|
1613
|
-
|
|
1614
|
-
@property
|
|
1615
|
-
def o_curve(self) -> NodeSocket:
|
|
1616
|
-
"""Output socket: Curve"""
|
|
1617
|
-
return self._output("Curve")
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
class SetCurveRadius(NodeBuilder):
|
|
1621
|
-
"""Set the radius of the curve at each control point"""
|
|
1622
|
-
|
|
1623
|
-
name = "GeometryNodeSetCurveRadius"
|
|
1624
|
-
node: bpy.types.GeometryNodeSetCurveRadius
|
|
1625
|
-
|
|
1626
|
-
def __init__(
|
|
1627
|
-
self,
|
|
1628
|
-
curve: LINKABLE = None,
|
|
1629
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
1630
|
-
radius: LINKABLE | None = 0.004999999888241291,
|
|
1631
|
-
**kwargs,
|
|
1632
|
-
):
|
|
1633
|
-
super().__init__()
|
|
1634
|
-
key_args = {"Curve": curve, "Selection": selection, "Radius": radius}
|
|
1635
|
-
key_args.update(kwargs)
|
|
1636
|
-
|
|
1637
|
-
self._establish_links(**key_args)
|
|
1638
|
-
|
|
1639
|
-
@property
|
|
1640
|
-
def i_curve(self) -> NodeSocket:
|
|
1641
|
-
"""Input socket: Curve"""
|
|
1642
|
-
return self._input("Curve")
|
|
1643
|
-
|
|
1644
|
-
@property
|
|
1645
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
1646
|
-
"""Input socket: Selection"""
|
|
1647
|
-
return self._input("Selection")
|
|
1648
|
-
|
|
1649
|
-
@property
|
|
1650
|
-
def i_radius(self) -> NodeSocket:
|
|
1651
|
-
"""Input socket: Radius"""
|
|
1652
|
-
return self._input("Radius")
|
|
1653
|
-
|
|
1654
|
-
@property
|
|
1655
|
-
def o_curve(self) -> NodeSocket:
|
|
1656
|
-
"""Output socket: Curve"""
|
|
1657
|
-
return self._output("Curve")
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
class SetCurveTilt(NodeBuilder):
|
|
1661
|
-
"""Set the tilt angle at each curve control point"""
|
|
1662
|
-
|
|
1663
|
-
name = "GeometryNodeSetCurveTilt"
|
|
1664
|
-
node: bpy.types.GeometryNodeSetCurveTilt
|
|
1665
|
-
|
|
1666
|
-
def __init__(
|
|
1667
|
-
self,
|
|
1668
|
-
curve: LINKABLE = None,
|
|
1669
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
1670
|
-
tilt: LINKABLE | None = 0.0,
|
|
1671
|
-
**kwargs,
|
|
1672
|
-
):
|
|
1673
|
-
super().__init__()
|
|
1674
|
-
key_args = {"Curve": curve, "Selection": selection, "Tilt": tilt}
|
|
1675
|
-
key_args.update(kwargs)
|
|
1676
|
-
|
|
1677
|
-
self._establish_links(**key_args)
|
|
1678
|
-
|
|
1679
|
-
@property
|
|
1680
|
-
def i_curve(self) -> NodeSocket:
|
|
1681
|
-
"""Input socket: Curve"""
|
|
1682
|
-
return self._input("Curve")
|
|
1683
|
-
|
|
1684
|
-
@property
|
|
1685
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
1686
|
-
"""Input socket: Selection"""
|
|
1687
|
-
return self._input("Selection")
|
|
1688
|
-
|
|
1689
|
-
@property
|
|
1690
|
-
def i_tilt(self) -> NodeSocket:
|
|
1691
|
-
"""Input socket: Tilt"""
|
|
1692
|
-
return self._input("Tilt")
|
|
1693
|
-
|
|
1694
|
-
@property
|
|
1695
|
-
def o_curve(self) -> NodeSocket:
|
|
1696
|
-
"""Output socket: Curve"""
|
|
1697
|
-
return self._output("Curve")
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
class StringToCurves(NodeBuilder):
|
|
1701
|
-
"""Generate a paragraph of text with a specific font, using a curve instance to store each character"""
|
|
1702
|
-
|
|
1703
|
-
name = "GeometryNodeStringToCurves"
|
|
1704
|
-
node: bpy.types.GeometryNodeStringToCurves
|
|
1705
|
-
|
|
1706
|
-
def __init__(
|
|
1707
|
-
self,
|
|
1708
|
-
string: str | LINKABLE | None = "",
|
|
1709
|
-
size: LINKABLE | None = 1.0,
|
|
1710
|
-
character_spacing: float | LINKABLE | None = 1.0,
|
|
1711
|
-
word_spacing: float | LINKABLE | None = 1.0,
|
|
1712
|
-
line_spacing: float | LINKABLE | None = 1.0,
|
|
1713
|
-
text_box_width: LINKABLE | None = 0.0,
|
|
1714
|
-
overflow: Literal["OVERFLOW", "SCALE_TO_FIT", "TRUNCATE"] = "OVERFLOW",
|
|
1715
|
-
align_x: Literal["LEFT", "CENTER", "RIGHT", "JUSTIFY", "FLUSH"] = "LEFT",
|
|
1716
|
-
align_y: Literal[
|
|
1717
|
-
"TOP", "TOP_BASELINE", "MIDDLE", "BOTTOM_BASELINE", "BOTTOM"
|
|
1718
|
-
] = "TOP_BASELINE",
|
|
1719
|
-
pivot_mode: Literal[
|
|
1720
|
-
"MIDPOINT",
|
|
1721
|
-
"TOP_LEFT",
|
|
1722
|
-
"TOP_CENTER",
|
|
1723
|
-
"TOP_RIGHT",
|
|
1724
|
-
"BOTTOM_LEFT",
|
|
1725
|
-
"BOTTOM_CENTER",
|
|
1726
|
-
"BOTTOM_RIGHT",
|
|
1727
|
-
] = "BOTTOM_LEFT",
|
|
1728
|
-
**kwargs,
|
|
1729
|
-
):
|
|
1730
|
-
super().__init__()
|
|
1731
|
-
key_args = {
|
|
1732
|
-
"String": string,
|
|
1733
|
-
"Size": size,
|
|
1734
|
-
"Character Spacing": character_spacing,
|
|
1735
|
-
"Word Spacing": word_spacing,
|
|
1736
|
-
"Line Spacing": line_spacing,
|
|
1737
|
-
"Text Box Width": text_box_width,
|
|
1738
|
-
}
|
|
1739
|
-
key_args.update(kwargs)
|
|
1740
|
-
self.overflow = overflow
|
|
1741
|
-
self.align_x = align_x
|
|
1742
|
-
self.align_y = align_y
|
|
1743
|
-
self.pivot_mode = pivot_mode
|
|
1744
|
-
self._establish_links(**key_args)
|
|
1745
|
-
|
|
1746
|
-
@property
|
|
1747
|
-
def i_string(self) -> bpy.types.NodeSocketString:
|
|
1748
|
-
"""Input socket: String"""
|
|
1749
|
-
return self._input("String")
|
|
1750
|
-
|
|
1751
|
-
@property
|
|
1752
|
-
def i_size(self) -> NodeSocket:
|
|
1753
|
-
"""Input socket: Size"""
|
|
1754
|
-
return self._input("Size")
|
|
1755
|
-
|
|
1756
|
-
@property
|
|
1757
|
-
def i_character_spacing(self) -> bpy.types.NodeSocketFloat:
|
|
1758
|
-
"""Input socket: Character Spacing"""
|
|
1759
|
-
return self._input("Character Spacing")
|
|
1760
|
-
|
|
1761
|
-
@property
|
|
1762
|
-
def i_word_spacing(self) -> bpy.types.NodeSocketFloat:
|
|
1763
|
-
"""Input socket: Word Spacing"""
|
|
1764
|
-
return self._input("Word Spacing")
|
|
1765
|
-
|
|
1766
|
-
@property
|
|
1767
|
-
def i_line_spacing(self) -> bpy.types.NodeSocketFloat:
|
|
1768
|
-
"""Input socket: Line Spacing"""
|
|
1769
|
-
return self._input("Line Spacing")
|
|
1770
|
-
|
|
1771
|
-
@property
|
|
1772
|
-
def i_text_box_width(self) -> NodeSocket:
|
|
1773
|
-
"""Input socket: Text Box Width"""
|
|
1774
|
-
return self._input("Text Box Width")
|
|
1775
|
-
|
|
1776
|
-
@property
|
|
1777
|
-
def o_curve_instances(self) -> NodeSocket:
|
|
1778
|
-
"""Output socket: Curve Instances"""
|
|
1779
|
-
return self._output("Curve Instances")
|
|
1780
|
-
|
|
1781
|
-
@property
|
|
1782
|
-
def o_line(self) -> bpy.types.NodeSocketInt:
|
|
1783
|
-
"""Output socket: Line"""
|
|
1784
|
-
return self._output("Line")
|
|
1785
|
-
|
|
1786
|
-
@property
|
|
1787
|
-
def o_pivot_point(self) -> bpy.types.NodeSocketVector:
|
|
1788
|
-
"""Output socket: Pivot Point"""
|
|
1789
|
-
return self._output("Pivot Point")
|
|
1790
|
-
|
|
1791
|
-
@property
|
|
1792
|
-
def overflow(self) -> Literal["OVERFLOW", "SCALE_TO_FIT", "TRUNCATE"]:
|
|
1793
|
-
return self.node.overflow
|
|
1794
|
-
|
|
1795
|
-
@overflow.setter
|
|
1796
|
-
def overflow(self, value: Literal["OVERFLOW", "SCALE_TO_FIT", "TRUNCATE"]):
|
|
1797
|
-
self.node.overflow = value
|
|
1798
|
-
|
|
1799
|
-
@property
|
|
1800
|
-
def align_x(self) -> Literal["LEFT", "CENTER", "RIGHT", "JUSTIFY", "FLUSH"]:
|
|
1801
|
-
return self.node.align_x
|
|
1802
|
-
|
|
1803
|
-
@align_x.setter
|
|
1804
|
-
def align_x(self, value: Literal["LEFT", "CENTER", "RIGHT", "JUSTIFY", "FLUSH"]):
|
|
1805
|
-
self.node.align_x = value
|
|
1806
|
-
|
|
1807
|
-
@property
|
|
1808
|
-
def align_y(
|
|
1809
|
-
self,
|
|
1810
|
-
) -> Literal["TOP", "TOP_BASELINE", "MIDDLE", "BOTTOM_BASELINE", "BOTTOM"]:
|
|
1811
|
-
return self.node.align_y
|
|
1812
|
-
|
|
1813
|
-
@align_y.setter
|
|
1814
|
-
def align_y(
|
|
1815
|
-
self,
|
|
1816
|
-
value: Literal["TOP", "TOP_BASELINE", "MIDDLE", "BOTTOM_BASELINE", "BOTTOM"],
|
|
1817
|
-
):
|
|
1818
|
-
self.node.align_y = value
|
|
1819
|
-
|
|
1820
|
-
@property
|
|
1821
|
-
def pivot_mode(
|
|
1822
|
-
self,
|
|
1823
|
-
) -> Literal[
|
|
1824
|
-
"MIDPOINT",
|
|
1825
|
-
"TOP_LEFT",
|
|
1826
|
-
"TOP_CENTER",
|
|
1827
|
-
"TOP_RIGHT",
|
|
1828
|
-
"BOTTOM_LEFT",
|
|
1829
|
-
"BOTTOM_CENTER",
|
|
1830
|
-
"BOTTOM_RIGHT",
|
|
1831
|
-
]:
|
|
1832
|
-
return self.node.pivot_mode
|
|
1833
|
-
|
|
1834
|
-
@pivot_mode.setter
|
|
1835
|
-
def pivot_mode(
|
|
1836
|
-
self,
|
|
1837
|
-
value: Literal[
|
|
1838
|
-
"MIDPOINT",
|
|
1839
|
-
"TOP_LEFT",
|
|
1840
|
-
"TOP_CENTER",
|
|
1841
|
-
"TOP_RIGHT",
|
|
1842
|
-
"BOTTOM_LEFT",
|
|
1843
|
-
"BOTTOM_CENTER",
|
|
1844
|
-
"BOTTOM_RIGHT",
|
|
1845
|
-
],
|
|
1846
|
-
):
|
|
1847
|
-
self.node.pivot_mode = value
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
class SubdivideCurve(NodeBuilder):
|
|
1851
|
-
"""Dividing each curve segment into a specified number of pieces"""
|
|
1852
|
-
|
|
1853
|
-
name = "GeometryNodeSubdivideCurve"
|
|
1854
|
-
node: bpy.types.GeometryNodeSubdivideCurve
|
|
1855
|
-
|
|
1856
|
-
def __init__(
|
|
1857
|
-
self, curve: LINKABLE = None, cuts: int | LINKABLE | None = 1, **kwargs
|
|
1858
|
-
):
|
|
1859
|
-
super().__init__()
|
|
1860
|
-
key_args = {"Curve": curve, "Cuts": cuts}
|
|
1861
|
-
key_args.update(kwargs)
|
|
1862
|
-
|
|
1863
|
-
self._establish_links(**key_args)
|
|
1864
|
-
|
|
1865
|
-
@property
|
|
1866
|
-
def i_curve(self) -> NodeSocket:
|
|
1867
|
-
"""Input socket: Curve"""
|
|
1868
|
-
return self._input("Curve")
|
|
1869
|
-
|
|
1870
|
-
@property
|
|
1871
|
-
def i_cuts(self) -> bpy.types.NodeSocketInt:
|
|
1872
|
-
"""Input socket: Cuts"""
|
|
1873
|
-
return self._input("Cuts")
|
|
1874
|
-
|
|
1875
|
-
@property
|
|
1876
|
-
def o_curve(self) -> NodeSocket:
|
|
1877
|
-
"""Output socket: Curve"""
|
|
1878
|
-
return self._output("Curve")
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
class TrimCurve(NodeBuilder):
|
|
1882
|
-
"""Shorten curves by removing portions at the start or end"""
|
|
1883
|
-
|
|
1884
|
-
name = "GeometryNodeTrimCurve"
|
|
1885
|
-
node: bpy.types.GeometryNodeTrimCurve
|
|
1886
|
-
|
|
1887
|
-
def __init__(
|
|
1888
|
-
self,
|
|
1889
|
-
curve: LINKABLE = None,
|
|
1890
|
-
selection: TYPE_INPUT_BOOLEAN = True,
|
|
1891
|
-
start: LINKABLE | None = 0.0,
|
|
1892
|
-
end: LINKABLE | None = 1.0,
|
|
1893
|
-
mode: Literal["FACTOR", "LENGTH"] = "FACTOR",
|
|
1894
|
-
**kwargs,
|
|
1895
|
-
):
|
|
1896
|
-
super().__init__()
|
|
1897
|
-
key_args = {"Curve": curve, "Selection": selection, "Start": start, "End": end}
|
|
1898
|
-
key_args.update(kwargs)
|
|
1899
|
-
self.mode = mode
|
|
1900
|
-
self._establish_links(**key_args)
|
|
1901
|
-
|
|
1902
|
-
@property
|
|
1903
|
-
def i_curve(self) -> NodeSocket:
|
|
1904
|
-
"""Input socket: Curve"""
|
|
1905
|
-
return self._input("Curve")
|
|
1906
|
-
|
|
1907
|
-
@property
|
|
1908
|
-
def i_selection(self) -> bpy.types.NodeSocketBool:
|
|
1909
|
-
"""Input socket: Selection"""
|
|
1910
|
-
return self._input("Selection")
|
|
1911
|
-
|
|
1912
|
-
@property
|
|
1913
|
-
def i_start(self) -> NodeSocket:
|
|
1914
|
-
"""Input socket: Start"""
|
|
1915
|
-
return self._input("Start")
|
|
1916
|
-
|
|
1917
|
-
@property
|
|
1918
|
-
def i_end(self) -> NodeSocket:
|
|
1919
|
-
"""Input socket: End"""
|
|
1920
|
-
return self._input("End")
|
|
1921
|
-
|
|
1922
|
-
@property
|
|
1923
|
-
def o_curve(self) -> NodeSocket:
|
|
1924
|
-
"""Output socket: Curve"""
|
|
1925
|
-
return self._output("Curve")
|
|
1926
|
-
|
|
1927
|
-
@property
|
|
1928
|
-
def mode(self) -> Literal["FACTOR", "LENGTH"]:
|
|
1929
|
-
return self.node.mode
|
|
1930
|
-
|
|
1931
|
-
@mode.setter
|
|
1932
|
-
def mode(self, value: Literal["FACTOR", "LENGTH"]):
|
|
1933
|
-
self.node.mode = value
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
class FloatCurve(NodeBuilder):
|
|
1937
|
-
"""Map an input float to a curve and outputs a float value"""
|
|
1938
|
-
|
|
1939
|
-
name = "ShaderNodeFloatCurve"
|
|
1940
|
-
node: bpy.types.ShaderNodeFloatCurve
|
|
1941
|
-
|
|
1942
|
-
def __init__(
|
|
1943
|
-
self,
|
|
1944
|
-
factor: LINKABLE | None = 1.0,
|
|
1945
|
-
value: float | LINKABLE | None = 1.0,
|
|
1946
|
-
**kwargs,
|
|
1947
|
-
):
|
|
1948
|
-
super().__init__()
|
|
1949
|
-
key_args = {"Factor": factor, "Value": value}
|
|
1950
|
-
key_args.update(kwargs)
|
|
1951
|
-
|
|
1952
|
-
self._establish_links(**key_args)
|
|
1953
|
-
|
|
1954
|
-
@property
|
|
1955
|
-
def i_factor(self) -> NodeSocket:
|
|
1956
|
-
"""Input socket: Factor"""
|
|
1957
|
-
return self._input("Factor")
|
|
1958
|
-
|
|
1959
|
-
@property
|
|
1960
|
-
def i_value(self) -> bpy.types.NodeSocketFloat:
|
|
1961
|
-
"""Input socket: Value"""
|
|
1962
|
-
return self._input("Value")
|
|
1963
|
-
|
|
1964
|
-
@property
|
|
1965
|
-
def o_value(self) -> bpy.types.NodeSocketFloat:
|
|
1966
|
-
"""Output socket: Value"""
|
|
1967
|
-
return self._output("Value")
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
class RgbCurves(NodeBuilder):
|
|
1971
|
-
"""Apply color corrections for each color channel"""
|
|
1972
|
-
|
|
1973
|
-
name = "ShaderNodeRGBCurve"
|
|
1974
|
-
node: bpy.types.ShaderNodeRGBCurve
|
|
1975
|
-
|
|
1976
|
-
def __init__(
|
|
1977
|
-
self,
|
|
1978
|
-
fac: LINKABLE | None = 1.0,
|
|
1979
|
-
color: tuple[float, float, float, float] | LINKABLE | None = [
|
|
1980
|
-
1.0,
|
|
1981
|
-
1.0,
|
|
1982
|
-
1.0,
|
|
1983
|
-
1.0,
|
|
1984
|
-
],
|
|
1985
|
-
**kwargs,
|
|
1986
|
-
):
|
|
1987
|
-
super().__init__()
|
|
1988
|
-
key_args = {"Fac": fac, "Color": color}
|
|
1989
|
-
key_args.update(kwargs)
|
|
1990
|
-
|
|
1991
|
-
self._establish_links(**key_args)
|
|
1992
|
-
|
|
1993
|
-
@property
|
|
1994
|
-
def i_factor(self) -> NodeSocket:
|
|
1995
|
-
"""Input socket: Factor"""
|
|
1996
|
-
return self._input("Fac")
|
|
1997
|
-
|
|
1998
|
-
@property
|
|
1999
|
-
def i_color(self) -> bpy.types.NodeSocketColor:
|
|
2000
|
-
"""Input socket: Color"""
|
|
2001
|
-
return self._input("Color")
|
|
2002
|
-
|
|
2003
|
-
@property
|
|
2004
|
-
def o_color(self) -> bpy.types.NodeSocketColor:
|
|
2005
|
-
"""Output socket: Color"""
|
|
2006
|
-
return self._output("Color")
|