taniwha / io_object_mu

Python .mu reader/writer and blender import/export addon
GNU General Public License v2.0
120 stars 51 forks source link

Feature Request: add function to convert animations done in Euler to Quarts #48

Open StoneBlue opened 3 years ago

StoneBlue commented 3 years ago

Taniwha, just a reminder for you, in case you wanna investigate this.

So, I am working on some older models from the OPT mod, and they are failing to export. I think it might be related to the Loc/Rot in the animations being done in Euler instead of Quart. I know there are workarounds for manually converting, but they seem pretty involved, and the animations I am working with have quite a few objects and LOTS of key frames. I also have several models that are affected.

It would be nice to have an auto-magic button that could handle the conversion, if possible.

I did a lot of Googling, and it seems the majority of the problems/resolutions with Euler-Quart animations, are dealing with Quart to Euler... the opposite of what it seems is needed for KSP? which is Euler to Quart.

The best possibility for a script that I could find, that can handle Euler to Quart, was this one:

https://github.com/MarioMey/rotation_mode_addon

It seems to be able to handle the conversion both ways, which might be nice, too. vOv but its old.. last update seems to be for Blender 2.76. I now the API has changed drastically, at least a couple times between 2.76 and 2.91, so I dont know how much of a rewrite or wor would be involved to get this working, or something similar.

In any case, thanks for even considering looking at this. Hopefully other people messing with old KSP mods will be able to get use out of it, if you get something working.

I've attached one of my modified blends, and an unmoddified .mu, with textures, for a couple of the OPT parts I'm trying to fix. They are both cargo ramp parts. Incidentally, and why I initially started working on these, is that BOTH trigger the stock 1km Spawn Bug. The bug has gotten worse, or a new one has cropped up in 1.11.0.

StoneBlues_OPT_models.zip

There could be other issues in my .blend file, too... vOv