T45687: Rework the Export/Import of Animations
ClosedPublic

Authored by Gaia Clary (gaiaclary) on Feb 19 2018, 3:47 PM.

Details

Summary

This started with a fix for an animated Object Hierarchy. Then i decided to cleanup and optimize a bit. But at the end this has become a more or less full rewrite of the Animation Exporter. All of this happened in a separate local branch and i have retained all my local commits to better see what i have done.

Brief description:

  • I fixed a few issues with exporting keyframed animations of object hierarchies where the objects have parent inverse matrices which differ from the Identity matrix.
  • I added the option to export sampled animations with a user defined sampling rate (new user interface option)
  • I briefly tested Object Animations and Rig Animations.

What is still needed:

  • Cleanup the code
  • Optimize the user interface
  • Do the Documentation

Diff Detail

Repository
rB Blender
  • Remove unneeded parameter from calc_ob_mat_at_time. also rename the function for better reading
  • added support for adjusting tangent locations during export
Gaia Clary (gaiaclary) updated this revision to Diff 10051.EditedFeb 21 2018, 4:29 PM
  • use BKE_object_matrix_local_get() to get the local transformation matrix (Many thanks to mont29 for this tip)!
  • Also created a convenience function to evaluate keyframe to make the code more readable.
  • Added new option for baked animations (to be completed)
  • rotation_quaternion export is not yet supported. Removing this case for now
  • Simplified the call to the evaluation function for baked animations. Also renamed the function for better reading.
  • Merge branch 'master' of git.blender.org:blender into collada
  • Use local FCurve variable instead of defining it on top of function and reusing in different places
  • simplified function call to evaluate_anim_with_constraints()
  • added support for export of sampled animations fro armatures and simple objects
  • partially revert commit 5bc2c17161cfc23ca2 that was based on a false assumption
Gaia Clary (gaiaclary) retitled this revision from T45687: fix for exporting an animated Object Hierarchy. Currently this is implemented inefficiently and the matrix evaluations are called too often. This can be made better (working on this now). to T45687: Rework the Export/Import of Animations.Feb 22 2018, 11:46 PM
Gaia Clary (gaiaclary) edited the summary of this revision. (Show Details)

Hi, Mont29

I think this is now almost good for getting back to master. I will do some more cleanup tomorrow, but if you see obvious issues, please let me know. I hope the separate commits make it clear how things have evolved so far.

cheers,
gaia

Won’t pretend I know and understand collada code (one hellish IO format is enough for me ;) ), but I do not see anything wrong here. So indeed can go in master, if you have tested it OK :).

This revision is now accepted and ready to land.Feb 23 2018, 8:50 AM
  • added new utility functions for later usage
  • replaced suspicious scene update function by direct call to BKE_scene_update_for_newframe()
  • added comments and function descriptions. Renamed functions for better reading
  • Added Test environment for Collada testing with Blender. Added a test for static Mesh with different Materials and non manifold (edges without face)
  • Add collada authoring tool string to test ignore list
  • changed testscript to be directly called from within Blender. Before the test script was called by python, which then internally called blender with a generated script. That was not very practical
This revision was automatically updated to reflect the committed changes.