michael-gh1 / Addons-And-Tools-For-Blender-miHoYo-Shaders

Blender Addons and Tools for streamlining the character model setup when using HoYoverse Shaders.
GNU General Public License v3.0
241 stars 14 forks source link

feat: Add Setup Wizard (Initial Release) #1

Closed michael-gh1 closed 2 years ago

michael-gh1 commented 2 years ago

Initial Release for the Setup Wizard Tool

IMPORTANT NOTE:

Originally this was for: https://github.com/festivize/Blender-miHoYo-Shaders/pull/3, but I decided to decouple my fork from the Festivity's Shader repo (as these scripts could be later bundled into an addon).

I have merged my forked branch of Festivity's Shaders repo into this new repository (to keep historical commits) and removed his shaders. Hence why you will see Festivity's commits in this PR.

#

Open to any and all feedback, suggestions, comments, etc.

(I realize there are print statements littered here and there...I can clean them up or we can keep them in case we need to troubleshoot issues down the line) Debug print statements should be mostly cleaned up

Design

The idea behind the design of this tool is to make it easy to add new components (steps) without breaking other components (steps). We can do this by decoupling each component and making them call a common module (import_order.py) which acts as an invoker that invokes the next step in the process.

The decoupling of the components also allows us to easily re-arrange steps in the workflow as needed (see config.json). It also makes each component have a single responsibility and reduces the chances that changes in one component will impact another component.

Flow goes clockwise in diagram:

  1. genshin_setup_wizard
  2. import_order
  3. genshin_import_materials
  4. import_order
  5. genshin_import_charcter_model
  6. import_order

. . . (and so on)

(Crude Design Diagram of Setup Wizard Tool flow, a few new components have been added since this diagram was created) crude_design_diagram

Patch Notes since Previous Version (https://github.com/festivize/Blender-miHoYo-Shaders/commit/b1675376065c5f316d5897543674f20e0498a57e)

Fixes

• Fixed deleting empties used for Head Driver • Fixed fbx import missing automatic_bone_orientation

Features

• Added Setup Head Driver component • Added Make Character Upright script • Added force_connect_children when importing character models • UV1 map will be added when importing character models • Characters will now be reset to their A-pose when importing character models • Added Make Color Management 'Standard'

Refactoring

• Character-Material mapping now lives in a json file, character_material_mapping.json (before it existed in 3 files and adding a new character, like Nahida, would need to be done in 3 places)