nodebpy 520.15.0__tar.gz → 520.16.0__tar.gz

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.
Files changed (81) hide show
  1. {nodebpy-520.15.0 → nodebpy-520.16.0}/PKG-INFO +1 -1
  2. {nodebpy-520.15.0 → nodebpy-520.16.0}/pyproject.toml +1 -1
  3. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/items.py +38 -0
  4. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/tree.py +42 -0
  5. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/export/codegen.py +6 -0
  6. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/manual.py +28 -0
  7. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/zone.py +16 -0
  8. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/types.py +1 -0
  9. {nodebpy-520.15.0 → nodebpy-520.16.0}/README.md +0 -0
  10. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/__init__.py +0 -0
  11. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/assets/__init__.py +0 -0
  12. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/assets/__main__.py +0 -0
  13. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/assets/_codegen.py +0 -0
  14. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/__init__.py +0 -0
  15. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/_registry.py +0 -0
  16. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/_utils.py +0 -0
  17. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/accessor.py +0 -0
  18. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/arrange.py +0 -0
  19. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/asset.py +0 -0
  20. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/mixins.py +0 -0
  21. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/node.py +0 -0
  22. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/builder/socket.py +0 -0
  23. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/export/__init__.py +0 -0
  24. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/export/diagram.py +0 -0
  25. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/export/web_render.py +0 -0
  26. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/__init__.py +0 -0
  27. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/__init__.py +0 -0
  28. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/graph.py +0 -0
  29. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/ordering.py +0 -0
  30. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/ranking.py +0 -0
  31. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/realize.py +0 -0
  32. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/stacking.py +0 -0
  33. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/structs.py +0 -0
  34. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/sugiyama.py +0 -0
  35. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/x_coords.py +0 -0
  36. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/arrange/y_coords.py +0 -0
  37. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/config.py +0 -0
  38. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/lib/nodearrange/utils.py +0 -0
  39. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/__init__.py +0 -0
  40. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/_mixins.py +0 -0
  41. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/__init__.py +0 -0
  42. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/assets.py +0 -0
  43. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/color.py +0 -0
  44. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/converter.py +0 -0
  45. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/distort.py +0 -0
  46. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/filter.py +0 -0
  47. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/group.py +0 -0
  48. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/input.py +0 -0
  49. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/interface.py +0 -0
  50. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/manual.py +0 -0
  51. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/matte.py +0 -0
  52. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/output.py +0 -0
  53. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/compositor/vector.py +0 -0
  54. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/__init__.py +0 -0
  55. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/assets.py +0 -0
  56. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/attribute.py +0 -0
  57. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/color.py +0 -0
  58. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/converter.py +0 -0
  59. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/geometry.py +0 -0
  60. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/grid.py +0 -0
  61. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/group.py +0 -0
  62. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/groups.py +0 -0
  63. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/input.py +0 -0
  64. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/interface.py +0 -0
  65. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/output.py +0 -0
  66. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/texture.py +0 -0
  67. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/utilities.py +0 -0
  68. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/geometry/vector.py +0 -0
  69. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/__init__.py +0 -0
  70. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/assets.py +0 -0
  71. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/color.py +0 -0
  72. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/converter.py +0 -0
  73. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/grid.py +0 -0
  74. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/group.py +0 -0
  75. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/input.py +0 -0
  76. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/manual.py +0 -0
  77. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/output.py +0 -0
  78. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/script.py +0 -0
  79. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/shader.py +0 -0
  80. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/texture.py +0 -0
  81. {nodebpy-520.15.0 → nodebpy-520.16.0}/src/nodebpy/nodes/shader/vector.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nodebpy
3
- Version: 520.15.0
3
+ Version: 520.16.0
4
4
  Summary: Build nodes trees in Blender more elegantly with code
5
5
  Author: Brady Johnston
6
6
  Author-email: Brady Johnston <brady.johnston@me.com>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nodebpy"
