mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
See #5269. Minor tweak to show warning if object scaling detected.
This commit is contained in:
@@ -446,8 +446,11 @@ class BIM_PT_tabs(Panel):
|
|||||||
op = box.operator("bim.open_uri", text="How Can I Fix This?")
|
op = box.operator("bim.open_uri", text="How Can I Fix This?")
|
||||||
op.uri = "https://docs.bonsaibim.org/users/troubleshooting.html"
|
op.uri = "https://docs.bonsaibim.org/users/troubleshooting.html"
|
||||||
|
|
||||||
|
if not tool.Ifc.get():
|
||||||
|
return
|
||||||
|
|
||||||
props = context.scene.BIMProperties
|
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 = self.layout.box()
|
||||||
box.alert = True
|
box.alert = True
|
||||||
row = box.row(align=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 = row.operator("bim.open_uri", text="", icon="QUESTION")
|
||||||
op.uri = "https://docs.bonsaibim.org/users/troubleshooting.html#incompatible-blender-features"
|
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):
|
def draw_tab_entry(self, row, icon, tab_name, enabled=True, highlight=False):
|
||||||
tab_entry = row.row(align=True)
|
tab_entry = row.row(align=True)
|
||||||
tab_entry.operator("bim.set_tab", text="", emboss=highlight, icon=icon, depress=True).tab = tab_name
|
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
|
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
|
:kbd:`Tab` key to toggle object editing, or use the IFC Object / Edit mode
|
||||||
toggle in the top right of the :menuselection:`3D Viewport`.
|
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?
|
Where is the add-on installed?
|
||||||
------------------------------
|
------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user