mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
See #5337. Grid decorators now turn off when editing an axis.
This commit is contained in:
@@ -67,6 +67,9 @@ class GridDecorator:
|
|||||||
for axis in context.scene.BIMGridProperties.grid_axes:
|
for axis in context.scene.BIMGridProperties.grid_axes:
|
||||||
if not (obj := axis.obj):
|
if not (obj := axis.obj):
|
||||||
continue
|
continue
|
||||||
|
if obj.select_get() and context.mode != "OBJECT":
|
||||||
|
continue
|
||||||
|
|
||||||
tag = obj.name.split("/")[-1]
|
tag = obj.name.split("/")[-1]
|
||||||
matrix_world = obj.matrix_world
|
matrix_world = obj.matrix_world
|
||||||
v1 = matrix_world @ obj.data.vertices[0].co
|
v1 = matrix_world @ obj.data.vertices[0].co
|
||||||
@@ -115,6 +118,8 @@ class GridDecorator:
|
|||||||
for axis in context.scene.BIMGridProperties.grid_axes:
|
for axis in context.scene.BIMGridProperties.grid_axes:
|
||||||
if obj := axis.obj:
|
if obj := axis.obj:
|
||||||
if obj.select_get():
|
if obj.select_get():
|
||||||
|
if context.mode != "OBJECT":
|
||||||
|
continue
|
||||||
edges = selected_edges
|
edges = selected_edges
|
||||||
verts = selected_verts
|
verts = selected_verts
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -456,7 +456,7 @@ class BIM_PT_tabs(Panel):
|
|||||||
op.uri = "https://docs.bonsaibim.org/guides/troubleshooting.html#saving-and-loading-blend-files"
|
op.uri = "https://docs.bonsaibim.org/guides/troubleshooting.html#saving-and-loading-blend-files"
|
||||||
row.operator("bim.close_blend_warning", text="", icon="CANCEL")
|
row.operator("bim.close_blend_warning", text="", icon="CANCEL")
|
||||||
|
|
||||||
if context.mode != context.scene.BIMGeometryProperties.mode:
|
if not context.mode.startswith(context.scene.BIMGeometryProperties.mode):
|
||||||
box = self.layout.box()
|
box = self.layout.box()
|
||||||
box.alert = True
|
box.alert = True
|
||||||
row = box.row(align=True)
|
row = box.row(align=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user