dR Animate for Affinity

dailyRushes Scripts for Affinity

dR Animate animates your artwork inside Affinity. Record the changes you make on the canvas as a clip, adjust and play it, then save it as a Lottie animation.

Before you start

  1. Add dR Animate to your Script Library, then click it to run it. See Installing Scripts for Affinity.
  2. To save Lottie files: choose Edit > Settings > Scripting, turn on Access the file system, then under File system access click Add and choose a folder, such as your Desktop. Folders inside it can be used too. See Saving Files.

Top of the window

Clip

Chooses the clip that the Clip and Play sections work on. Clips are listed by number and name. A renamed clip shows its new name the next time you open the window.

Start recording

Records the changes you make on the canvas as a new clip.

  1. Click Start recording. It changes to Ready: click OK to record.
  2. Click OK. The window closes.
  3. Make your changes on the canvas: move, turn, resize, recolour.
  4. Run dR Animate again. That stops the recording, and the window opens on the new clip.
  5. Click OK to keep the clip, or Cancel to throw it away.

Click the Ready button again to call the recording off. Changes that only select things are not recorded as steps.

Status line

Under the buttons: tells you what just happened, or what to do next.

OK and Cancel

  • OK keeps your changes: new clips, settings, adjustments and deletions. If Start recording or Drag is on, OK also starts it.
  • If you changed where the last clip ends, OK also moves the artwork to the new end point, so the next recording carries on from there. Artwork you have moved somewhere else yourself is left where it is.
  • Cancel throws away everything you changed in the window this time.

The chosen clip’s steps, how each one plays, and the clip’s own settings. For a path clip, see Path Clips.

Clip

Steps

Each change you made while recording, in order, described in plain words, with how many frames it takes. The line above shows the clip’s name, number of steps, total frames and length in seconds.

Step

Chooses a step, for its Frames and Easing, for Plays together with the next step and for the Adjust rows below.

Frames

How long the chosen step takes, so one step can be quick and the next slow. At 24 frames per second, 24 frames is one second. Later clips move along to make room. Set it to the same number as Default frames and the step follows the default again.

Easing

How the chosen step speeds up and slows down:

  • Smooth: starts and ends gently.
  • Linear: the same speed all the way.
  • Ease out (slow down): fast at first, gentle at the end.
  • Ease in (speed up): gentle at first, fast at the end.
  • Snap (no in-between): jumps straight to the end of the step.

Choose the same as Default easing and the step follows the default again. A step with its own easing shows it in the Steps list.

Plays together with the next step

Turn on to make the chosen step happen at the same time as the step after it, as one move. For example, a move followed by a resize becomes one move that grows as it travels. The two steps then use the Frames and Easing of the second one, so those are greyed out on the first. It is greyed out for the last step, which has nothing after it.

Adjust

Shows where an object is at the start and end of the chosen step. Change a number and the object moves on the canvas as you type. Only the point you change moves: the object then travels from there to where the next step already takes it. The number boxes also respond to the up and down arrow keys and the mouse wheel.

  • Part: the object to adjust. Only shown when the clip moves more than one object.
  • Later steps move too: off by default. Turn it on to make the same change to every later step, shifting the rest of the clip, for example to move a whole walk lower on the page.
  • Start X, Y: where the object is when the step begins (its left and top edges, in pixels). For step 1 this is the start of the clip.
  • End X, Y: where the object is when the step ends.
  • Turn start, end: its rotation in degrees.
  • Scale W %, H %: its size, from the centre. With Lock on, width and height change together.
  • Opacity %: click the slider button to drag it.

Drag

Set a position by moving the object on the canvas, instead of typing numbers.

  1. Turn on Drag in the Start row or the End row. The object jumps to that position.
  2. Click OK.
  3. Move, turn or resize the object on the canvas.
  4. Run dR Animate again. The change is applied to that point, and the window says what changed. If Later steps move too was on, the rest of the clip moves by the same amount.
  5. Click OK to keep it, or Cancel to leave the clip as it was.

Name

The clip’s name. It becomes a marker in the Lottie file.

Default frames

How long each step takes, unless you have given it its own Frames. Steps with their own length keep it when you change this.

Default easing

How each step speeds up and slows down, unless you have given it its own Easing.

Starts

When the clip plays:

  • After the previous clip: when the clip above it in the list has finished (the usual way).
  • With the previous clip: at the same moment as the clip above, so both play at once. For example, a rocket follows its path while a planet turns. The first clip always starts at the beginning.

Clips playing at the same time should move different objects. A group can move while an object inside it moves too, such as a car driving along while its wheels turn. If two clips move the same object at once, the one that starts later takes over from when it starts, and the clip list in Play says so.

At the end, each object is left where the last clip that moves it finishes.

Delay

Frames to wait before the clip starts. With With the previous clip, a Delay of 12 starts it half a second (at 24 fps) after the clip above, for staggered starts. With After the previous clip it leaves a pause between the two.

