From 932a718d2dda6cb44237ab405d6cd522846b2a59 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 23 Oct 2024 16:20:22 +0500 Subject: [PATCH] limit active_material_index handler callback --- src/bonsai/bonsai/bim/handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/bim/handler.py b/src/bonsai/bonsai/bim/handler.py index dc8c3bf7c5..6cc0ec4e03 100644 --- a/src/bonsai/bonsai/bim/handler.py +++ b/src/bonsai/bonsai/bim/handler.py @@ -147,7 +147,11 @@ def update_bim_tool_props(): def active_material_index_callback(obj, data): - refresh_ui_data() + from bonsai.bim.module.style.data import BlenderMaterialStyleData + + # Simple UI for showing whether blender material is linked to IFC style, + # no need to update the entire UI. + BlenderMaterialStyleData.is_loaded = False def subscribe_to(obj: bpy.types.ID, data_path: str, callback: Callable[[bpy.types.ID, str], None]):