nodebpy 0.1.1__py3-none-any.whl → 0.2.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 +770 -306
- nodebpy/nodes/__init__.py +623 -9
- nodebpy/nodes/attribute.py +174 -273
- nodebpy/nodes/color.py +76 -0
- nodebpy/nodes/converter.py +4518 -0
- nodebpy/nodes/experimental.py +314 -0
- nodebpy/nodes/geometry.py +3665 -5250
- nodebpy/nodes/grid.py +1228 -0
- nodebpy/nodes/group.py +20 -0
- nodebpy/nodes/input.py +1571 -254
- nodebpy/nodes/interface.py +400 -0
- nodebpy/nodes/mesh.py +0 -1391
- nodebpy/nodes/texture.py +70 -0
- nodebpy/nodes/types.py +319 -6
- nodebpy/nodes/vector.py +0 -0
- nodebpy/nodes/zone.py +442 -0
- nodebpy/screenshot.py +2 -1
- nodebpy/sockets.py +12 -12
- {nodebpy-0.1.1.dist-info → nodebpy-0.2.0.dist-info}/METADATA +4 -4
- nodebpy-0.2.0.dist-info/RECORD +25 -0
- nodebpy/nodes/curve.py +0 -2006
- nodebpy/nodes/manually_specified.py +0 -1382
- nodebpy/nodes/utilities.py +0 -2344
- nodebpy-0.1.1.dist-info/RECORD +0 -19
- {nodebpy-0.1.1.dist-info → nodebpy-0.2.0.dist-info}/WHEEL +0 -0
- {nodebpy-0.1.1.dist-info → nodebpy-0.2.0.dist-info}/entry_points.txt +0 -0
nodebpy/nodes/color.py
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import bpy
|
|
2
|
+
|
|
3
|
+
from ..builder import NodeBuilder, SocketLinker
|
|
4
|
+
from .types import TYPE_INPUT_COLOR, TYPE_INPUT_VALUE
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RGBCurves(NodeBuilder):
|
|
8
|
+
"""Apply color corrections for each color channel"""
|
|
9
|
+
|
|
10
|
+
# TODO: add support for custom curves along with FloatCurve
|
|
11
|
+
|
|
12
|
+
name = "ShaderNodeRGBCurve"
|
|
13
|
+
node: bpy.types.ShaderNodeRGBCurve
|
|
14
|
+
|
|
15
|
+
def __init__(
|
|
16
|
+
self,
|
|
17
|
+
factor: TYPE_INPUT_VALUE = 1.0,
|
|
18
|
+
color: TYPE_INPUT_COLOR = (1.0, 1.0, 1.0, 1.0),
|
|
19
|
+
**kwargs,
|
|
20
|
+
):
|
|
21
|
+
super().__init__()
|
|
22
|
+
key_args = {"Factor": factor, "Color": color}
|
|
23
|
+
key_args.update(kwargs)
|
|
24
|
+
|
|
25
|
+
self._establish_links(**key_args)
|
|
26
|
+
|
|
27
|
+
@property
|
|
28
|
+
def i_factor(self) -> SocketLinker:
|
|
29
|
+
"""Input socket: Factor"""
|
|
30
|
+
return self._input("Fac")
|
|
31
|
+
|
|
32
|
+
@property
|
|
33
|
+
def i_color(self) -> SocketLinker:
|
|
34
|
+
"""Input socket: Color"""
|
|
35
|
+
return self._input("Color")
|
|
36
|
+
|
|
37
|
+
@property
|
|
38
|
+
def o_color(self) -> SocketLinker:
|
|
39
|
+
"""Output socket: Color"""
|
|
40
|
+
return self._output("Color")
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Gamma(NodeBuilder):
|
|
44
|
+
"""Apply a gamma correction"""
|
|
45
|
+
|
|
46
|
+
name = "ShaderNodeGamma"
|
|
47
|
+
node: bpy.types.ShaderNodeGamma
|
|
48
|
+
|
|
49
|
+
def __init__(
|
|
50
|
+
self,
|
|
51
|
+
color: TYPE_INPUT_COLOR = (
|
|
52
|
+
1.0,
|
|
53
|
+
1.0,
|
|
54
|
+
1.0,
|
|
55
|
+
1.0,
|
|
56
|
+
),
|
|
57
|
+
gamma: TYPE_INPUT_VALUE = 1.0,
|
|
58
|
+
):
|
|
59
|
+
super().__init__()
|
|
60
|
+
key_args = {"Color": color, "Gamma": gamma}
|
|
61
|
+
self._establish_links(**key_args)
|
|
62
|
+
|
|
63
|
+
@property
|
|
64
|
+
def i_color(self) -> SocketLinker:
|
|
65
|
+
"""Input socket: Color"""
|
|
66
|
+
return self._input("Color")
|
|
67
|
+
|
|
68
|
+
@property
|
|
69
|
+
def i_gamma(self) -> SocketLinker:
|
|
70
|
+
"""Input socket: Gamma"""
|
|
71
|
+
return self._input("Gamma")
|
|
72
|
+
|
|
73
|
+
@property
|
|
74
|
+
def o_color(self) -> SocketLinker:
|
|
75
|
+
"""Output socket: Color"""
|
|
76
|
+
return self._output("Color")
|