nodebpy 0.3.0__py3-none-any.whl → 0.4.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/builder.py +52 -36
- nodebpy/lib/nodearrange/__init__.py +2 -0
- nodebpy/lib/nodearrange/arrange/graph.py +583 -0
- nodebpy/lib/nodearrange/arrange/ordering.py +512 -0
- nodebpy/lib/nodearrange/arrange/ranking.py +256 -0
- nodebpy/lib/nodearrange/arrange/realize.py +231 -0
- nodebpy/lib/nodearrange/arrange/stacking.py +313 -0
- nodebpy/lib/nodearrange/arrange/structs.py +132 -0
- nodebpy/lib/nodearrange/arrange/sugiyama.py +256 -0
- nodebpy/lib/nodearrange/arrange/x_coords.py +211 -0
- nodebpy/lib/nodearrange/arrange/y_coords.py +339 -0
- nodebpy/lib/nodearrange/config.py +45 -0
- nodebpy/lib/nodearrange/utils.py +109 -0
- nodebpy/nodes/__init__.py +6 -0
- nodebpy/nodes/attribute.py +98 -4
- nodebpy/nodes/color.py +6 -3
- nodebpy/nodes/converter.py +357 -54
- nodebpy/nodes/experimental.py +9 -3
- nodebpy/nodes/geometry.py +390 -94
- nodebpy/nodes/grid.py +90 -30
- nodebpy/nodes/group.py +3 -2
- nodebpy/nodes/input.py +239 -78
- nodebpy/nodes/interface.py +21 -7
- nodebpy/nodes/manual.py +6 -6
- nodebpy/nodes/output.py +8 -1
- nodebpy/nodes/texture.py +30 -10
- nodebpy/nodes/vector.py +41 -4
- nodebpy/nodes/zone.py +125 -99
- {nodebpy-0.3.0.dist-info → nodebpy-0.4.0.dist-info}/METADATA +16 -56
- nodebpy-0.4.0.dist-info/RECORD +38 -0
- nodebpy-0.3.0.dist-info/RECORD +0 -26
- {nodebpy-0.3.0.dist-info → nodebpy-0.4.0.dist-info}/WHEEL +0 -0
- {nodebpy-0.3.0.dist-info → nodebpy-0.4.0.dist-info}/entry_points.txt +0 -0
nodebpy/nodes/__init__.py
CHANGED
|
@@ -18,6 +18,9 @@ from .manual import (
|
|
|
18
18
|
SimulationInput,
|
|
19
19
|
SimulationOutput,
|
|
20
20
|
SimulationZone,
|
|
21
|
+
ForEachGeometryElementInput,
|
|
22
|
+
ForEachGeometryElementOutput,
|
|
23
|
+
ForEachGeometryElementZone,
|
|
21
24
|
FormatString,
|
|
22
25
|
Value,
|
|
23
26
|
AccumulateField,
|
|
@@ -414,6 +417,9 @@ __all__ = (
|
|
|
414
417
|
"FlipFaces",
|
|
415
418
|
"FloatCurve",
|
|
416
419
|
"FloatToInteger",
|
|
420
|
+
"ForEachGeometryElementInput",
|
|
421
|
+
"ForEachGeometryElementOutput",
|
|
422
|
+
"ForEachGeometryElementZone",
|
|
417
423
|
"FormatString",
|
|
418
424
|
"GaborTexture",
|
|
419
425
|
"Gamma",
|
nodebpy/nodes/attribute.py
CHANGED
|
@@ -11,13 +11,16 @@ from ..types import (
|
|
|
11
11
|
TYPE_INPUT_STRING,
|
|
12
12
|
TYPE_INPUT_ROTATION,
|
|
13
13
|
TYPE_INPUT_COLOR,
|
|
14
|
+
TYPE_INPUT_MATRIX,
|
|
14
15
|
TYPE_INPUT_VALUE,
|
|
15
16
|
TYPE_INPUT_VECTOR,
|
|
16
17
|
)
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
class BlurAttribute(NodeBuilder):
|
|
20
|
-
"""
|
|
21
|
+
"""
|
|
22
|
+
Mix attribute values of neighboring elements
|
|
23
|
+
"""
|
|
21
24
|
|
|
22
25
|
_bl_idname = "GeometryNodeBlurAttribute"
|
|
23
26
|
node: bpy.types.GeometryNodeBlurAttribute
|
|
@@ -109,7 +112,9 @@ class BlurAttribute(NodeBuilder):
|
|
|
109
112
|
|
|
110
113
|
|
|
111
114
|
class DomainSize(NodeBuilder):
|
|
112
|
-
"""
|
|
115
|
+
"""
|
|
116
|
+
Retrieve the number of elements in a geometry for each attribute domain
|
|
117
|
+
"""
|
|
113
118
|
|
|
114
119
|
_bl_idname = "GeometryNodeAttributeDomainSize"
|
|
115
120
|
node: bpy.types.GeometryNodeAttributeDomainSize
|
|
@@ -181,7 +186,9 @@ class DomainSize(NodeBuilder):
|
|
|
181
186
|
|
|
182
187
|
|
|
183
188
|
class RemoveNamedAttribute(NodeBuilder):
|
|
184
|
-
"""
|
|
189
|
+
"""
|
|
190
|
+
Delete an attribute with a specified name from a geometry. Typically used to optimize performance
|
|
191
|
+
"""
|
|
185
192
|
|
|
186
193
|
_bl_idname = "GeometryNodeRemoveAttribute"
|
|
187
194
|
node: bpy.types.GeometryNodeRemoveAttribute
|
|
@@ -219,7 +226,9 @@ class RemoveNamedAttribute(NodeBuilder):
|
|
|
219
226
|
|
|
220
227
|
|
|
221
228
|
class StoreNamedAttribute(NodeBuilder):
|
|
222
|
-
"""
|
|
229
|
+
"""
|
|
230
|
+
Store the result of a field on a geometry as an attribute with the specified name
|
|
231
|
+
"""
|
|
223
232
|
|
|
224
233
|
_bl_idname = "GeometryNodeStoreNamedAttribute"
|
|
225
234
|
node: bpy.types.GeometryNodeStoreNamedAttribute
|
|
@@ -360,6 +369,74 @@ class StoreNamedAttribute(NodeBuilder):
|
|
|
360
369
|
value=value,
|
|
361
370
|
)
|
|
362
371
|
|
|
372
|
+
@classmethod
|
|
373
|
+
def matrix(
|
|
374
|
+
cls,
|
|
375
|
+
geometry: TYPE_INPUT_GEOMETRY = None,
|
|
376
|
+
selection: TYPE_INPUT_BOOLEAN = True,
|
|
377
|
+
name: TYPE_INPUT_STRING = "",
|
|
378
|
+
value: TYPE_INPUT_MATRIX = None,
|
|
379
|
+
) -> "StoreNamedAttribute":
|
|
380
|
+
"""Create Store Named Attribute with operation '4x4 Matrix'."""
|
|
381
|
+
return cls(
|
|
382
|
+
data_type="FLOAT4X4",
|
|
383
|
+
geometry=geometry,
|
|
384
|
+
selection=selection,
|
|
385
|
+
name=name,
|
|
386
|
+
value=value,
|
|
387
|
+
)
|
|
388
|
+
|
|
389
|
+
@classmethod
|
|
390
|
+
def int8(
|
|
391
|
+
cls,
|
|
392
|
+
geometry: TYPE_INPUT_GEOMETRY = None,
|
|
393
|
+
selection: TYPE_INPUT_BOOLEAN = True,
|
|
394
|
+
name: TYPE_INPUT_STRING = "",
|
|
395
|
+
value: TYPE_INPUT_INT = 0,
|
|
396
|
+
) -> "StoreNamedAttribute":
|
|
397
|
+
"""Create Store Named Attribute with operation '8-Bit Integer'."""
|
|
398
|
+
return cls(
|
|
399
|
+
data_type="INT8",
|
|
400
|
+
geometry=geometry,
|
|
401
|
+
selection=selection,
|
|
402
|
+
name=name,
|
|
403
|
+
value=value,
|
|
404
|
+
)
|
|
405
|
+
|
|
406
|
+
@classmethod
|
|
407
|
+
def vector2(
|
|
408
|
+
cls,
|
|
409
|
+
geometry: TYPE_INPUT_GEOMETRY = None,
|
|
410
|
+
selection: TYPE_INPUT_BOOLEAN = True,
|
|
411
|
+
name: TYPE_INPUT_STRING = "",
|
|
412
|
+
value: TYPE_INPUT_VECTOR = None,
|
|
413
|
+
) -> "StoreNamedAttribute":
|
|
414
|
+
"""Create Store Named Attribute with operation '2D Vector'."""
|
|
415
|
+
return cls(
|
|
416
|
+
data_type="FLOAT2",
|
|
417
|
+
geometry=geometry,
|
|
418
|
+
selection=selection,
|
|
419
|
+
name=name,
|
|
420
|
+
value=value,
|
|
421
|
+
)
|
|
422
|
+
|
|
423
|
+
@classmethod
|
|
424
|
+
def byte_color(
|
|
425
|
+
cls,
|
|
426
|
+
geometry: TYPE_INPUT_GEOMETRY = None,
|
|
427
|
+
selection: TYPE_INPUT_BOOLEAN = True,
|
|
428
|
+
name: TYPE_INPUT_STRING = "",
|
|
429
|
+
value: TYPE_INPUT_COLOR = None,
|
|
430
|
+
) -> "StoreNamedAttribute":
|
|
431
|
+
"""Create Store Named Attribute with operation 'Byte Color'."""
|
|
432
|
+
return cls(
|
|
433
|
+
data_type="BYTE_COLOR",
|
|
434
|
+
geometry=geometry,
|
|
435
|
+
selection=selection,
|
|
436
|
+
name=name,
|
|
437
|
+
value=value,
|
|
438
|
+
)
|
|
439
|
+
|
|
363
440
|
@classmethod
|
|
364
441
|
def point(
|
|
365
442
|
cls,
|
|
@@ -411,6 +488,23 @@ class StoreNamedAttribute(NodeBuilder):
|
|
|
411
488
|
value=value,
|
|
412
489
|
)
|
|
413
490
|
|
|
491
|
+
@classmethod
|
|
492
|
+
def face_corner(
|
|
493
|
+
cls,
|
|
494
|
+
geometry: TYPE_INPUT_GEOMETRY = None,
|
|
495
|
+
selection: TYPE_INPUT_BOOLEAN = True,
|
|
496
|
+
name: TYPE_INPUT_STRING = "",
|
|
497
|
+
value: TYPE_INPUT_COLOR = None,
|
|
498
|
+
) -> "StoreNamedAttribute":
|
|
499
|
+
"""Create Store Named Attribute with operation 'Face Corner'."""
|
|
500
|
+
return cls(
|
|
501
|
+
domain="CORNER",
|
|
502
|
+
geometry=geometry,
|
|
503
|
+
selection=selection,
|
|
504
|
+
name=name,
|
|
505
|
+
value=value,
|
|
506
|
+
)
|
|
507
|
+
|
|
414
508
|
@classmethod
|
|
415
509
|
def spline(
|
|
416
510
|
cls,
|
nodebpy/nodes/color.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
1
|
import bpy
|
|
3
2
|
|
|
4
3
|
from ..builder import NodeBuilder, SocketLinker
|
|
@@ -9,7 +8,9 @@ from ..types import (
|
|
|
9
8
|
|
|
10
9
|
|
|
11
10
|
class Gamma(NodeBuilder):
|
|
12
|
-
"""
|
|
11
|
+
"""
|
|
12
|
+
Apply a gamma correction
|
|
13
|
+
"""
|
|
13
14
|
|
|
14
15
|
_bl_idname = "ShaderNodeGamma"
|
|
15
16
|
node: bpy.types.ShaderNodeGamma
|
|
@@ -41,7 +42,9 @@ class Gamma(NodeBuilder):
|
|
|
41
42
|
|
|
42
43
|
|
|
43
44
|
class RgbCurves(NodeBuilder):
|
|
44
|
-
"""
|
|
45
|
+
"""
|
|
46
|
+
Apply color corrections for each color channel
|
|
47
|
+
"""
|
|
45
48
|
|
|
46
49
|
_bl_idname = "ShaderNodeRGBCurve"
|
|
47
50
|
node: bpy.types.ShaderNodeRGBCurve
|