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:
parent
432c9ff380
commit
613cb20678
|
@ -1,7 +1,7 @@
|
|||
bl_info = {
|
||||
'name': 'SWBF .msh Import-Export',
|
||||
'author': 'Will Snyder, SleepKiller',
|
||||
"version": (1, 0, 0),
|
||||
"version": (1, 2, 1),
|
||||
'blender': (2, 80, 0),
|
||||
'location': 'File > Import-Export',
|
||||
'description': 'Export as SWBF .msh 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
|
||||
|
||||
|
|
Loading…
Reference in New Issue