This plugin is for getting started with (UXP) plugin development for Adobe Photoshop. It allows you to scale multiple layers at once, while keeping them in place.
-
Clone the repository:
git clone https://github.com/simonhenke/uxp-workshop.git
-
Set your Photoshop to Developer mode: Edit > Preferences > Plugins
-
Add the manifest.json to the Adobe UXP Developer Tool and load the plugin
The plugin was built in 7 small steps. You can check those out like this:
- create new plugin based on starter:
git checkout be6b126
- tidy up and remove unused code:
git checkout ccb2651
- scale layers using the Photshop API:
git checkout cca5a84
- add Spectrum textfield to allow user input:
git checkout 2b38103
- validate the input and notify the user:
git checkout b562035
- persist plugin state using localStorage:
git checkout f405148
- use batchPlay to convert layers to Smart Objects:
git checkout 300c02b
Alternatively, you can also download the steps as complete folders here: https://drive.google.com/file/d/1ua8Ffwk4e7zs5m8JGb2f9E2hVYsSRYFG/view?usp=sharing
This repository also provides the solutions for two additional tasks:
Add inputs for the user to control width and height separately.
Add a checkbox to lock the ratio, resulting in both inputs to be synchronized when typing in them.
Listen to "transform" events and repeat them (using batchPlay) to other layers of choice. Let the user set those sync-layers and display them in a list.