nodebpy 0.2.1__py3-none-any.whl → 0.3.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/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",
@@ -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
- """Mix attribute values of neighboring elements"""
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
- """Retrieve the number of elements in a geometry for each attribute domain"""
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
- """Delete an attribute with a specified name from a geometry. Typically used to optimize performance"""
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
- """Store the result of a field on a geometry as an attribute with the specified name"""
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
@@ -9,7 +9,9 @@ from ..types import (
9
9
 
10
10
 
11
11
  class Gamma(NodeBuilder):
12
- """Apply a gamma correction"""
12
+ """
13
+ Apply a gamma correction
14
+ """
13
15
 
14
16
  _bl_idname = "ShaderNodeGamma"
15
17
  node: bpy.types.ShaderNodeGamma
@@ -41,7 +43,9 @@ class Gamma(NodeBuilder):
41
43
 
42
44
 
43
45
  class RgbCurves(NodeBuilder):
44
- """Apply color corrections for each color channel"""
46
+ """
47
+ Apply color corrections for each color channel
48
+ """
45
49
 
46
50
  _bl_idname = "ShaderNodeRGBCurve"
47
51
  node: bpy.types.ShaderNodeRGBCurve