mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 21:53:40 +00:00
fix error
This commit is contained in:
committed by
Dion Moult
parent
8845440edd
commit
a21939dc0d
@@ -676,8 +676,17 @@ class BIM_OT_add_section_plane(bpy.types.Operator):
|
|||||||
material.use_nodes = True
|
material.use_nodes = True
|
||||||
if material.node_tree.nodes.get("Section Override"):
|
if material.node_tree.nodes.get("Section Override"):
|
||||||
continue
|
continue
|
||||||
material.blend_method = "HASHED"
|
# In EEVEE rendering engine, `blend_mode` is deprecated and replaced by `surface_render_method`
|
||||||
material.shadow_method = "HASHED"
|
if (hasattr(material, "surface_render_method")):
|
||||||
|
material.surface_render_method = "DITHERED"
|
||||||
|
else:
|
||||||
|
material.blend_method = "HASHED"
|
||||||
|
|
||||||
|
# https://developer.blender.org/docs/release_notes/4.2/eevee_migration/#materials
|
||||||
|
# TODO: Find an alternative for EEVEE engine
|
||||||
|
if (hasattr(material, "shadow_method")):
|
||||||
|
material.shadow_method = "HASHED"
|
||||||
|
|
||||||
material_output = tool.Blender.get_material_node(material, "OUTPUT_MATERIAL", {"is_active_output": True})
|
material_output = tool.Blender.get_material_node(material, "OUTPUT_MATERIAL", {"is_active_output": True})
|
||||||
if not material_output:
|
if not material_output:
|
||||||
continue
|
continue
|
||||||
|
|||||||
Reference in New Issue
Block a user