Home

You’re Doing That Wrong is a journal of various successes and failures by Dan Sturm.

Annotation Manager for Preview

During the process of making a video, I annotate a lot of images. For our outsourced paint and roto work, or for notes on a work-in-progress VFX shot, I'll draw on a video frame to illustrate what work needs to be completed.

Over the years, I've built some pretty handy tools to streamline this work. It typically starts from my timeline in Nuke Studio. As I scrub, when I see a shot that needs work, I hit a keyboard shortcut which does the following:

  1. Exports the frame I'm parked on, with burned-in slate information included
  2. Names the file with the name of the shot and the frame number
  3. Puts the file in a dated folder within the outbox of the project folder
  4. Opens the image in Preview
  5. Activates Preview's annotation tools

Not bad.

It's usually one or two dozen shots that I end up annotating per video. But recently, we had a project where that number hit triple digits. That project put a huge spotlight on some remaining friction in this process.

Oftentimes, there are multiple shots that need at least some of the same work done. These five shots need that thing removed. Three of them also need this other thing fixed, which is in these other seven shots, too. Just two of them need this thing over here. It's a lot of that.

Can I just annotate one image and write out a list of what needs to be done to which shot? No. Exacting clarity saves time, money, and sanity — none of which I typically have in surplus. So, I annotate a frame for every shot that needs work.

But it’s not that bad. I can copy and paste annotations from one image to another when there’s duplicate work [1] . This means I often have dozens of images open at once and use CMD+~ to move between them [2] .

Even better, I'm a responsible nerd with a clipboard manager (LaunchBar), so reusing lots of annotations is no big deal, right? This brings us to the actual problem.

 
 

Which one of these is the text label and circles for the dirt on the left wall? Which one is for the dust on the laptop screen? Even if I did remember, as soon as I select and paste it, the order of the clipboard history is now different. Good luck playing the worst game of Memory ever.

What I needed was a clipboard manager that could copy groups of annotation objects from Preview, keep them in order, and allow me to add a label so I know what they are.

Usually, Python is my weapon of choice for automation. I've made plenty of little GUI tools with Qt, and I probably could have done the same here. But this time, I decided I'd try to make a Real Mac App, because why not.

This is what I came up with:

 
 

The app is always on top of my other windows for quick access. I can create and store as many annotations as I'd like. There are keyboard shortcuts for copying and pasting.

Each slot can hold any number of Preview annotation objects. Whatever annotations are selected when I hit "save" are stored as a single group, but once pasted into a new image, they're all still individually selectable and movable. The annotation slot can also be updated later, if needed.

If there's anything about the app that bugs me, it's that it has to activate Preview in order to run the copy command, so there's a little flicker as it switches to Preview and back. Aside from that, though, this little utility has saved me so much time and headache.

That being said, making this as a Mac app was not especially simple or enjoyable, so I'm not sure I'll be making many more.


  1. That is, as long as I haven’t closed the image yet because Preview will flatten all the annotations and they will no longer be selectable. Drives me nuts.  ↩

  2. By the way, did you know that sometimes Preview just reverses the order you’re moving through files with CMD+~ and to keep going in the order you started with you have to switch to CMD+Shift+~? That’s a fun little quirk.  ↩