Easy Way to Automate Photoshop with Variables (Part 5)

Easy Way to Automate Photoshop with Variables (Part 5)

We will continue exploring Variables in Photoshop and this time I will explain you why, when and how to combine Photoshop actions and Variables. Combination Variables + actions will give you more options and flexibility. Nothing is carved in stone when you work in Photoshop and there is a solution for just every situation even when you cannot use variables with Smart Object layers.

When, why and how to combine Variables and Photoshop actions

I want to start with one note about Photoshop actions in case you are not familiar with. Personally, I am dividing actions into two categories or groups: actions for distribution/sale and actions for personal-internal use.

The first group: actions for distribution/sale is the one which requires some experience and some amount of knowledge about Photoshop capabilities. Sometimes it is required to consider and many situations when creating actions and finally lots of testing.

The second group: actions for peronal/internal use is actually one of the easiest things in Photoshop. This is true especially when working with templates (or files in general) which always contains the exact same content. Here I mean that the template contains always exact same layers or image/file always has only Background layer, for example. It really works like this:

  • Perform what you want to do with your file. 
  • Write down steps/values or remember them. 
  • Create action and start recording.
  • Repeat steps you have written down or remembered.
  • Stop recording action and you are done.

That's all it takes. Everything will work perfect, especially when working with files exported using variables or files which always contains the exact same content.

Some things require that files has and exact same dimensions, color mode... just to not forget to mention and that. You can always ensure that document has desired values, but that is, I guess too much for this tutorial, lets keep it simple as much as it can be without leaving topic and purpose of this tutorial.

Back to our: when to combine Photoshop actions and Variables. Here are my recommendations:

Combine Variables and actions whenever you want to include in final effect things like filters and third party plugins. Here are two tips which can give you an idea how to use actions with Photoshop plugins: Smart Way to Use Photoshop Actions With Photoshop Plugins and Smart Way to Use Photoshop Actions With Photoshop Plugins Part 2.
Note: above links are just to give you an idea, not precise instructions related to this post.

Combine Variables and actions when you want to resize, convert and save in different format.

Combine Variables ad actions when you want to get rid of extra layers in template due to use of Visibility variables.

Combine Variables and actions when you want to apply some transformations like rotations for example. Although you can rotate the layer to which is assigned Variable, it does not mean to Photoshop nothing. There are options to instruct Photoshop which anchor point and scaling method to use from the Method drop-down list, but there isn't option to set rotation angle when defining variables. This is not barrier to achieve desired output, you can use actions to batch process all exported templates. In fact, you can apply different transformations selectively because there is always option to select files in Bridge and batch run action only on selected files. Along with rotation (or anything else that is recorded in action) you can save files in a couple of different formats, scale them or even to rename and append prefix or suffix using Image Processor Pro, which is free by the way.

Combine Variables and actions when you want to make last minute changes to some or all of exported files (Data Sets). I am referring to exported Data Sets and here is what I mean: each Data Set will duplicate original template during export and quickly make changes on layers which has Variables assigned. Data Set is actually one or more Variable which contains some instructions like which image from your drive to use to replace pixels on the layer in the document.

Combine Variables and actions when you need to make any of above mentioned modifications/changes or a combination of a couple of them.

Project

Let me give you one example, so you can test and practice. Let's say you want to get rid of the extra Color Lookup layer which is exported in a previous post when we were practicing with Visibility variables.You also want to save JPG files and to send them to the client for approval or any other reason. You do not want to send files with original dimensions or in other words you want to send smaller, scaled down versions. We are going first to record action we need then to batch process files.

Step 1 Open and duplicate exported file
The very first step is to open any of exported files in Photoshop. Duplicate file from Image > Duplicate and make that your habit. Close original file.

Step 2 record action
Our goal is to get rid of one extra Color Lookup layer which is hidden using visibility Variable. It is a simple task, but we are practicing, you will come in situation to remove much more hidden layers. Open the Actions panel from Window > Actions. Create a new set by clicking on the folder icon (Create new set) at the bottom of the Actions panel. Give it a meaningful name for you. Click on the page icon (Create new action) at the bottom of the Actions panel to create new actions and give it a meaningful name like Remove hidden layers. You are in recording mode (red circle at the bottom of Actions panel confirms that) and all you have to do is to visit Layer > Delete > Hidden Layers. After selecting the specified menu item you need to confirm on the Yes button in the dialog which will appear on your screen.
Select Delete Hidden layers menu item

