Some changes left-over after conflict resolution

This commit is contained in:
Thomas Krijnen
2024-04-15 09:15:19 +02:00
parent ad01945561
commit 1e5f7c93fa
3 changed files with 5 additions and 19 deletions
+2 -13
View File
@@ -269,21 +269,10 @@ def unregister():
bpy.utils.previews.remove(icons)
for cls in reversed(classes):
# GizmoGroup, Gizmo and Macro doesn't have cls.is_registered attribute
if set((bpy.types.GizmoGroup, bpy.types.Gizmo)) & set(cls.__bases__):
if bpy.data.scenes["Scene"].BIMProperties.module_visibility["drawing"].is_visible:
bpy.utils.unregister_class(cls)
continue
if bpy.types.Macro in cls.__bases__:
bpy.utils.unregister_class(cls)
continue
if getattr(cls, "is_registered", None) is None:
bpy.utils.unregister_class(cls)
else:
if cls.is_registered is not False:
bpy.utils.unregister_class(cls)
elif cls.is_registered:
bpy.utils.unregister_class(cls)
bpy.app.handlers.load_post.remove(handler.load_post)
bpy.app.handlers.load_post.remove(handler.loadIfcStore)
@@ -1216,10 +1216,6 @@ class RefreshLinkedAggregate(bpy.types.Operator):
return list(set(linked_aggregate_groups)), selected_parents
selected_objs = context.selected_objects
selected_elements = [tool.Ifc.get_entity(selected_obj) for selected_obj in selected_objs]
active_element = tool.Ifc.get_entity(context.active_object)
if not active_element:
self.report({"INFO"}, "Object has no Ifc metadata.")
+3 -2
View File
@@ -150,7 +150,7 @@ def select_decomposed_elements(spatial):
spatial.select_products(spatial.get_decomposed_elements(container))
#HERE STARTS SPATIAL TOOL
# HERE STARTS SPATIAL TOOL
def generate_space(ifc, spatial, model, Type):
active_obj = spatial.get_active_obj()
selected_objects = spatial.get_selected_objects()
@@ -168,7 +168,7 @@ def generate_space(ifc, spatial, model, Type):
element = ifc.get_entity(active_obj)
else:
x, y, z, h, mat = spatial.get_x_y_z_h_mat_from_cursor() ##mat
x, y, z, h, mat = spatial.get_x_y_z_h_mat_from_cursor() ##mat
space_polygon = spatial.get_space_polygon_from_context_visible_objects(x, y)
@@ -222,6 +222,7 @@ def generate_spaces_from_walls(ifc, spatial, collector):
spatial.assign_container_to_obj(obj)
def toggle_space_visibility(ifc, spatial):
model = ifc.get()
spaces = model.by_type("IfcSpace")