nodebpy 0.2.0__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 +19 -13
- nodebpy/nodes/__init__.py +352 -335
- nodebpy/nodes/attribute.py +362 -307
- nodebpy/nodes/color.py +30 -34
- nodebpy/nodes/converter.py +1987 -2978
- nodebpy/nodes/experimental.py +201 -203
- nodebpy/nodes/geometry.py +4189 -3644
- nodebpy/nodes/grid.py +932 -447
- nodebpy/nodes/group.py +7 -10
- nodebpy/nodes/input.py +1496 -1308
- nodebpy/nodes/interface.py +236 -117
- nodebpy/nodes/manual.py +2022 -0
- nodebpy/nodes/output.py +85 -0
- nodebpy/nodes/texture.py +867 -7
- nodebpy/nodes/vector.py +528 -0
- nodebpy/nodes/zone.py +7 -7
- nodebpy/{nodes/types.py → types.py} +14 -1
- {nodebpy-0.2.0.dist-info → nodebpy-0.2.1.dist-info}/METADATA +2 -2
- nodebpy-0.2.1.dist-info/RECORD +26 -0
- nodebpy/nodes/mesh.py +0 -17
- nodebpy-0.2.0.dist-info/RECORD +0 -25
- {nodebpy-0.2.0.dist-info → nodebpy-0.2.1.dist-info}/WHEEL +0 -0
- {nodebpy-0.2.0.dist-info → nodebpy-0.2.1.dist-info}/entry_points.txt +0 -0
nodebpy/nodes/output.py
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
import bpy
|
|
4
|
+
|
|
5
|
+
from ..builder import NodeBuilder
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Viewer(NodeBuilder):
|
|
9
|
+
"""Display the input data in the Spreadsheet Editor"""
|
|
10
|
+
|
|
11
|
+
_bl_idname = "GeometryNodeViewer"
|
|
12
|
+
node: bpy.types.GeometryNodeViewer
|
|
13
|
+
|
|
14
|
+
def __init__(
|
|
15
|
+
self,
|
|
16
|
+
ui_shortcut: int = 0,
|
|
17
|
+
domain: Literal[
|
|
18
|
+
"AUTO", "POINT", "EDGE", "FACE", "CORNER", "CURVE", "INSTANCE", "LAYER"
|
|
19
|
+
] = "AUTO",
|
|
20
|
+
):
|
|
21
|
+
super().__init__()
|
|
22
|
+
key_args = {}
|
|
23
|
+
self.ui_shortcut = ui_shortcut
|
|
24
|
+
self.domain = domain
|
|
25
|
+
self._establish_links(**key_args)
|
|
26
|
+
|
|
27
|
+
@classmethod
|
|
28
|
+
def auto(cls) -> "Viewer":
|
|
29
|
+
"""Create Viewer with operation 'Auto'."""
|
|
30
|
+
return cls(domain="AUTO")
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def point(cls) -> "Viewer":
|
|
34
|
+
"""Create Viewer with operation 'Point'."""
|
|
35
|
+
return cls(domain="POINT")
|
|
36
|
+
|
|
37
|
+
@classmethod
|
|
38
|
+
def edge(cls) -> "Viewer":
|
|
39
|
+
"""Create Viewer with operation 'Edge'."""
|
|
40
|
+
return cls(domain="EDGE")
|
|
41
|
+
|
|
42
|
+
@classmethod
|
|
43
|
+
def face(cls) -> "Viewer":
|
|
44
|
+
"""Create Viewer with operation 'Face'."""
|
|
45
|
+
return cls(domain="FACE")
|
|
46
|
+
|
|
47
|
+
@classmethod
|
|
48
|
+
def spline(cls) -> "Viewer":
|
|
49
|
+
"""Create Viewer with operation 'Spline'."""
|
|
50
|
+
return cls(domain="CURVE")
|
|
51
|
+
|
|
52
|
+
@classmethod
|
|
53
|
+
def instance(cls) -> "Viewer":
|
|
54
|
+
"""Create Viewer with operation 'Instance'."""
|
|
55
|
+
return cls(domain="INSTANCE")
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def layer(cls) -> "Viewer":
|
|
59
|
+
"""Create Viewer with operation 'Layer'."""
|
|
60
|
+
return cls(domain="LAYER")
|
|
61
|
+
|
|
62
|
+
@property
|
|
63
|
+
def ui_shortcut(self) -> int:
|
|
64
|
+
return self.node.ui_shortcut
|
|
65
|
+
|
|
66
|
+
@ui_shortcut.setter
|
|
67
|
+
def ui_shortcut(self, value: int):
|
|
68
|
+
self.node.ui_shortcut = value
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def domain(
|
|
72
|
+
self,
|
|
73
|
+
) -> Literal[
|
|
74
|
+
"AUTO", "POINT", "EDGE", "FACE", "CORNER", "CURVE", "INSTANCE", "LAYER"
|
|
75
|
+
]:
|
|
76
|
+
return self.node.domain
|
|
77
|
+
|
|
78
|
+
@domain.setter
|
|
79
|
+
def domain(
|
|
80
|
+
self,
|
|
81
|
+
value: Literal[
|
|
82
|
+
"AUTO", "POINT", "EDGE", "FACE", "CORNER", "CURVE", "INSTANCE", "LAYER"
|
|
83
|
+
],
|
|
84
|
+
):
|
|
85
|
+
self.node.domain = value
|