Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added flipyz option to plugin for swapping the Y and Z axes around #12

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

therocode
Copy link

Very useful plugin, but with a quirk! Blender uses a different orientation to most game engines - the Z axis is upwards instead of Y. This is quite troublesome since all models get flipped when loading them into a game which doesn't take that into consideration. This issue would turn even more prevalent if IQM models are delivered from several different 3D animation applications of which some might not be flipped. Since it is an issue on blender's side, it seems reasonable to solve it in the exporter.

This pull request creates a new property for the plugin called "Flip Y and Z" which flips the Y and Z axes around in the exporter to circumvent the issue. I tried it with my own game and it works. However since I have only gotten to the point of displaying meshes (no animations), it is untested with animations and anything that isn't just meshes. I also only added the code to the collectMeshes function since I couldn't test if something needed to be done in the animation loading function. But if that is the case, maybe it would be easy for you to apply the same solution where needed, otherwise I could update the pull request whenever I get to loading animations. :)

@noizex
Copy link

noizex commented Feb 8, 2016

Any reason why it's not yet merged? It seems like a useful option, I always missed automatic flipping of axes on export from Blender rather than having to fix it in importer or rotate the model itself.

@WatIsDeze
Copy link

Any reason why it's not yet merged? It seems like a useful option, I always missed automatic flipping of axes on export from Blender rather than having to fix it in importer or rotate the model itself.

Ofc not :D

Werninator added a commit to Werninator/iqm that referenced this pull request Aug 14, 2022
Add 3.2 Version, which is the 2.93 of the original but with lsalzman#12 applied.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants