Skip to content

Commit

Permalink
Merge: Blender official patch (8fb28124ba40836941ad0fef8b53d2b450250054)
Browse files Browse the repository at this point in the history
  • Loading branch information
nutti committed Mar 21, 2023
1 parent 57fc804 commit bef07dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/magic_uv/op/texture_projection.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ def execute(self, context):
# assign image
if compat.check_version(2, 80, 0) >= 0:
node_tree = obj.active_material.node_tree
output_node = node_tree.nodes["Material Output"]
output_node = next(n for n in node_tree.nodes
if n.type == "OUTPUT_MATERIAL")

nodes = common.find_texture_nodes_from_material(
obj.active_material)
Expand Down
3 changes: 2 additions & 1 deletion src/magic_uv/op/uv_inspection.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,8 @@ def execute(self, context):
"MagicUV_PaintUVMaterial_{}".format(i))
if compat.check_version(2, 80, 0) >= 0:
target_mtrl.use_nodes = True
output_node = target_mtrl.node_tree.nodes["Material Output"]
output_node = next(n for n in target_mtrl.node_tree.nodes
if n.type == "OUTPUT_MATERIAL")
nodes_to_remove = [n for n in target_mtrl.node_tree.nodes
if n != output_node]
for n in nodes_to_remove:
Expand Down

0 comments on commit bef07dc

Please sign in to comment.