Photoshop: Custom scripted actions for frame-by-frame animation

  • 3
  • Idea
  • Updated 5 months ago
  • (Edited)
Hello,

I'm looking into creating some custom actions for navigating Photoshop's timeline for 2D animation. My goal is to create two hot-keys (F1/F2) that move forward/backward on the timeline, and snap to the start of each layer whilst selecting the layer at the same time (see the image).



Using the Alt + ] shortcut allows you to select the next layer, but unfortunately the play-head does not follow. Conversely, the left/right arrows allow you to move the play-head one frame at a time, but it does not select the layers while doing so. My goal is to combine the two functions so that I don't need to perform any mouse actions.

The tricky part is that each layer will have a different length, so I need to move the play-head to the next LAYER (not the next FRAME). Here's how I think the script/action should operate: select the layer above, determine the start time of that layer, go to that time. I have no idea how to obtain the start time of a layer through script though...

Any advice or links would help.

Cheers!
Photo of David BK

David BK

  • 2 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 3
Photo of Stephane Baril

Stephane Baril

  • 55 Posts
  • 10 Reply Likes
Totally agree with you David!

We need to have access at the Playhead in the Timeline: a "Playhead listener event"...

With that we'll have the ability, for example, to autoselect layer crossed by the Playhead when you are in a Video Layers Group, to auto-colorize the previous and the next layer around the selected one...

Ideally, that must be a native feature, to autoselect layer croosed by the Playhead with these details in mind:
• This need to be an option to enable (ideally adding the possibility to associate a keyboard shortcut).
• Autoselect could be involve when the playhead stop moving/playing.

Best
Photo of David BK

David BK

  • 2 Posts
  • 0 Reply Likes
Hmm, that's unfortunate that Photoshop doesn't expose the position of the playhead. Is there a way to retrieve the time properties of a specific layer? Something like thisLayer.getInPoint()?

I can think of a few workarounds to help handle this. For example, you could create a Photoshop action that steps forward and selects the next layer simultaneously. However, this method would only work if the animation was entirely on 1's. When it comes to my own personal workflow, I usually block out my scenes using 1's, so this technique might work to a certain extent. However, there comes a point in the process when it's necessary to use a mix of 1's and 2's to finalize the timing, but then this method would no longer work.

There's also the question of ergonomics, and making all the shortcuts easy to access. Coming from a background in TVPaint, I really appreciate the ability to program single key shortcuts. This is a big problem in Photoshop, because Photoshop does not let you assign single key shortcuts to menu commands. It forces you to use either the F keys (F1, F2, F3, etc.) or to create awkward ctrl+alt combo strokes.

Like it or not, the ctrl+z is always going to be the most common keystroke for any 2D animator. I'd argue that the second most used keystroke would be prev/next drawing (for flipping). What I've done in TVPaint is to have these operations in the same area on the keyboard so that my hand doesn't waste any time having to search for the correct keys. This is how I've done it in TVPaint (using a North American QWERTY keyboard):

Ctrl+Z - undo
Z/X - prev/next EXPOSURE (not to be confused with prev/next FRAME)
A/S - add/remove frame
Q/W - increase/decrease exposure
` - toggle onion skin

I'm not sure if this is possible in Photoshop, but it would be great if it could be done.

Anyway... these are just my thoughts for now. I recently saw a video tutorial made by Alex Grigg about animating in Photoshop and I was really impressed at what he was able to do: https://vimeo.com/80851591 but it seems like the program is still in the "teething" stage in regards to animation. Compared to the usability and customizability of TVPaint, Photoshop simply can't compare. Maybe one day... but for now, If there's anything I can do in the way of suggestions or feedback, I'd be happy to help!
Photo of Stephane Baril

Stephane Baril

  • 55 Posts
  • 10 Reply Likes
Hi David

Thanks a lot for all of these details!

I just want clarify that Photoshop doesn't try at all to compete with TVPaint.
In fact, AnimDessin2 is one of my personal side projects and have no link with Adobe.

But, because a lot of users want to stay in Photoshop (lot of experiments and tutos are visible on the Web), I'd create this extension.

And I suggested you to fill here a feature request because your feedbacks are really valuable :)
Photo of Sean Wickett

Sean Wickett

  • 5 Posts
  • 0 Reply Likes
Hey Stephane,

I use your AnimDessin2 plugin daily: it's awesome! It saves me a lot of time. Though PS is still a bit kludgy with regards to hand drawn animation, your plugin makes it easy to work out my keys and breakdowns.

I would love to see audio scrubbing in PS's timeline perhaps another plugin?
Photo of Stephane Baril

Stephane Baril

  • 55 Posts
  • 10 Reply Likes
Hi Sean,

Thank you for your nice feedback :)

Regarding, the audio scrubbing, unfortunately I can't because I'm not developer at all, I just use Macros to build my Extensions with one or two code snippet!
So, if something is not built-in and/or accessible I can't created it :(
Photo of Sean Wickett

Sean Wickett

  • 5 Posts
  • 0 Reply Likes
Hi Stephane,

No worries! I didn't think it would be possible with an extension. Just hoping! Thanks for the great work none the less!
Photo of Stephane Baril

Stephane Baril

  • 55 Posts
  • 10 Reply Likes
I just found a script by Mads Juul which could help:
https://forums.adobe.com/message/4897...

But like he said: "But the script is to slow obvious."

Anyway, that could be helpful!
Thanks to Mads :)
Photo of Patrick Deen

Patrick Deen

  • 1 Post
  • 0 Reply Likes