We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4c0e63e commit a727187Copy full SHA for a727187
1 file changed
gridData/core.py
@@ -38,7 +38,11 @@
38
import pickle
39
40
import numpy
41
-import openvdb as vdb
+
42
+try:
43
+ import openvdb as vdb
44
+except ImportError:
45
+ vdb = None
46
47
# For interpolated grids: need scipy.ndimage but we import it only when needed:
48
# import scipy
@@ -639,7 +643,7 @@ def _is_native_object(self, obj):
639
643
bool
640
644
True if obj is a native format object
641
645
"""
642
- if isinstance(obj, vdb.GridBase):
646
+ if vdb is not None and isinstance(obj, vdb.GridBase):
647
return True
648
649
return False
0 commit comments