#CreativeFriday – Conditional actions in Photoshop for Creative Cloud

Actions inside Photoshop have been designed to save time when processing an image and to gain a pre-defined look, or at least run a defined series of steps within a technique. The outcome is a huge time saver, as well as an accuracy of an effect or a series of steps. Actions maybe a combination of many functions inside Photoshop, i.e. crop images or a manual series of steps to add a photo frame with texture etc. Actions can be even more powerful when they are hooked up to Photoshop batch automation or a Photoshop Droplet. However, previously actions have been limited to straight through processing (i.e. no IF Then ELSE logic) ,and unless you already know javascript it was challenging to work around this. In the Photoshop CS6 for Creative Cloud update in December 2012, the ability to create conditional actions was added, this means we now support simple logic (i.e. IF Then ELSE). This post will take you though a step by step guide of making a conditional action to save your self huge amounts of time and create consistency across your work.

When creating a conditional action you will need to think about the objective and then design the logic that you would like to create. For example, this exercise will test an image to see if it’s Square, Portrait or Landscape and place text on the image, the text could be any that you desire from (Watermarks, to logo’s etc). One idea is that you could use this for your work that you send out to clients.

Open Photoshop CS6 for Creative Cloud (and make sure that the update as of December 2012 has been applied), open the actions palette and choose New Set, and create a new set to hold these actions. Once the Set has been created, created a New Action.

Screen Shot 2013-05-10 at 07.37.16

 

I am going to use the “Blog Post Actions” set to store all of these logic components.

Screen Shot 2013-05-10 at 17.16.51

Click record to start the recording (used to just to create the action). At this point for this example, you want to stop the recording and open or create a landscape file (we will be automating the action so it is not required to include the file open) .

Screen-Shot-2013-05-10-at-17.25.54

Then restart the recording, and capture the text layer.

Screen-Shot-2013-05-10-at-18.08.00

Now the record is turned on, add some text to the landscape layer.

Screen-Shot-2013-05-10-at-18.08.41

Turn off the recording. If you need other items adding to the action then you will need to add them in this recording process.

The first of three logic components has been created. To create the component for processing a square, re-select the “Blog Post Actions” element (in this example), and select New Action from the fly out menu.

Screen Shot 2013-05-10 at 18.29.44

 

You should end up with something like the above, comprising of 3 logic components with a make text layer for each (your processing you may have more or less logic components and more or less functions within each).

We can now create the conditional logic blocks which will tie everything together. Re-selected the “Blog Post Actions” element and create a new Action called “Run Me”, then stop the recording, and create another Action called “Test for Square” and stop the recording once again.

Select  the “Run Me” element and click on the fly out menu and choose “Insert Conditional”.

Screen Shot 2013-05-10 at 18.40.54

 

You can see in the first combo box of the conditional action configuration there are many tests that you can make. One thing to notice is that there isn’t a negative test, i.e. There is a “Document is Landscape”, but not “Document is not Landscape” because the ELSE on the conditional action will take care of this, also, there isn’t a “Document is Portrait”, but there is a test for Squareness.

 

Screen Shot 2013-05-10 at 18.42.27

 

The logic that we need to create based on the selections that we have is this. If the document is Landscape then process for landscape, other test to see if it’s a square. If it’s a square then process the square, otherwise process for a portrait.

Set the “If Current” to “Document is Landscape”, then set “Then Play Action” to “Landscape” which was created earlier. Set “Then Else Play” to “Test for Square”, the logic is now set up for the first stage.

For the second stage, select “Test for Square” and set “If Current” to “Document is Square” and then set “Then Play Action” to “Square”, set “Else Play Action” to “Portrait” .

To test the action you will need to create a series of test canvases, in this example i created empty ones for each format and press play on the “Run Me” action. Look at the output on the screen to make sure that the behaviour is meets the intended results.

Screen-Shot-2013-05-10-at-18.52.45

You may need to debug the action. I have added one for you to download on my Creative Cloud account (you many need to replace the text on each action though. To do this, just click on each text layer, remove and re-create it with your own text (don’t forget to turn on record for each new action)).

Once the Action has been created we can create an automated processes. There are two options in Photoshop, Batch, which will run over images in a folder. Or Droplets, a droplet will exist as an icon and will allow the user to drop any image(s) onto it for batch processing.

1. Batch -  This option will run the action over a batch of photographs. Modify the “Set” combo box to be the “Blog Post Action” set that was created. And in the Action combo box select the “Run Me” action. The Batch automation will read the contents of the source folder and output them to the defined output folder. To configure the batch processing up use the the menu option, select – File / Automate / Batch.

Screen Shot 2013-05-10 at 19.09.32

 

2. Droplets. Photoshop droplets extendeds the Batch processing and enables photoshop to be run from an icon that will reside on the computer. You will then be able to drag and drop files to it, and Photoshop will start to process them one by one. The rest of the procedure is the same os the Batch processing about (Action to run, start folder and end folder). To set the batch processing up use the the menu option, select – File / Automate / Create Droplet.

Screen Shot 2013-05-10 at 21.06.13

 

You can see in this dialog, that the input folder is described by the save droplet. The play defines the action and set combination to play. Then the  destination is defined in this case to output to a folder.

The droplet looks like this

Screen Shot 2013-05-10 at 21.35.37

There are many different options and configurations for conditional actions, and wish you luck experimenting with your own.

 

 

 

Share on Facebook