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/color.py
CHANGED
|
@@ -1,75 +1,71 @@
|
|
|
1
|
+
|
|
1
2
|
import bpy
|
|
2
3
|
|
|
3
4
|
from ..builder import NodeBuilder, SocketLinker
|
|
4
|
-
from
|
|
5
|
-
|
|
5
|
+
from ..types import (
|
|
6
|
+
TYPE_INPUT_COLOR,
|
|
7
|
+
TYPE_INPUT_VALUE,
|
|
8
|
+
)
|
|
6
9
|
|
|
7
|
-
class RGBCurves(NodeBuilder):
|
|
8
|
-
"""Apply color corrections for each color channel"""
|
|
9
10
|
|
|
10
|
-
|
|
11
|
+
class Gamma(NodeBuilder):
|
|
12
|
+
"""Apply a gamma correction"""
|
|
11
13
|
|
|
12
|
-
|
|
13
|
-
node: bpy.types.
|
|
14
|
+
_bl_idname = "ShaderNodeGamma"
|
|
15
|
+
node: bpy.types.ShaderNodeGamma
|
|
14
16
|
|
|
15
17
|
def __init__(
|
|
16
18
|
self,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**kwargs,
|
|
19
|
+
color: TYPE_INPUT_COLOR = None,
|
|
20
|
+
gamma: TYPE_INPUT_VALUE = 1.0,
|
|
20
21
|
):
|
|
21
22
|
super().__init__()
|
|
22
|
-
key_args = {"
|
|
23
|
-
key_args.update(kwargs)
|
|
23
|
+
key_args = {"Color": color, "Gamma": gamma}
|
|
24
24
|
|
|
25
25
|
self._establish_links(**key_args)
|
|
26
26
|
|
|
27
|
-
@property
|
|
28
|
-
def i_factor(self) -> SocketLinker:
|
|
29
|
-
"""Input socket: Factor"""
|
|
30
|
-
return self._input("Fac")
|
|
31
|
-
|
|
32
27
|
@property
|
|
33
28
|
def i_color(self) -> SocketLinker:
|
|
34
29
|
"""Input socket: Color"""
|
|
35
30
|
return self._input("Color")
|
|
36
31
|
|
|
32
|
+
@property
|
|
33
|
+
def i_gamma(self) -> SocketLinker:
|
|
34
|
+
"""Input socket: Gamma"""
|
|
35
|
+
return self._input("Gamma")
|
|
36
|
+
|
|
37
37
|
@property
|
|
38
38
|
def o_color(self) -> SocketLinker:
|
|
39
39
|
"""Output socket: Color"""
|
|
40
40
|
return self._output("Color")
|
|
41
41
|
|
|
42
42
|
|
|
43
|
-
class
|
|
44
|
-
"""Apply
|
|
43
|
+
class RgbCurves(NodeBuilder):
|
|
44
|
+
"""Apply color corrections for each color channel"""
|
|
45
45
|
|
|
46
|
-
|
|
47
|
-
node: bpy.types.
|
|
46
|
+
_bl_idname = "ShaderNodeRGBCurve"
|
|
47
|
+
node: bpy.types.ShaderNodeRGBCurve
|
|
48
48
|
|
|
49
49
|
def __init__(
|
|
50
50
|
self,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
1.0,
|
|
54
|
-
1.0,
|
|
55
|
-
1.0,
|
|
56
|
-
),
|
|
57
|
-
gamma: TYPE_INPUT_VALUE = 1.0,
|
|
51
|
+
fac: TYPE_INPUT_VALUE = 1.0,
|
|
52
|
+
color: TYPE_INPUT_COLOR = None,
|
|
58
53
|
):
|
|
59
54
|
super().__init__()
|
|
60
|
-
key_args = {"
|
|
55
|
+
key_args = {"Fac": fac, "Color": color}
|
|
56
|
+
|
|
61
57
|
self._establish_links(**key_args)
|
|
62
58
|
|
|
59
|
+
@property
|
|
60
|
+
def i_fac(self) -> SocketLinker:
|
|
61
|
+
"""Input socket: Factor"""
|
|
62
|
+
return self._input("Fac")
|
|
63
|
+
|
|
63
64
|
@property
|
|
64
65
|
def i_color(self) -> SocketLinker:
|
|
65
66
|
"""Input socket: Color"""
|
|
66
67
|
return self._input("Color")
|
|
67
68
|
|
|
68
|
-
@property
|
|
69
|
-
def i_gamma(self) -> SocketLinker:
|
|
70
|
-
"""Input socket: Gamma"""
|
|
71
|
-
return self._input("Gamma")
|
|
72
|
-
|
|
73
69
|
@property
|
|
74
70
|
def o_color(self) -> SocketLinker:
|
|
75
71
|
"""Output socket: Color"""
|