blender-to-gmstudio / blender-to-smf

Import-Export of Blender model from/to SMF model format
MIT License
11 stars 2 forks source link

Add a "Create new materials and images" import option #46

Closed bartteunis closed 2 years ago

bartteunis commented 2 years ago
This is an option to be added to the importer. The reason for its existence is the following: Dwarf.smf Hammer.smf Spider.smf ...
Material Name "Default" "Default" "Default" ...
Image Name "71" "70" "71" ...

In short: there are SMF models that have identical material names, yet have different image/texture names. Additionally, some models have identical image/texture names though they contain different image data (i.e. their texture images are different).

When importing SMF textures in Blender:

The Link Existing Materials/Images option will reuse existing materials in the Blender file and link those to the imported model, based on the image name found in the SMF model, instead of creating new ones with a suffix. This way there is never an issue with the "Default" material name. The image name is most unique (though it not necessarily is).

The option is disabled by default (since that produces the desired behavior on import of the above example models).

bartteunis commented 2 years ago

This should really be a Create new materials and images option since it is an option to override the most ideal way of doing things. It is enabled by default.

bartteunis commented 2 years ago

Added in dev d9c2af9