From 4e186f4a62d61b81a53855c828d187db0b26b0af Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Sun, 2 Jul 2023 10:44:01 +0500 Subject: [PATCH] Error editing roof profile #3357 it was assuming it's a slab and was giving errors trying to start editing slab profile File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\model\slab.py", line 618, in _execute if extrusion.Position: AttributeError: 'NoneType' object has no attribute 'Position' --- .../blenderbim/bim/module/model/workspace.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/model/workspace.py b/src/blenderbim/blenderbim/bim/module/model/workspace.py index d6d23788a2..fb0d11a79b 100644 --- a/src/blenderbim/blenderbim/bim/module/model/workspace.py +++ b/src/blenderbim/blenderbim/bim/module/model/workspace.py @@ -429,6 +429,15 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator): bpy.ops.bim.enable_editing_railing_path() return + elif ( + (RoofData.is_loaded or not RoofData.load()) + and RoofData.data["parameters"] + and not bpy.context.active_object.BIMRoofProperties.is_editing_path + ): + # undo the unselection done above because roof has no usage type + bpy.ops.bim.enable_editing_roof_path() + return + selected_usages = {} for obj in bpy.context.selected_objects: element = tool.Ifc.get_entity(obj) @@ -483,15 +492,6 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator): [o.select_set(False) for o in selected_usages.get("LAYER2", [])] bpy.ops.bim.extend_profile(join_type="T") - elif ( - (RoofData.is_loaded or not RoofData.load()) - and RoofData.data["parameters"] - and not bpy.context.active_object.BIMRoofProperties.is_editing_path - ): - # undo the unselection done above because roof has no usage type - bpy.context.object.select_set(True) - bpy.ops.bim.enable_editing_roof_path() - elif DecoratorData.get_ifc_text_data(bpy.context.object): bpy.context.object.select_set(True) bpy.ops.bim.edit_text_popup()