How to Distribute Layers (Objects) With Even Spacing in Photoshop
Distributing layers (objects) in Photoshop is a common task. One of the available options is using smart guides. Another way is using Photoshop's built-in distribution commands. Photoshop offers six (6) distribution commands which work just fine most of the time. However, sometimes Photoshop's built in commands may fail because of difference in objects (pixels on layers) dimensions. If you want to ensure that spacing between 3 or more objects is always even (equal) regardless of objects dimensions then you need to install additional free Photoshop script.
What problem can occur when you want to distribute layers (objects) with even spacingLet's start with the task to define which problem can occur. In Photoshop you can distribute 3 or more objects (selected layers/layer groups). Distribution commands are available from Layer > Distribute > choose command and from the Options bar.
Requirements to use distribution commandsThe requirement to activate distribution commands from Layer menu is that at least three layers/layer groups are selected.
Here is a requirement to see active distribution options in the Options bar:
- 3 or more layers/layer groups must be selected in the Layers panel
- Move Tool must be active to use distribution icons from the Options bar.
When 3 or more layers/layer groups are selected and Move Tool active you will have access to the following distribution commands in the Options bar:
- Distribute top edges,
- Distribute vertical centers,
- Distribute bottom edges,
- Distribute left edges,
- Distribute horizontal centers and
- Distribute right edges.
|Distribution commands are available from Layer menu but also and from the Options bar when 3 or more layers/layer groups are selected and Move tool active.|
Depend on the width and height of objects and commands which are you using you may get even or not even spacing between objects. For example: when objects have same widths Photoshop's horizontal distribution commands will distribute objects with even spacing, otherwise, with different widths spacing won't be even. That's where scripts to distribute layers horizontally/vertically with even space comes in place.
Free scripts to distribute layers (objects) with even spacingThere is probably more than one source to download scripts for free for the exact same job. I will recommend to you scripts which I am using. Feel free to add a resource in the comments section.
How to get scripts for freeMy recommendation is to download scripts from Trevor Morris Photographics site. Scroll down to see Distribute Layer Spacing Horizontal and Distribute Layer Spacing Vertical. Click on each link (name of the script) to open a page from where you can download script. If you are using Google Chrome right click and choose: Save link as...
How to use scriptsIn order to use any script, you must run it inside Photoshop. There are a couple of ways to run the script:
- You can run the script from File > Scripts > Browse > navigate to script and double-click on it. In this case, the script can be saved anywhere on your machine. If you want to run scripts from the above links then do not forget to select 3 or more layers before evoking script to run.
- The second way is to install script and to run it by clicking on script name from File > Scripts > script name. Below is described how to install script, just keep reading the post.
- The third way is to pin script to Photoshop on Windows. You can also right-click on the script and to choose: Open with > Adobe Photoshop CC (version). Don't forget to select 3 or more layers before using scripts from the above links!
Note: scripts to distribute layer spacing from the above links does not work with layer groups selected.
How to install script in PhotoshopTo install scripts in default location so you will have access to them from File > Scripts menu do the following:
- Copy script file (.js or .jsx) and paste into Presets > Scripts folder. Here is full address on Windows 10: C:\Program Files\Adobe\Adobe Photoshop CC 2018\Presets\Scripts
- Restart Photoshop.
|To install script in Photoshop copy and paste .js or .jsx file in Presets > Scripts folder.|
Product used in this tutorial:
Adobe Photoshop CC 2018
Align and distribute layers
Align and distribute layers