See #5269. Minor tweak to show warning if object scaling detected.

This commit is contained in:
Dion Moult
2024-09-03 12:52:57 +10:00
parent 4ce2251717
commit 4ce30b3153
2 changed files with 16 additions and 1 deletions
+12 -1
View File
@@ -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
@@ -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?
------------------------------