avoid errors unregistering tools from tests

This commit is contained in:
Andrej730
2023-06-29 13:42:55 +05:00
parent 8efaf2fbcb
commit fb7591caef
2 changed files with 4 additions and 2 deletions
@@ -60,7 +60,8 @@ def register():
def unregister(): def unregister():
bpy.utils.unregister_tool(workspace.SpatialTool) if not bpy.app.background:
bpy.utils.unregister_tool(workspace.SpatialTool)
del bpy.types.Scene.BIMSpatialProperties del bpy.types.Scene.BIMSpatialProperties
del bpy.types.Object.BIMObjectSpatialProperties del bpy.types.Object.BIMObjectSpatialProperties
del bpy.types.Scene.BIMSpatialManagerProperties del bpy.types.Scene.BIMSpatialManagerProperties
@@ -100,6 +100,7 @@ def register():
def unregister(): def unregister():
bpy.utils.unregister_tool(workspace.StructuralTool) if not bpy.app.background:
bpy.utils.unregister_tool(workspace.StructuralTool)
del bpy.types.Scene.BIMStructuralProperties del bpy.types.Scene.BIMStructuralProperties
del bpy.types.Object.BIMStructuralProperties del bpy.types.Object.BIMStructuralProperties