3
- version = "520.15.0"
3
+ version = "520.16.0"
4
4
  description = "Build nodes trees in Blender more elegantly with code"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -21,6 +21,7 @@ if TYPE_CHECKING:
21
21
  InputCollection,
22
22
  InputColor,
23
23
  InputFloat,
24
+ InputFont,
24
25
  InputGeometry,
25
26
  InputImage,
26
27
  InputInteger,
@@ -30,6 +31,7 @@ if TYPE_CHECKING:
30
31
  InputMenu,
31
32
  InputObject,
32
33
  InputRotation,
34
+ InputSound,
33
35
  InputString,
34
36
  InputVector,
35
37
  _SocketShapeStructureType,
@@ -41,6 +43,7 @@ if TYPE_CHECKING:
41
43
  CollectionSocket,
42
44
  ColorSocket,
43
45
  FloatSocket,
46
+ FontSocket,
44
47
  GeometrySocket,
45
48
  ImageSocket,
46
49
  IntegerSocket,
@@ -49,6 +52,7 @@ if TYPE_CHECKING:
49
52
  MenuSocket,
50
53
  ObjectSocket,
51
54
  RotationSocket,
55
+ SoundSocket,
52
56
  StringSocket,
53
57
  VectorSocket,
54
58
  )
@@ -534,6 +538,22 @@ class _SocketItemFactory(_TypedItemFactory):
534
538
  ) -> MaterialSocket:
535
539
  return cast("MaterialSocket", self._declare(name, "MATERIAL", structure_type))
536
540
 
541
+ def font(
542
+ self,
543
+ name: str = "Font",
544
+ *,
545
+ structure_type: _SocketShapeStructureType = "AUTO",
546
+ ) -> FontSocket:
547
+ return cast("FontSocket", self._declare(name, "FONT", structure_type))
548
+
549
+ def sound(
550
+ self,
551
+ name: str = "Sound",
552
+ *,
553
+ structure_type: _SocketShapeStructureType = "AUTO",
554
+ ) -> SoundSocket:
555
+ return cast("SoundSocket", self._declare(name, "SOUND", structure_type))
556
+
537
557
  def bundle(
538
558
  self,
539
559
  name: str = "Bundle",
@@ -709,6 +729,24 @@ class _SocketValueItemFactory(_TypedItemFactory):
709
729
  "MaterialSocket", self._declare(name, value, "MATERIAL", structure_type)
710
730
  )
711
731
 
