mirror of
https://github.com/jorgevasquezp/AFX_yTools.git
synced 2026-08-16 15:30:59 +00:00
Reorganized some functions on corresponding scripts to make it clearer of what was supposed to go in each one
This commit is contained in:
@@ -81,6 +81,7 @@ YTB =
|
||||
/**** TO DO ****/
|
||||
// Check that the tool object is unique.
|
||||
// Call for a window resize so it refreshes propperly.
|
||||
//alert( aTool.info.name );
|
||||
|
||||
this.tools.push( aTool );
|
||||
|
||||
@@ -92,6 +93,7 @@ YTB =
|
||||
//alert(btn.onClick);
|
||||
|
||||
this.window.layout.layout(true);
|
||||
this.window.layout.resize();
|
||||
|
||||
return aTool;
|
||||
|
||||
@@ -117,8 +119,10 @@ YTB =
|
||||
YTB.init();
|
||||
|
||||
#include "../yScripts/y_setStructure.jsx";
|
||||
#include "../yScripts/y_CompHerder.jsx";
|
||||
#include "../yScripts/y_colorProbe.jsx";
|
||||
#include "../yScripts/y_BindBetween2.jsx";
|
||||
#include "../yScripts/y_CPOffset.jsx";
|
||||
#include "../yScripts/y_puppetRig.jsx";
|
||||
#include "../yScripts/y_stopMotionLayer.jsx";
|
||||
|
||||
|
||||
@@ -1,20 +1,7 @@
|
||||
#include "y_JSExtensions.jsx";
|
||||
/*
|
||||
if (Array.prototype.getOne==null) Array.prototype.getOne=function(item){ //Extends the Array class with the getOne functions wich
|
||||
var val = -1;
|
||||
for(i=0;i<=this.length;i++){
|
||||
if(this[i]==item){
|
||||
var val = i;
|
||||
}
|
||||
}
|
||||
return val;
|
||||
}
|
||||
*/
|
||||
function sortNumber(a,b)
|
||||
{
|
||||
function sortNumber(a,b){
|
||||
return a - b;
|
||||
}
|
||||
|
||||
function pad(n,i){ //pad n with ceroes up to i places.
|
||||
if (String(n).length>=i){
|
||||
return String(n)
|
||||
@@ -27,8 +14,6 @@ function pad(n,i){ //pad n with ceroes up to i places.
|
||||
return padding+String(n)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function yUniStr(str){
|
||||
if (app.project.activeItem != null) {
|
||||
myLayers = app.project.activeItem.layers;
|
||||
@@ -67,7 +52,6 @@ function getBaseName(str){
|
||||
return str;
|
||||
};
|
||||
}
|
||||
|
||||
function getFirstGap(array){
|
||||
length = array.length
|
||||
array.sort(function sortNumber(a,b){return a-b})
|
||||
@@ -92,8 +76,6 @@ function yReplace(inputSTR,replaceSTR,replacementSTR){
|
||||
}
|
||||
return tmpSTR;
|
||||
}
|
||||
|
||||
|
||||
function genStamp(args){
|
||||
d = new Date();
|
||||
//alert(d.getMonth());
|
||||
@@ -103,7 +85,6 @@ function genStamp(args){
|
||||
str = String(m)+String(d)+String(y);
|
||||
return str
|
||||
}
|
||||
|
||||
function mergeMultiLine(_str){
|
||||
var re = new RegExp('[\n\r]');
|
||||
_lines = _str.split(re);
|
||||
@@ -128,3 +109,11 @@ function mergeMultiLine(_str){
|
||||
}
|
||||
return newStr;
|
||||
}
|
||||
function yFactor(n,f){
|
||||
if((typeof(n)=='number'&&typeof(f)=='number')&&(n>f)){
|
||||
value = n - (n%f);
|
||||
return(value);
|
||||
}else{
|
||||
alert('error');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
if (AVLayer.prototype. getPins==null) AVLayer.prototype. getPins=function(){ //Extends the AVLayer class with the getPinsfunctions which returns the Layer's property groups which are pins.
|
||||
//Useful extensions to AFX Extendscript classes.
|
||||
|
||||
if (AVLayer.prototype. getPins==null) AVLayer.prototype. getPins=function(){ //Extends the AVLayer class with the getPinsfunctions which returns the Layer's property groups which are pins.
|
||||
this.selectedPins = [];
|
||||
for(prop=0;prop<this.selectedProperties.length;prop++){
|
||||
p= this.selectedProperties[prop];
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,4 +1,6 @@
|
||||
if (Array.prototype.getOne==null) Array.prototype.getOne=function(item){ //Extends the Array class with the getOne functions wich
|
||||
//Useful extensions to the JavaScript class versions that come with the default ExtendScript version.
|
||||
|
||||
if (Array.prototype.getOne==null) Array.prototype.getOne=function(item){ //Extends the Array class with the getOne functions wich
|
||||
var val = -1;
|
||||
for(i=0;i<=this.length;i++){
|
||||
if(this[i]==item){
|
||||
@@ -7,11 +9,3 @@
|
||||
}
|
||||
return val;
|
||||
}
|
||||
function yFactor(n,f){
|
||||
if((typeof(n)=='number'&&typeof(f)=='number')&&(n>f)){
|
||||
value = n - (n%f);
|
||||
return(value);
|
||||
}else{
|
||||
alert('error');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user