What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Script for make frames from layers (while retaining visibility for layers below)


dmancini

Member
Messages
5
Likes
0
Hi,
I have a file wih hundreds of layers that I want to show sequentially, from bottom to top, to make an animation. I know in the Timeline panel menu there is the command "Make frames from layers" that could do that.
What I need is similar but, instead of showing each layer at time, I need that all the layers below the current layer remain visible, because all of them are set to Darken blending mode.
Is there any script that could do that?

Thanks in advance
 
Hello and welcome.

I myself am not understanding what it is you want. Being an avid animator, I don't see what you mean. When you use the "Make frames from layers" command, only active layers are added to the timeline. All you would need do is to turn off/deactivate the layers you don't want showing in any given frame.

instead of showing each layer at time, I need that all the layers below the current layer remain visible, because all of them are set to Darken blending mode.
A frame in the timeline can only reflect the activated layers in the layers panel. For instance, Frame 1 would only show it's corresponding active layers, this could be one layer or many layers per frame.

I apologize. I'm just not understanding what you want.
 
Hi, thanks for your reply.

I would like a script that can speed-up what usually I do manually. I’ll try to explain with an image.

The command “Make Frames From Layers” loops through all layers and makes a frame for each of them showing only ONE frame at time. What I need is the same loop, through all layers, but all the layers beneath the current must remain visible.

Thanks againlayers visibility.jpg
 
HI @dmancini

An Action could be created to do this yet it was not clear if wanted to create this or have a turnkey solution.

Here is the basic approach.

You start with all Layers with visibility turned on and the active Layer is to top Layer.

Create an animation which starts with Frame 1 (which will be assigned all the visible Layers)

The loop part of the Action is

Create the next Frame
Turn off visibility of the active frame
Drop down to the next lower visible frame

Those three steps continue until you are at the bottom of the Layer Stack

Note, Actions support conditionals and one of those is to be able to recognize when you are at the bottom of the stack and you stop the loop

Then all you do is reverse all of the frames and you are done.

One of the keys to make this work is knowing the commands which turn off visibility of the active Layer which is CMD + , (CNTL + , for Windows)

The other keyboard shortcut needed is to move down one Layer is CMD + [ (CNTL + [ for Windows)

One needs to use the keyboard shortcuts because if you use the mouse, the Action remembers that Layer position by the name of the Layer and you don't want that.

So quite possible to do with an Action.

Just wanted to have that option out there for you to consider
John Wheeler
 
Hi @thebestcpu

thanks for your reply, I hadn't considered doing this with an action.

I made three actions:

Schermata 2022-06-09 alle 11.33.26.png

1. loop: looks for the background layer and play an action based on that condition
2. make keyframes: make a frame, hide the current layer, select the backward layer
3. stop: makes nothing

It speeded up my work a lot but I have to play the button X time (where X is the number of layers). I can’t figure out how to make it automatically loop.

Maybe I need a script only for repeat the action?
 
 
My mistake @dmancini in regards to the looping in an Action. I made an untested assumption about Conditional Tests in Actions. :oops:

So I second @[ iLLuSioN ] 's recommended link for the solution on looping an Action using a simple script.

It can be done in an Action, just not so elegantly as I thought you could e.g. you have the basic Action that takes the step down the Layer, then call that from another Action 10 times, then call that Action form another 10 times, and that Action 10 times from yet a third level. Simple to do and that would cover up to 1000 Layers (10x10x10). In the basic step down Action you end it with a conditional test checking if you have reached the background Layer (which is needed for the conditional test). When the conditional test is reached, you call an Action which is a do nothing and ends the Action at that point.

Sorry for the bad information on looping in an Action.
John Wheeler
 


Write your reply...

Back
Top