io_anim_seanim icon indicating copy to clipboard operation
io_anim_seanim copied to clipboard

Export scaling fix

Open Temporalin opened this issue 4 years ago • 0 comments

The export of the scales doesn't work because there is an exception when the interpreter evaluates the (prop == pose_bone.rotation_TYPE.owner or ...) bit.

When pose_bone is for scaling, one of the rotations doesn't have the attribute owner (I haven't tested which one). This makes the elif statement in line 140 unreachable, because there is an exception catcher down in the code.

https://github.com/SE2Dev/io_anim_seanim/blob/3581a997cd55b068b908e5e94975036268ac8bc4/export_seanim.py#L126-L144

I have manually edited the code and successfully exported a .seanim file with scales included. It's easy to fix, just verifying which variables have the attribute before the if branching is enough.

My code is not the cleanest, but I can post a PR if you prefer that.

Temporalin avatar Nov 15 '20 22:11 Temporalin