mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 02:31:09 +00:00
copy_node_graph handle missing temp_override keys
This commit is contained in:
@@ -387,6 +387,8 @@ class Blender(bonsai.core.tool.Blender):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def copy_node_graph(cls, material_to: bpy.types.Material, material_from: bpy.types.Material) -> None:
|
def copy_node_graph(cls, material_to: bpy.types.Material, material_from: bpy.types.Material) -> None:
|
||||||
temp_override = cls.get_shader_editor_context()
|
temp_override = cls.get_shader_editor_context()
|
||||||
|
if not temp_override or any(k not in temp_override for k in ("area", "space", "screen")) or temp_override.get("window") is None:
|
||||||
|
return
|
||||||
shader_editor = temp_override["space"]
|
shader_editor = temp_override["space"]
|
||||||
|
|
||||||
# remove all nodes from the current material
|
# remove all nodes from the current material
|
||||||
|
|||||||
Reference in New Issue
Block a user