Many msh files (e.g. those in BFX) have multiple models assigned to the same index (MNDX). Indices should be linked only to the first model that uses them to ensure proper skinning.

This commit is contained in:
William Herald Snyder 2022-10-09 00:15:29 -04:00
parent 432c9ff380
commit 92fdc3a12b
1 changed files with 3 additions and 1 deletions

View File

@ -203,7 +203,9 @@ def _read_modl(modl: Reader, materials_list: List[Material]) -> Model:
global model_counter
global mndx_remap
mndx_remap[index] = model_counter
if index not in mndx_remap:
mndx_remap[index] = model_counter
model_counter += 1