That's it for now, click on Stop playing/recording button in the Actions panel to stop recording the action. Close file without saving and proceed to the next step.
Stop recording action

Step 3 Batch process files
We are going now to run action on all exported files, although it can be done selectively. First ensure that you have Dr Brown Services installed, in particular Image Processor Pro. Run Adobe Bridge and navigate to the folder with the exported files ( how to export is explained in this post starting with step 11). Select all exported files and go to Tools > Dr Brown's Services 2.3.0 > Image Processor Pro.
Select exported templates in Bridge and run Image Processor Pro

When Image Processor Pro window appears on your screen you need to specify settings and saving options. I will suggest you to set: Save in Same Location but also and Save in Subfolder. It is best practice to create new sub-folder for processed and exported images.

We are going to save and JPG files for client. On the first tab click on Save to appear checkmark and type subfolder name next to Subfolder Name:. Choose JPEG from File Type drop down list. Check and Resize to Fit option on the right side of the dialog and type dimensions to fit into. This fit into means: both typed dimensions (for Width and Height) must be equal to or smaller. Do not forget to check and Scale Styles because we have styles applied in our document. Quality settings are up to you and you have File Naming section where you can rename JPEG files. I will skip part of custom file names. You can read this post for more info.
Settings to save JPEG files in Image Processor Pro

On the second tab you will specify to save PSD files. First, ensure that Save has a checkmark on its left side and type name for subfolder in the text field next to Subfolder Name:. Choose Photoshop PSD from File Type drop down list. Uncheck Resize to Fit if it is checked. Leave the default values for channels and layers and pay attention to Run Action. Click on Run Action to appear checkmark then select action set name and action name from the drop down list next to Action:. In my case it is action set: Batch and action: Remove hidden layers. Lastly, click Run button at the top of the dialog and you are done.
Settings to save PSD files from Image Processor Pro

Step 4 Check your output files
When Photoshop finish exporting files, press Ctrl/Cmd + Alt/Opt + O (letter O) to return to Adobe Bridge and to check your files. If you are following along then you should have two extra folders created: one for JPEG files and one for PSD files. Check if everything is ok, open any of PSD files and check how many Color Lookup adjustment layers you have. You should have only one.
Check if second Color Lookup adjustment is removed

Go in folder with JPEG images and click on any of exported files, then take a look at the Metadata panel on the right side. Everything OK? Dimensions, Resolution, File Size are OK? Fine, we are done for this tutorial.
Folder with exported JPEG files

Cover image on top is a comparison before/after of exported files in the post: Easy Way to Automate Photoshop with Variables (Part 2). I have batch processed exported files using Image Processor Pro and simple action with four steps: to select big layer and to apply Color Halftone filter and to select small layer then to rotate it slightly.

To be continued

In the next tutorial with Variables in title we are going to explore how to use an external file with data prepared in advance. It is very easy to work with external files and there are some advantages which can save you even more time and bring some amazing capabilities like random arranged images in the layout. External files with Variables and Data Sets can be also useful to create some unique and cool things like textures and backgrounds using existing ones which you already have on your computer. Stay tuned, we are not completely done, although you may already feel like you know everything about this topic.

Conclusion

So far with the previous 5 posts about Variables in Photoshop I should have provided you enough information's to save time and get things done with amazing speed and a lot of flexibility. If you have any question or doubt do not hesitate to leave comments or contact me. I am always willing to help or to update tutorial if needed.

All posts in this mini-course
Easy Way to Automate Photoshop with Variables
Easy Way to Automate Photoshop with Variables (Part 2)
Easy Way to Automate Photoshop with Variables (Part 3)
Easy Way to Automate Photoshop with Variables (Part 4)
Easy Way to Automate Photoshop with Variables (Part 5)
Easy Way to Automate Photoshop with Variables (Part 6)
Easy Way to Automate Photoshop with Variables (Part 7)
Why and How to Combine Text/Pixel Replacement Variables With Visibility Variables in Photoshop

Product used in this tutorial:
Adobe Photoshop CC 2014

Reference:
Photoshop Help / Creating data-driven graphics


Comments

Popular posts from this blog

Free Puzzle Pieces Actions For Photoshop and Elements

How to Change Artboard Size in Adobe Photoshop

Old Weathered Vertical Wooden Planks Free Image