monkeyman192 / NMSDK

Custom Model importer for NMS
https://monkeyman192.github.io/NMSDK/
29 stars 9 forks source link

Fix bug that fails to assign the same material to multiple meshes #98

Closed zagibu closed 11 months ago

zagibu commented 11 months ago

The plugin fails to append a material to a mesh, if the material has previously been appended to a different mesh. This happens because material variable is only set in the condition that the current mat_path is not present in materials dictionary yet.

This change also assigns the material variable when the condition is false, to the material previously saved in the materials dictionary under the same mat_path.

monkeyman192 commented 11 months ago

LGTM! Thanks for this 😄