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 = {
|
bl_info = {
|
||||||
'name': 'SWBF .msh Import-Export',
|
'name': 'SWBF .msh Import-Export',
|
||||||
'author': 'Will Snyder, SleepKiller',
|
'author': 'Will Snyder, SleepKiller',
|
||||||
"version": (1, 0, 0),
|
"version": (1, 2, 1),
|
||||||
'blender': (2, 80, 0),
|
'blender': (2, 80, 0),
|
||||||
'location': 'File > Import-Export',
|
'location': 'File > Import-Export',
|
||||||
'description': 'Export as SWBF .msh file',
|
'description': 'Export as SWBF .msh file',
|
||||||
|
|
|
@ -203,6 +203,8 @@ def _read_modl(modl: Reader, materials_list: List[Material]) -> Model:
|
||||||
|
|
||||||
global model_counter
|
global model_counter
|
||||||
global mndx_remap
|
global mndx_remap
|
||||||
|
|
||||||
|
if index not in mndx_remap:
|
||||||
mndx_remap[index] = model_counter
|
mndx_remap[index] = model_counter
|
||||||
|
|
||||||
model_counter += 1
|
model_counter += 1
|
||||||
|
|
Loading…
Reference in New Issue