mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
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:
@@ -34,7 +34,8 @@ from .add_railing_representation import add_railing_representation
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
from .add_representation import add_representation
|
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.
|
pass # Silently fail. This is Blender / Bonsai specific and on its way out.
|
||||||
from .add_shape_aspect import add_shape_aspect
|
from .add_shape_aspect import add_shape_aspect
|
||||||
from .add_slab_representation import add_slab_representation
|
from .add_slab_representation import add_slab_representation
|
||||||
|
|||||||
Reference in New Issue
Block a user