From cfcd1fcb06d25d292dbfba0a8f1a10a2a2192ab4 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 9 Feb 2025 16:37:11 -0500 Subject: [PATCH] Disallow exporting colliders with no vertices. Trying to give PhysX a null triangle mesh gives it heartburn. The poor dear. --- korman/exporter/physics.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/korman/exporter/physics.py b/korman/exporter/physics.py index ef6f181..41ea674 100644 --- a/korman/exporter/physics.py +++ b/korman/exporter/physics.py @@ -82,6 +82,10 @@ class PhysicsConverter: mesh.update(calc_tessface=indices) vertices = [hsVector3(*i.co) for i in mesh.vertices] + # Trying to export a collider with no vertices, eh? + if not vertices: + raise ExportError(f"[{bo.name}]: Cannot export a collision mesh with no vertices!") + if indices: return (vertices, self._convert_indices(mesh)) else: