Skip to content

Commit

Permalink
ms2 - add message for 16 materials limit
Browse files Browse the repository at this point in the history
  • Loading branch information
HENDRIX-ZT2 committed Oct 22, 2023
1 parent 94ed3ad commit 8e0bb40
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion plugin/export_ms2.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,11 @@ def save(filepath='', backup_original=True, apply_transforms=False, update_rig=F
b_materials.append(b_mat)
export_material(model_info, b_mat)
if "." in b_mat.name:
messages.add(f"Material {b_mat.name} seems to be an unwanted duplication!")
messages.add(f"Material {b_mat.name} seems to be an unwanted duplication")
if len(b_materials) > 16:
messages.add(
f"Material {b_mat.name} exceeds the limit of 16 unique materials\n"
f"and will render with a different material ingame (wraps around)")
# create one unique mesh per material
m_ob = Object(ms2.context)
m_ob.mesh_index = b_models.index((b_me, shell_index))
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
40a8cf585 - Sat Oct 21 23:24:31 2023 +0200
94ed3adf8 - Sun Oct 22 12:19:02 2023 +0200

0 comments on commit 8e0bb40

Please sign in to comment.