Skip to content

Commit

Permalink
Fix direct links not working on Eevee
Browse files Browse the repository at this point in the history
  • Loading branch information
blenderskool committed Apr 26, 2020
1 parent dbcc4ba commit bc2f670
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,22 +257,20 @@ def init(self, context):
self.width = 226

def update(self):
if bpy.context.scene.render.engine == 'CYCLES':
out = ""
try:
for attr in ('materials', 'lights', 'worlds'):
for item in getattr(bpy.data, attr):
for node in item.node_tree.nodes:
if node.bl_idname == 'spectrum_palette.node':
for out in node.outputs:
if out.is_linked:
for o in out.links:
if o.is_valid:
if o.to_node.bl_idname == 'NodeReroute':
update_reroutes(attr, item.name, node.name, o.to_node.name, out.name)
o.to_socket.node.inputs[o.to_socket.name].default_value = out.default_value
except:
pass
try:
for attr in ('materials', 'lights', 'worlds'):
for item in getattr(bpy.data, attr):
for node in item.node_tree.nodes:
if node.bl_idname == 'spectrum_palette.node':
for out in node.outputs:
if out.is_linked:
for o in out.links:
if o.is_valid:
if o.to_node.bl_idname == 'NodeReroute':
update_reroutes(attr, item.name, node.name, o.to_node.name, out.name)
o.to_socket.node.inputs[o.to_socket.name].default_value = out.default_value
except:
pass

# Additional buttons displayed on the node.
def draw_buttons(self, context, layout):
Expand Down

0 comments on commit bc2f670

Please sign in to comment.