732
+ def font(
733
+ self,
734
+ name: str = "Font",
735
+ value: InputFont = None,
736
+ *,
737
+ structure_type: _SocketShapeStructureType = "AUTO",
738
+ ) -> FontSocket:
739
+ return cast("FontSocket", self._declare(name, value, "FONT", structure_type))
740
+
741
+ def sound(
742
+ self,
743
+ name: str = "Sound",
744
+ value: InputSound = None,
745
+ *,
746
+ structure_type: _SocketShapeStructureType = "AUTO",
747
+ ) -> SoundSocket:
748
+ return cast("SoundSocket", self._declare(name, value, "SOUND", structure_type))
749
+
712
750
  def bundle(
713
751
  self,
714
752
  name: str = "Bundle",
@@ -33,6 +33,7 @@ from .socket import (
33
33
  CollectionSocket,
34
34
  ColorSocket,
35
35
  FloatSocket,
36
+ FontSocket,
36
37
  GeometrySocket,
37
38
  ImageSocket,
38
39
  IntegerSocket,
@@ -43,6 +44,7 @@ from .socket import (
43
44
  RotationSocket,
44
45
  ShaderSocket,
45
46
  Socket,
47
+ SoundSocket,
46
48
  StringSocket,
47
49
  VectorSocket,
48
50
  )
@@ -518,6 +520,46 @@ class SocketContext:
518
520
  )
519
521
  return self._wrap(MaterialSocket, iface)
520
522
 
523
+ def font(
524
+ self,
525
+ name: str = "Font",
526
+ default_value: bpy.types.VectorFont | None = None,
527
+ description: str = "",
528
+ *,
529
+ optional_label: bool = False,
530
+ hide_value: bool = False,
531
+ hide_in_modifier: bool = False,
532
+ ) -> FontSocket:
533
+ iface = self._add_socket("NodeSocketFont", name, description)
534
+ self._set_props(
535
+ iface,
536
+ default_value=default_value,
537
+ optional_label=optional_label,
538
+ hide_value=hide_value,
539
+ hide_in_modifier=hide_in_modifier,
540
+ )
541
+ return self._wrap(FontSocket, iface)
542
+
543
+ def sound(
544
+ self,
545
+ name: str = "Sound",
546
+ default_value: bpy.types.Sound | None = None,
547
+ description: str = "",
548
+ *,
549
+ optional_label: bool = False,
550
+ hide_value: bool = False,
551
+ hide_in_modifier: bool = False,
552
+ ) -> SoundSocket:
553
+ iface = self._add_socket("NodeSocketSound", name, description)
554
+ self._set_props(
555
+ iface,
556
+ default_value=default_value,
557
+ optional_label=optional_label,
558
+ hide_value=hide_value,
559
+ hide_in_modifier=hide_in_modifier,
560
+ )
561
+ return self._wrap(SoundSocket, iface)
562
+
521
563
  def bundle(
522
564
  self,
523
565
  name: str = "Bundle",
@@ -436,6 +436,8 @@ _INTERFACE_TYPE_METHOD: dict[str, str] = {
436
436
  "NodeSocketCollection": "collection",
437
437
  "NodeSocketImage": "image",
438
438
  "NodeSocketMaterial": "material",
439
+ "NodeSocketFont": "font",
440
+ "NodeSocketSound": "sound",
439
441
  "NodeSocketBundle": "bundle",
440
442
  "NodeSocketClosure": "closure",
441
443
  "NodeSocketShader": "shader",
@@ -448,6 +450,8 @@ _NO_DEFAULT_VALUE_TYPES = frozenset(
448
450
  "NodeSocketCollection",
449
451
  "NodeSocketImage",
450
452
  "NodeSocketMaterial",
453
+ "NodeSocketFont",
454
+ "NodeSocketSound",
451
455
  "NodeSocketBundle",
452
456
  "NodeSocketClosure",
453
457
  "NodeSocketShader",
@@ -3875,6 +3879,8 @@ _SWITCH_FACTORY_NAMES = {
3875
3879
  "BUNDLE": "bundle",
3876
3880
  "CLOSURE": "closure",
3877
3881
  "SHADER": "shader",
3882
+ "FONT": "font",
3883
+ "SOUND": "sound",
3878
3884
  }
3879
3885
 
3880
3886
 
@@ -1427,6 +1427,18 @@ class IndexSwitch[T: BaseSocket](ItemsMixin, BaseNode):
1427
1427
  ) -> "IndexSwitch[ClosureSocket]":
1428
1428
  return IndexSwitch(index=index, items=items, data_type="CLOSURE")
1429
1429
 
1430
+ @classmethod
1431
+ def font(
1432
+ cls, index: InputInteger = 0, items: Iterable[InputFont] = ()
1433
+ ) -> "IndexSwitch[FontSocket]":
1434
+ return IndexSwitch(index=index, items=items, data_type="FONT")
1435
+
1436
+ @classmethod
1437
+ def sound(
1438
+ cls, index: InputInteger = 0, items: Iterable[InputSound] = ()
1439
+ ) -> "IndexSwitch[SoundSocket]":
1440
+ return IndexSwitch(index=index, items=items, data_type="SOUND")
1441
+
1430
1442
  class _Inputs(SocketAccessor):
1431
1443
  index: IntegerSocket
1432
1444
 
@@ -1805,6 +1817,22 @@ class MenuSwitch[T: BaseSocket](_MenuSwitchBase[T]):
1805
1817
  ) -> "MenuSwitch[ClosureSocket]":
1806
1818
  return MenuSwitch(menu, items, data_type="CLOSURE")
1807
1819
 
1820
+ @classmethod
1821
+ def font(
1822
+ cls,
1823
+ menu: InputMenu = None,
1824
+ items: dict[str, InputFont] | None = None,
1825
+ ) -> "MenuSwitch[FontSocket]":
1826
+ return MenuSwitch(menu, items, data_type="FONT")
1827
+
1828
+ @classmethod
1829
+ def sound(
1830
+ cls,
1831
+ menu: InputMenu = None,
1832
+ items: dict[str, InputSound] | None = None,
1833
+ ) -> "MenuSwitch[SoundSocket]":
1834
+ return MenuSwitch(menu, items, data_type="SOUND")
1835
+
1808
1836
 
1809
1837
  class CaptureAttribute(ItemsMixin, BaseNode):
1810
1838
  """
@@ -22,6 +22,7 @@ from ...builder import (
22
22
  CollectionSocket,
23
23
  ColorSocket,
24
24
  FloatSocket,
25
+ FontSocket,
25
26
  GeometrySocket,
26
27
  ImageSocket,
27
28
  IntegerSocket,
@@ -32,6 +33,7 @@ from ...builder import (
32
33
  MenuSocket,
33
34
  ObjectSocket,
34
35
  RotationSocket,
36
+ SoundSocket,
35
37
  StringSocket,
36
38
  VectorSocket,
37
39
  )
@@ -48,6 +50,7 @@ from ...types import (
48
50
  InputCollection,
49
51
  InputColor,
50
52
  InputFloat,
53
+ InputFont,
51
54
  InputGeometry,
52
55
  InputImage,
53
56
  InputInteger,
@@ -57,6 +60,7 @@ from ...types import (
57
60
  InputMenu,
58
61
  InputObject,
59
62
  InputRotation,
63
+ InputSound,
60
64
  InputString,
61
65
  InputVector,
62
66
  _AttributeDomains,
@@ -331,6 +335,16 @@ class _RepeatZoneItems(_StateZoneItems):
331
335
  ) -> "ZoneItem[ClosureSocket]":
332
336
  return cast("ZoneItem[ClosureSocket]", self._declare(name, initial, "CLOSURE"))
333
337
 
338
+ def font(
339
+ self, name: str = "Font", initial: InputFont = None
340
+ ) -> "ZoneItem[FontSocket]":
341
+ return cast("ZoneItem[FontSocket]", self._declare(name, initial, "FONT"))
342
+
343
+ def sound(
344
+ self, name: str = "Sound", initial: InputSound = None
345
+ ) -> "ZoneItem[SoundSocket]":
346
+ return cast("ZoneItem[SoundSocket]", self._declare(name, initial, "SOUND"))
347
+
334
348
 
335
349
  class BaseSimulationZone(BaseZone):
336
350
  _items_collection = "state_items"
@@ -419,6 +433,8 @@ class BaseRepeatZone(BaseZone):
419
433
  "MATERIAL",
420
434
  "BUNDLE",
421
435
  "CLOSURE",
436
+ "FONT",
437
+ "SOUND",
422
438
  )
423
439
 
424
440
  _type_map: ClassVar[dict[str, str]] = {"VALUE": "FLOAT"}
@@ -369,6 +369,7 @@ SOCKET_COMPATIBILITY: dict[str, tuple[str, ...]] = {
369
369
  "BUNDLE": ("BUNDLE",),
370
370
  "CLOSURE": ("CLOSURE",),
371
371
  "SHADER": ("SHADER", "RGBA"),
372
+ "FONT": ("FONT",),
372
373
  "SOUND": ("SOUND",),
373
374
  }
374
375
 
File without changes