avoid full shader rebuilds in intermediate property write

This commit is contained in:
falken10vdl
2026-04-27 11:39:36 +02:00
parent 9bbd2b1854
commit 6314d9c818
@@ -782,8 +782,12 @@ class EditSurfaceStyle(bpy.types.Operator, tool.Ifc.Operator):
def _execute(self, context): def _execute(self, context):
self.props = tool.Style.get_style_props() self.props = tool.Style.get_style_props()
self.style = tool.Ifc.get().by_id(self.props.is_editing_style) self.style = tool.Ifc.get().by_id(self.props.is_editing_style)
prev_update_graph = self.props.update_graph
self.props["update_graph"] = False
try:
style_elements = tool.Style.get_style_elements(self.style) style_elements = tool.Style.get_style_elements(self.style)
# NOTE: currently this operator is used to edit existing (and only existing) IfcSurfaceStyles # NOTE: currently this operator is used to edit existing (and only existing) IfcSurfaceStyles
# or new or existing IfcSurfaceStyle components (shading, etc) # or new or existing IfcSurfaceStyle components (shading, etc)
# which is kind of confusing. # which is kind of confusing.
@@ -810,6 +814,8 @@ class EditSurfaceStyle(bpy.types.Operator, tool.Ifc.Operator):
material = tool.Ifc.get_object(self.style) material = tool.Ifc.get_object(self.style)
msprops = tool.Style.get_material_style_props(material) msprops = tool.Style.get_material_style_props(material)
msprops.active_style_type = msprops.active_style_type msprops.active_style_type = msprops.active_style_type
finally:
self.props["update_graph"] = prev_update_graph
def edit_existing_style(self) -> None: def edit_existing_style(self) -> None:
ifc_file = tool.Ifc.get() ifc_file = tool.Ifc.get()