-
Notifications
You must be signed in to change notification settings - Fork 5
Allow applying modifiers, clean up code. #5
Conversation
If a model has modifiers, the user probably wants them applied to form the final mesh. This is especially common with the Mirror modifier. Howerver, `export_apply` cannot be used with shapekeys, so we should only set it if no shapekeys exist.
- Use PoolStringArray.join to make blender args more readable/editable - Remove unused tex_dir_global - Use string formatting instead of String.replace - Remove unused python imports - Pass filepath as blender arg
We don't need to spam the console every time we run blender. Just print the args/stdout if the command fails.
You can apply modifiers with shape keys here. https://github.com/V-Sekai/V-Sekai-Blender-tools/tree/main/addons/ApplyModifierForObjectWithShapeKeys |
In my other copy of the code, I use this pattern of creating a string that is json syntax. Using string replace on it, and then json parse it and use the dictionary get on the data. |
Thanks! Though I feel like having both shapekeys and modifiers is pretty rare. Godot 3 has enough problems with shapekeys that I've learned to avoid them, so I think it is best to just keep this simple. I do often have modifiers like Mirror which I want applied on export, so it seems nice to have that option on when we can. |
Also I uh.. have a secondary workflow where I convert blend shapes to skeletal animations, but it's a bit obscure :D. |
I also am working in Godot 4, so I'd need to sync these changes to master of this repository. Want to keep them synced. |
Would you like me to backport to |
I would appreciate it if you could help me backport to |
I'll merge it in and then test it. Thanks! |
This PR consists of a few commits:
enabled_plugins
in top-level project.