Skip to content

Commit

Permalink
Alert user when dracopy is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
einarf committed Dec 6, 2024
1 parent 2662103 commit 3084c72
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion moderngl_window/loaders/scene/gltf2.py
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,10 @@ def load(self, materials: list[Material]) -> list[Mesh]:
if primitive.extensions.get("KHR_draco_mesh_compression"):
buffer_view = primitive.extensions["KHR_draco_mesh_compression"]["bufferView"]
data = buffer_view.read_raw()
import DracoPy
try:
import DracoPy
except ImportError:
raise ImportError("DracoPy is required to load draco compressed meshes")
mesh = DracoPy.decode(data)

attributes = {
Expand Down

0 comments on commit 3084c72

Please sign in to comment.