Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
transform [2017/12/16 21:15] – [Variables and Functions (Technical bit)] o2admintransform [2023/10/28 23:49] – [Release Notes] o2admin
Line 10: Line 10:
  
 For every shape selected the script gets a list of properties for the shape, You can then use these as variables to alter the shapes size, position, stroke and fill. For every shape selected the script gets a list of properties for the shape, You can then use these as variables to alter the shapes size, position, stroke and fill.
-The really powerful feature is that you can use any variable in any field to fix things up and create some very powerful transformations.  +The key feature is that you can use any variable in any field to calculate values - this can create some very powerful transformations.  
  
  
Line 110: Line 110:
     * To eliminate any colour under 1% C:[ max(1, C) ]  - Using 'C' as shortcut for fill.cyan     * To eliminate any colour under 1% C:[ max(1, C) ]  - Using 'C' as shortcut for fill.cyan
     * To gamma adjust an RGB color R:[  255 * (R / 255) ^ gamma ]  or R:[  255 * (R / 255) ^ (1/gamma) ]      * To gamma adjust an RGB color R:[  255 * (R / 255) ^ gamma ]  or R:[  255 * (R / 255) ^ (1/gamma) ] 
-    + 
 +=== Extendscript === 
 +{{::transfrom_js.png?400|}} 
 +This will run Javascript code on each shape being transformed, giving you extra control on modifying the shape. 
 + 
 +These are the variables passed to the code 
 +  shape {object}: The current shape  
 +  * previousShape {null|object}: The previous shape 
 +  * index {number}: current selection index 
 +  * values {object}: object containing the values 
 +  * source {null|object} : source shape if duplicating 
 +  * copyCount {number}: copy count if duplicated or 0 
 +  * copies {number}: Number to be duplicated 
 === Delete === === Delete ===
 {{::transform-delete.png|}} \\ {{::transform-delete.png|}} \\
Line 258: Line 271:
  
 ==== Release Notes ==== ==== Release Notes ====
 +  * **1.4.0** - October 2023
 +    * Added open for Extendscript code
 +
   * **1.3.1** - 17 December 2017   * **1.3.1** - 17 December 2017
-  * Requires PowerScripts 3.4.2 +    * Requires PowerScripts 3.4.2 
-  * CC2018 Fixes +    * CC2018 Fixes 
-  * Saving presets also saves accortions status of expanded to closed.+    * Saving presets also saves accordions status of expanded to closed.
  
   * **1.3.0** - 25 November 2017   * **1.3.0** - 25 November 2017