Repeat

How many times the clip plays, one after another (1 = once, up to 100). Each repeat jumps back to the start and plays again. The repeats are written into the Lottie file, so they work in every player. The file gets a little bigger with each one.

Bounce

When the clip reaches the end, it plays backwards to the start. With Repeat it goes there and back that many times (Repeat 3: there, back, there, back, there, back). Easing works on each way, so Smooth slows into the turnaround and speeds away again. Each step keeps its own Frames and Easing on the way back.

A bouncing clip ends where it started, so on OK the artwork is left at the start.

When it bounces

For path clips with Turn along the path on (otherwise it is greyed out):

  • Turns round: the object makes a U-turn at the end and faces the way back. At the start it turns round again, so it finishes facing the way it began.
  • Goes back in reverse: it goes back tail first, like a car reversing.

Loop forever in the player

A Lottie file can’t loop just one part by itself. Looping is set in the player that plays it: most players have a loop setting for the whole animation. To loop just this clip, turn this on: its marker in the Lottie is named … (loop), for example Wave (loop). Players that can play from marker to marker (lottie-web, for example) can then repeat just that part, such as an intro that plays once, a middle that loops, then an outro.

It doesn’t change how the clip plays in Affinity or how long the file is.

Delete this clip

Marks the clip to be removed when you click OK. Your artwork is not changed. Keep this clip undoes it.

Path clips

A path clip moves an object along a curve at an even speed.

Make path clip

  1. Draw the path with the Pen tool. It runs from its first point to its last.
  2. Select the object and the path, then run dR Animate. A new path clip is added at the end of the Clip list, marked (new path clip).
  3. Try it with Play this clip.
  4. Click Make path clip to keep it, then OK.

The object jumps to the start of the path and finishes at the end. On OK it is left at the end of the path, so the next recording carries on from there. Cancel, or OK without clicking Make path clip, keeps nothing.

Frames

For a path clip, the length of the whole journey.

Easing

Works along the whole path, so Ease out slows the object down as it nears the end.

Turn along the path

The object turns to follow the curve of the path.

Facing

Only used when Turn along the path is on (otherwise it is greyed out). Choose which way your object points as you drew it: Right, Down, Left or Up. Its front then leads along the path. For example, an arrow drawn pointing up should be set to Up, or it will travel sideways.

Any rotation the object already has on the page is added on top. Leave it at 0° for the object to follow the path exactly, or rotate it a little before making the path clip to tilt it by that amount all the way along.

Hide the path on OK

Turn on, then click OK, to hide the path layer so it isn’t seen on the page or included in the Lottie. Turn it off and click OK to show the path again. It works for any path clip, not only a new one. While it is on, Make Lottie leaves the path out straight away, even before you click OK.

Make Lottie only uses kept clips: click Make path clip before Make Lottie, or the window tells you the path clip isn’t kept yet.

Changing the path

A path clip always follows the path as it is now. Reshape or move the path with the usual tools, then run dR Animate: the clip follows the new shape straight away, keeping all its settings, and the status line says so. Click OK to keep it; the object moves to the new end of the path (or the start, if it bounces).

The Step, Plays together and Adjust settings don’t apply to path clips, so they are hidden: to change where the object goes, change the path.

Watch your clips on the canvas, then make a Lottie file of the whole page. To make a title for DaVinci Resolve instead, see dR OGraf for Affinity or Lottie to OGraf.

Play

Frame rate

Frames per second, for playing on the canvas and for the Lottie file.

Loop

Plays again from the start until you click Stop. This is only for watching on the canvas: it isn’t saved in the Lottie. To repeat a clip in the file, use Repeat or Bounce in the Clip section.

Play this clip

Plays the clip chosen at the top of the window on the canvas. Text, images and pixel layers move too, and outlines you edited by moving nodes change as they play.

Play all clips

Plays every clip, one after another, in order.

Stop

Stops playing and puts the artwork back the way it was.

Clip list

All clips in the list, with the frames (and seconds) each one starts and ends, which clips play at the same time, any clips that move the same object at once, and the total length.

Lottie

Makes a Lottie animation of the whole page from all your clips.

Make Lottie

Builds the Lottie and shows it in the box below. Text goes into the Lottie as curves, so it looks the same without the font, and your text stays editable in Affinity. Afterwards, Edit > Redo offers “Convert to Curves”: ignore it, or Undo if you click it. Images and pixel layers are left out.

Lottie JSON

The Lottie file as text. Click in the box, press Ctrl+A then Ctrl+C to copy it.

Report

The size, length and frame count of the Lottie, the clip names used as markers, and anything that could not be converted.

File name

The name for the saved file. It is filled in for you the first time you click Make Lottie.

Folder

Where to save: the folders allowed in Settings > Scripting > File system access. The folder you used last is remembered.

Save to folder

Makes the Lottie again, so it includes your latest changes, and saves it as a .json file.