Simulated Animation Effects Week#4

After getting simulated animation effects somewhat a presentable state in week 3 on my experimental branch, this week my goal was to make them saveable.

Since I wanted them to be saveable on SMIL hierarchies, like the rest of the animations, I’ve started by creating new xml tokens that’ll be used and named them “motion-simulated” and “animateSimulation”.

Made required connections for importing/exporting these animation effects mimicking how path motion is imported/exported.

Later created a new animation preset on Effects.xcu for testing purposes and called it arbitarily “Simulated Basic”.
And lastly, connected stuff with animation effects panel creating a new category there for simulated animations.

You can check out the whole implementation on my experimental branch: gsoc-box2d-experimental

Also, this is how it looks when saved: (inside content.xml on an ODP file)

<anim:par smil:begin="0s">
  <anim:par smil:begin="0s" smil:fill="hold" presentation:node-type="on-click" presentation:preset-class="motion-simulated" presentation:preset-id="ooo-motionsimulated-basic">
    <anim:animateSimulation smil:dur="5s" smil:fill="hold" smil:targetElement="id1"/>
  </anim:par>
  <anim:par smil:begin="0s" smil:fill="hold" presentation:node-type="with-previous" presentation:preset-class="motion-simulated" presentation:preset-id="ooo-motionsimulated-basic">
    <anim:animateSimulation smil:dur="5s" smil:fill="hold" smil:targetElement="id2"/>
  </anim:par>
</anim:par>