Joonas Pääkkö

Lorem ipsum dolor sit amet

Move Layers Script For Photoshop

I made this script after finally getting sick of accidentally dropping layers in the wrongest of places when dragging them to a new spot in the Layers panel. This can be especially irritating when you are working with documents that have tons of layers or anytime really when you have to scroll the layers panel to move layers.

To complete one “move action” using Move Layers.jsx you need to trigger the script twice.

Basic usage

  1. Select your input layer(s)
    • Run the script for the first time
  2. Select your destination layer
    • Run the script for the second time

First trigger prepares the layers for the move. Second trigger moves the layers above your currently selected layer. The script creates 2 history states for a single move. So if you misplace the layers, you can undo and trigger the script to move them somewhere else without having to select the layers again. Though if you want to totally undo the move action, you have to undo twice.

Good to know section of the post

  • This was written for Photoshop CC so I can’t guarantee it’ll work on anything older.
    • If it doesn’t, it could potentially be modified to work on older versions too, since it uses fairly basic methods.
  • You’ll definitely want to assign this script a shortcut so that it’s easy to use it.

Known issues

  1. Sometimes, even though the layers are moved properly, the active layer ends up being the parent group instead of the moved layers.
    • I haven’t had the opportunity to fix this because it’s always happened when I’ve been in the middle of something and then I’ve not been able to recreate it later when I’ve had the time. I’m pretty sure it has to do with a specific type of layer structure with of nested groups.
  2. It’s likely that nearly every single time you use the script, scroll position in the layer panel shifts around. Although the first active layer will always stay inside the viewport no matter what.

What else…?

You can actually use this script to move layers without having to look at the layers panel or at least you don’t have to rely on it as much if you don’t want to.

You could for example do this: Select the layers you want to move in the Layers panel and run the script once, then select the destination layer by clicking it in the document and run the script for the second time. Very handy if you’re messy like me when it comes to naming and organizing layers in Photoshop, because you don’t have to scroll around the Layers Panel looking for the destination layer.

How to select layers outside of the layers panel

You can select layers by clicking them in the document by first activating the Move tool and then you just Cmd + Click a layer in the document to select it. Holding down Cmd temporarily toggles the Auto select when using Move tool.

For the most part… I tend to select things from the document by using Cmd + Alt + Right click with almost any tool. When you are using either of these methods, you can also hold down Shift to add layers to the selection or remove them if you click a selected layer again. Pretty much the same as using the Layers panel.

Note that in Windows you should think of every Cmd I mentioned here as Ctrl. In Mac Cmd is used for most shortcuts that use Ctrl in Windows.

Report issues and contribute in github.