This commit is contained in:
Massimo Fabbro
2023-03-17 15:51:56 +01:00
committed by Dion Moult
parent 6c5acfc8bb
commit 64a27614ff
+16 -1
View File
@@ -17,6 +17,7 @@
# along with BlenderBIM Add-on. If not, see <http://www.gnu.org/licenses/>.
import bpy
import blenderbim
import importlib
from . import handler, ui, prop, operator, helper
@@ -171,7 +172,21 @@ def register():
def unregister():
for cls in reversed(classes):
bpy.utils.unregister_class(cls)
if ( #these panels haven't the cls.is_registered attribute
cls == blenderbim.bim.module.drawing.gizmos.ExtrusionWidget or
cls == blenderbim.bim.module.drawing.gizmos.ExtrusionGuidesGizmo or
cls == blenderbim.bim.module.drawing.gizmos.DimensionLabelGizmo or
cls == blenderbim.bim.module.drawing.gizmos.DotGizmo or
cls == blenderbim.bim.module.drawing.gizmos.UglyDotGizmo
):
if bpy.data.scenes['Scene'].BIMProperties.module_visibility['drawing'].is_visible is True:
bpy.utils.unregister_class(cls)
continue
else:
continue
if cls.is_registered is not False:
bpy.utils.unregister_class(cls)
bpy.app.handlers.load_post.remove(handler.setDefaultProperties)
bpy.app.handlers.load_post.remove(handler.loadIfcStore)
bpy.app.handlers.save_post.remove(handler.ensureIfcExported)