mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Now generate space and generate spaces from walls are always visible in the UI so users understand better that are different procedures
This commit is contained in:
committed by
Massimo Fabbro
parent
c1cd228911
commit
066616707a
@@ -35,7 +35,9 @@ class GenerateSpace(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
def poll(cls, context):
|
def poll(cls, context):
|
||||||
collection = context.view_layer.active_layer_collection.collection
|
collection = context.view_layer.active_layer_collection.collection
|
||||||
collection_obj = collection.BIMCollectionProperties.obj
|
collection_obj = collection.BIMCollectionProperties.obj
|
||||||
return tool.Ifc.get_entity(collection_obj)
|
active_obj = bpy.context.active_object
|
||||||
|
element = tool.Ifc.get_entity(active_obj)
|
||||||
|
return tool.Ifc.get_entity(collection_obj) and not element.is_a("IfcWall")
|
||||||
|
|
||||||
def _execute(self, context):
|
def _execute(self, context):
|
||||||
# This works as a 2.5 extruded polygon based on a cutting plane. Note
|
# This works as a 2.5 extruded polygon based on a cutting plane. Note
|
||||||
|
|||||||
@@ -98,10 +98,11 @@ class SpatialToolUI:
|
|||||||
row = cls.layout.row(align=True)
|
row = cls.layout.row(align=True)
|
||||||
row.label(text="", icon="EVENT_SHIFT")
|
row.label(text="", icon="EVENT_SHIFT")
|
||||||
row.label(text="", icon="EVENT_A")
|
row.label(text="", icon="EVENT_A")
|
||||||
if context.selected_objects:
|
row.operator("bim.generate_spaces_from_walls")
|
||||||
row.operator("bim.generate_spaces_from_walls")
|
row = cls.layout.row(align=True)
|
||||||
else:
|
row.label(text="", icon="EVENT_SHIFT")
|
||||||
row.operator("bim.generate_space")
|
row.label(text="", icon="EVENT_A")
|
||||||
|
row.operator("bim.generate_space")
|
||||||
row = cls.layout.row(align=True)
|
row = cls.layout.row(align=True)
|
||||||
row.label(text="", icon="EVENT_SHIFT")
|
row.label(text="", icon="EVENT_SHIFT")
|
||||||
row.label(text="", icon="EVENT_T")
|
row.label(text="", icon="EVENT_T")
|
||||||
|
|||||||
Reference in New Issue
Block a user