#include "../yScripts/y_JSExtensions.jsx"; function YCPOffset() { this.info = { name : "YCornerPinOffset", version : 0.12, stage : "development", description : "Offsets each corner of a CornerPin Effect.", url : "yorchnet.com" }; this.appearence = { buttonHeight : 30, buttonWidth : 126 }; this.resources = { icon : new File('yNet.png'), }; this.init = function init() { this.btnLauyout = "button\ {\ preferredSize: ['" + this.appearence.buttonWidth + "','" + this.appearence.buttonHeight + "'],\ text:'" + this.info.name + "',\ helpTip:'" + this.info.description + "'\ }"; this. res = "window\ {\ type:'palette',\ text:'" + this.info.name + ' ' + this.info.ver + ' ' + this.info.stage + "',\ info: Group \ {\ alignment:['center','bottom'],\ icon: Image \ {\ icon:'" + this.resources.icon.path + '/' + this.resources.icon.name + "',\ preferredSize: [15, 18]\ },\ website: StaticText\ {\ text:'" + this.info.url + "',\ alignment:['fill','center']\ },\ }\ }"; } this.createUI = function createUI() { res = "window {\ resizeable : true\ closeButton : true\ text:'wtf'\ }" this.window = new Window( res ); this.window.layout.layout(true); this.window.center(); this.window.show(); } this.yMainFunction = function yMainFunction() { //if called from the button as opposed as from the script. if ( String(this) == "[object Button]" ) { this.yTool.processCornerPins(); } else { this.processCornerPins(); } } this.getSelectedCornerPins = function getSelectedCornerPins() { /* Function that returns a list of effect objects that match any of the names specified in validCornerPinNames. */ validCornerPinNames = ["ADBE Corner Pin","CC Power Pin"]; selectedLayers = app.project.activeItem.selectedLayers; cornerPins = []; for (layer=0;layer