Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Export scaling fix #31

Open
Temporalin opened this issue Nov 15, 2020 · 0 comments
Open

Export scaling fix #31

Temporalin opened this issue Nov 15, 2020 · 0 comments

Comments

@Temporalin
Copy link

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.

pose_bone = prop.data
if prop == pose_bone.location.owner:
if not use_keys_loc:
continue
# print("LOC")
index = 0
elif(prop == pose_bone.rotation_quaternion.owner or
prop == pose_bone.rotation_euler.owner or
prop == pose_bone.rotation_axis_angle.owner):
if not use_keys_rot:
continue
# print("ROT")
index = 1
elif owner is pose_bone.scale.owner:
if not use_keys_scale:
continue
# print("SCALE")
index = 2

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant