I am a Photoshop beginner and currently use version Photoshop CS3. I use keyboard shortcut all the time to speed up the design process such as creation of new layers etc.
However, one command I feel Photoshop must have is to create a new layer below the current working layer and therefore I cannot assign it via a shortcut.
I have to create a new layer above the current layer and then manually drag it below the current layer which I feel can be automated using action or scripting, both of which are difficult for me being a beginner.
Can anybody help me in this regard.
Thanks
dkj
3
Answers
It can be scripted with the following:
I’ve simplified my answer – you don’t need to find the index, you can use the active layer instead.
You can then record this script as an action and put on a keyboard short cut.
Few years ago i thought that native PS API working with DOM is cool and should work faster, but actually under the hood it’s callstack often even bigger than same commands performed via actions. + Also sometimes DOM functions consist of multiple underlying calls, like
artLayers.add()
for example which is actually make layer + move it to top of the document. So here’s action version of that functionality from my PS scripting library:And even tho it looks pretty cumbersome and scary – i doubt that it will perform much slower. And as a bonus it will create minimal amount of actions in the history (no unnecessary layer moves) + it will correctly work with background layer + it will work properly with the groups (layer-sets): if group is opened – it will create new layer inside of it, and if group is closed it will correctly move layer under the whole group-structure including other possible groups inside the selected one.
Use it like that:
mkLyrBelow();
to create new layer under selected one, ormkLyrBelow(LayerNumber);
to create layer under another one via it’s number, also u can optionally add 2d parameter to ignore groups (it will move new layer inside the group even if it’s closed):mkLyrBelow(LayerNumber,true);
ormkLyrBelow(0,1);
…P.S. don’t get me wrong about ActionRefs – they’re not the silver bullet, just oftenly have some more convenience in the end, but ofc best results obtained when u combine ARef’s with native API. Just believe me on that, i’ve coded my first PS script like 8 years ago, so i’ve tried pretty much everything =)
If I understand your question correctly,
Photoshop
already has these shortcuts