diff --git a/src/blenderbim/blenderbim/bim/module/spatial/__init__.py b/src/blenderbim/blenderbim/bim/module/spatial/__init__.py index 36a178196c..f1223bb684 100644 --- a/src/blenderbim/blenderbim/bim/module/spatial/__init__.py +++ b/src/blenderbim/blenderbim/bim/module/spatial/__init__.py @@ -60,7 +60,8 @@ def register(): 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.Object.BIMObjectSpatialProperties del bpy.types.Scene.BIMSpatialManagerProperties diff --git a/src/blenderbim/blenderbim/bim/module/structural/__init__.py b/src/blenderbim/blenderbim/bim/module/structural/__init__.py index 8abf140f4c..99f44a971a 100644 --- a/src/blenderbim/blenderbim/bim/module/structural/__init__.py +++ b/src/blenderbim/blenderbim/bim/module/structural/__init__.py @@ -100,6 +100,7 @@ def register(): 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.Object.BIMStructuralProperties