Browse Source

Apply suggestions from code review

Co-authored-by: Adam Johnson <AdamJohnso@gmail.com>
pull/254/head
Hazado 4 years ago committed by GitHub
parent
commit
f90a689afa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      korman/exporter/animation.py

3
korman/exporter/animation.py

@ -388,10 +388,9 @@ class AnimationConverter:
if not fcurves and not allow_empty: if not fcurves and not allow_empty:
return None return None
rotation_quaternion = (i for i in fcurves if i.data_path == "rotation_quaternion") rotation_quaternion = any((i.data_path == "rotation_quaternion" for i in fcurves))
pos = self.make_pos_controller(fcurves, "location", xform.to_translation()) pos = self.make_pos_controller(fcurves, "location", xform.to_translation())
# TODO: support rotation_quaternion
if rotation_quaternion: if rotation_quaternion:
rot = self.make_rot_controller(fcurves, "rotation_quaternion", xform.to_quaternion(), 4) rot = self.make_rot_controller(fcurves, "rotation_quaternion", xform.to_quaternion(), 4)
else: else:

Loading…
Cancel
Save