ifcopenshell.api.geometry to fail more gracefully with fake-bpy

If user has fake-bpy-module for type hints, it will fail with `ImportError: cannot import name 'Vector' from 'mathutils' (unknown location)` instead of `ModuleNotFoundError`.
This commit is contained in:
Andrej
2025-05-30 13:16:03 +05:00
parent e41c4bf7ae
commit 2798bf3b68
@@ -34,7 +34,8 @@ from .add_railing_representation import add_railing_representation
try:
from .add_representation import add_representation
except ModuleNotFoundError:
except (ModuleNotFoundError, ImportError):
# ImportError - in case if user has fake-bpy modules.
pass # Silently fail. This is Blender / Bonsai specific and on its way out.
from .add_shape_aspect import add_shape_aspect
from .add_slab_representation import add_slab_representation