diff --git a/src/bonsai/bonsai/bim/ui.py b/src/bonsai/bonsai/bim/ui.py index 045f253d67..9a07b4d9df 100644 --- a/src/bonsai/bonsai/bim/ui.py +++ b/src/bonsai/bonsai/bim/ui.py @@ -446,8 +446,11 @@ class BIM_PT_tabs(Panel): op = box.operator("bim.open_uri", text="How Can I Fix This?") op.uri = "https://docs.bonsaibim.org/users/troubleshooting.html" + if not tool.Ifc.get(): + return + props = context.scene.BIMProperties - if (tool.Ifc.get() or props.ifc_file) and props.has_blend_warning: + if props.has_blend_warning: box = self.layout.box() box.alert = True row = box.row(align=True) @@ -464,6 +467,14 @@ class BIM_PT_tabs(Panel): op = row.operator("bim.open_uri", text="", icon="QUESTION") op.uri = "https://docs.bonsaibim.org/users/troubleshooting.html#incompatible-blender-features" + if (o := context.active_object) and [round(x, 4) for x in list(o.matrix_world.to_scale())] != [1, 1, 1]: + box = self.layout.box() + box.alert = True + row = box.row(align=True) + row.label(text="Object scaling will be lost", icon="ERROR") + op = row.operator("bim.open_uri", text="", icon="QUESTION") + op.uri = "https://docs.bonsaibim.org/users/troubleshooting.html#incompatible-blender-features" + def draw_tab_entry(self, row, icon, tab_name, enabled=True, highlight=False): tab_entry = row.row(align=True) tab_entry.operator("bim.set_tab", text="", emboss=highlight, icon=icon, depress=True).tab = tab_name diff --git a/src/bonsai/docs/guides/troubleshooting.rst b/src/bonsai/docs/guides/troubleshooting.rst index 3bf3f7be32..882ccecb4f 100644 --- a/src/bonsai/docs/guides/troubleshooting.rst +++ b/src/bonsai/docs/guides/troubleshooting.rst @@ -116,6 +116,10 @@ incompatible features may result in data loss. unpredictable effects and changes may be discarded. Instead, always use the :kbd:`Tab` key to toggle object editing, or use the IFC Object / Edit mode toggle in the top right of the :menuselection:`3D Viewport`. +2. **Object scaling**. Bonsai does not support scaled objects in IFC. Any + objects that have been scaled in object mode will have their scale reset to + 1, and scaling an object may result in unpredictable operations. Instead, + scale objects within edit mode. Where is the add-on installed? ------------------------------