How to Record Flexible Layout Actions in Photoshop (Part 1)

How to Record Flexible Layout Actions in Photoshop (Part 1)

In this tutorial we will cover how to record flexible actions which will quickly create expected pre-defined layout regardless of document dimensions, orientation and aspect ratio. This is one of the very basics and any Photoshop user will see the benefit.

What are flexible actions

Flexible means that your action will draw, for example, 4 equal in dimension shapes, regardless of document dimensions, orientation and aspect ratio. I am talking about starting point where created document is divided into 4 equal parts.

Let's say you are recording action to draw 4 equal shapes and you are doing that (recording action) with document which have dimensions 1000x1000px what is 1:1 aspect ratio. In essence, your shapes are dividing document into 4 equal parts and your document will look like what you see on the screenshot below.
square document divided into 4 equal pieces

If you run your action and you specify 5x7 inches (what is 5:7 aspect ratio) for document size you will get again 4 shapes which are equal and are dividing document into 4 equal pieces.
5 by 7 in divided into 4 equal pieces

That is flexibility which has some limitations. You cannot, for example, record action in this way to draw 4 circles regardless of document dimensions and aspect ratio. Let's say you are recording action to draw circles and your document have 1:1 aspect ratio. Here is how that will look like.
4 circles in 1 by 1 document

When running action to draw circles and you need document with 5:7 aspect ratio then you will get ellipses.
4 circles in 5 by 7 document

What is allowing flexibility?

Let's take a look at what is written in action to understand what is allowing flexibility and why we have some limitations. I will expand first of four Make fill layer steps in action which is drawing the first rectangle. Notice part below Shape: rectangle. It is describing shape using percentages. This means in this particular case that the bottom side of the rectangle will be at 50% of the document height and right side of the rectangle will be at 50% of document width. Left and top sides of the shapes will be at 0%. That will be true always, regardless of document dimensions and aspect ratio.
what is recorded in action

When playing action, step: Make fill layer does not care about document dimensions, it will only care where is Top and Left of the document (Top and Left 0%) and where are Bottom and Right 50% of the document to draw shape.

Let's record flexible layout action

We will record simple and flexible layout action just to give you basic instructions. The main point is to understand what is the benefit and when to use flexibility with the percentage based record. Hopefully you can understand what is all about from the previous paragraphs.

Step 1 Create a new document
The document can be with any dimensions and resolution, both will be ignored and only percentages will be used when playing action.

Step 2 Setup guides
You can do the same thing using grid, but I will recommend you to setup guides what is easy, especially with one of the recent options: View > New Guide Layout. Type 8 for Columns and Rows without any Gutter and Margin.
new guide layout

Step 3 Set Percent for Rulers
Display Rulers from View > Rulers. Right click on Ruler and choose: Percent. This will instruct Photoshop to record anchor points using percentages what is allowing flexibility as previously explained.
set percent for rulers

Step 4 Start recording action
Create new action and give it a meaningful name. I will name to my action: 4 Equal Shapes. If you need help to start recording actions, please see my posts in mini course about actions.

Step 5 Turn on Snap
Go to the View menu and check Snap option what will help you while drawing shapes. Rectangle Tool will automatically snap to guides and make your life easier.

Step 6 Draw shapes
Grab Rectangle Tool and start drawing shapes one by one. Since we have guides it is an easy task.
draw shapes in photoshop

You can change color of each shape after drawing it from the Options bar to make them distinct each from other.
change color of the shape

Let's draw 4 shapes in the row, one after another.
action recorded

Step 7 Test action
Create a new document with any dimensions and run action to test it.

In order to automate tasks of creating a new document you can use Insert Menu Item from the Actions panel menu and to select File > New.
insert menu item

Drag newly created Make step to the beginning of action.
drag make step to the top of action

Step 8 Record more flexible actions
Do not stop here. Repetition is the mother of knowledge. Go and record few more actions with layouts that you are using often.
polyptych 7 recorded

I have recorded a couple more actions to give you an example.
polyptych 8

polyptych 9


If you do not want to deal with actions then you must find useful Libraries panel in Photoshop CC 2014 where you can drag created templates and access them anytime you need them.

Download actions recorded for this tutorial

Here is a link to download actions which I have recorded while writing this tutorial.

To be continued…

In the next tutorial I will show you how to automate the process of placing files (images) in created layouts.

Product used in this tutorial:
Photoshop CC 2014


Popular posts from this blog

How to Change Artboard Size in Adobe Photoshop

Free Puzzle Pieces Actions For Photoshop and Elements

Old Weathered Vertical Wooden Planks Free Image