Skip to content

Commit 7b4a9a6

Browse files
neo2068CodeFHD
authored andcommitted
Fix light group operator
1 parent f344b9a commit 7b4a9a6

1 file changed

Lines changed: 11 additions & 11 deletions

File tree

operators/lightgroups.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ def create_editor():
9292

9393
input_node = editor.nodes.new("NodeGroupInput")
9494
output_node = editor.nodes.new("NodeGroupOutput")
95-
editor.inputs.new("NodeSocketColor", "Light Group")
96-
gain = editor.inputs.new("NodeSocketFloat", "Gain")
95+
editor.interface.new_socket(socket_type="NodeSocketColor", name="Light Group", in_out="INPUT")
96+
gain = editor.interface.new_socket(socket_type="NodeSocketFloat", name="Gain", in_out="INPUT")
9797
gain.default_value = 1
9898
gain.min_value = 0
99-
color = editor.inputs.new("NodeSocketColor", "Color")
99+
color = editor.interface.new_socket(socket_type="NodeSocketColor", name="Color", in_out="INPUT")
100100
color.default_value = (1, 1, 1, 1)
101-
editor.outputs.new("NodeSocketColor", "Image")
101+
editor.interface.new_socket(socket_type="NodeSocketColor", name="Image", in_out="OUTPUT")
102102

103103
multiply_color = editor.nodes.new("CompositorNodeMixRGB")
104104
multiply_color.blend_type = "MULTIPLY"
@@ -136,10 +136,10 @@ def create_mixer(editor):
136136

137137
input_node = mixer.nodes.new("NodeGroupInput")
138138
output_node = mixer.nodes.new("NodeGroupOutput")
139-
mixer.inputs.new("NodeSocketColor", "ALBEDO")
140-
mixer.inputs.new("NodeSocketVector", "AVG_SHADING_NORMAL")
141-
mixer.outputs.new("NodeSocketColor", "Denoised Image")
142-
mixer.outputs.new("NodeSocketColor", "Noisy Image")
139+
mixer.interface.new_socket(socket_type="NodeSocketColor", name="ALBEDO", in_out="INPUT")
140+
mixer.interface.new_socket(socket_type="NodeSocketVector", name="AVG_SHADING_NORMAL", in_out="INPUT")
141+
mixer.interface.new_socket(socket_type="NodeSocketColor", name="Denoised Image", in_out="OUTPUT")
142+
mixer.interface.new_socket(socket_type="NodeSocketColor", name="Noisy Image", in_out="OUTPUT")
143143

144144
input_node.location = (-750, -110)
145145
output_node.location = (1455, -930)
@@ -153,14 +153,14 @@ def create_mixer(editor):
153153
for i in range(MAX_LIGHTGROUPS):
154154
input_index_offset = MIXER_SOCKET_INDEX_START + i * MIXER_SOCKET_INDEX_STEP
155155
# Light Group i
156-
mixer.inputs.new("NodeSocketColor", f"Light Group {i + 1}")
156+
mixer.interface.new_socket(socket_type="NodeSocketColor", name=f"Light Group {i + 1}", in_out="INPUT")
157157
light_group_input = input_node.outputs[input_index_offset]
158158
# Gain
159-
gain = mixer.inputs.new("NodeSocketFloat", "Gain")
159+
gain = mixer.interface.new_socket(socket_type="NodeSocketFloat", name="Gain", in_out="INPUT")
160160
gain.default_value = 1
161161
gain.min_value = 0
162162
# Color
163-
color = mixer.inputs.new("NodeSocketColor", "Color")
163+
color = mixer.interface.new_socket(socket_type="NodeSocketColor", name="Color", in_out="INPUT")
164164
color.default_value = (1, 1, 1, 1)
165165

166166
editor_instance = mixer.nodes.new("CompositorNodeGroup")

0 commit comments

Comments
 (0)