Skip to content

Commit

Permalink
Merge branch 'main' of github.com:KhronosGroup/glTF-Blender-IO
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Aug 30, 2024
2 parents 51c380e + cd5646d commit 0bcf295
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,13 @@ def get_constant(self, in_soc=None):
color = color[:3] # drop unused alpha component (assumes shader tree)
return color, "node_tree." + nav.out_socket.path_from_id() + ".default_value"

elif self.in_socket.type == 'SHADER':
# Historicaly, we manage RGB node plugged into a shader socket (output node)
if nav.node.type == 'RGB':
color = list(nav.out_socket.default_value)
color = color[:3]
return color, "node_tree." + nav.out_socket.path_from_id() + ".default_value"

elif self.in_socket.type == 'VALUE':
if nav.node.type == 'VALUE':
return nav.out_socket.default_value, "node_tree." + nav.out_socket.path_from_id() + ".default_value"
Expand Down

0 comments on commit 0bcf295

Please sign in to comment.