(cherry picked from commit a586c7f695)
This commit is contained in:
Andrej730
2026-07-24 15:43:55 +05:00
committed by Dion Moult
parent b37499ddf7
commit 83aef5e4d5
+3 -3
View File
@@ -639,9 +639,9 @@ class Style(bonsai.core.tool.Style):
) -> tuple[tuple[float, float, float], float]:
if material.node_tree:
nodes = material.node_tree.nodes
output_node = next(
(n for n in nodes if n.type == "OUTPUT_MATERIAL" and n.is_active_output), None
) or next((n for n in nodes if n.type == "OUTPUT_MATERIAL"), None)
output_node = next((n for n in nodes if n.type == "OUTPUT_MATERIAL" and n.is_active_output), None) or next(
(n for n in nodes if n.type == "OUTPUT_MATERIAL"), None
)
if output_node:
result = cls._color_from_shader_socket(output_node.inputs["Surface"])
if result: