mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Fix bug #2825
This commit is contained in:
committed by
Dion Moult
parent
6c5acfc8bb
commit
64a27614ff
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user