extendscriptkit
Advanced tools
Comparing version 0.1.0 to 0.1.1
"use strict"; | ||
CompItem.prototype.forLayers = function (cb) { | ||
var layers = undefined.layers; | ||
var layers = this.layers; | ||
var numLayers = layers.length; | ||
@@ -12,3 +12,3 @@ for (var i = 1; i <= numLayers; i++) { | ||
CompItem.prototype.forSelectedLayers = function (cb) { | ||
var selectedLayers = undefined.selectedLayers; | ||
var selectedLayers = this.selectedLayers; | ||
var numSelectedLayers = selectedLayers.length; | ||
@@ -15,0 +15,0 @@ if (numSelectedLayers !== 0) { |
"use strict"; | ||
Project.prototype.forItems = function (cb) { | ||
var numItems = undefined.numItems; | ||
var numItems = this.numItems; | ||
for (var i = 1; i <= numItems; i++) { | ||
var item = undefined.item(i); | ||
var item = this.item(i); | ||
cb(item); | ||
@@ -12,5 +12,5 @@ } | ||
Project.prototype.forFilteredItems = function (filter, cb) { | ||
var numItems = undefined.numItems; | ||
var numItems = this.numItems; | ||
for (var i = 1; i < numItems; i++) { | ||
var item = undefined.item(i); | ||
var item = this.item(i); | ||
filter(item) && cb(item); | ||
@@ -21,4 +21,4 @@ } | ||
Project.prototype.forSelections = function (cb) { | ||
for (var i = 0; i < undefined.selection.length; i++) { | ||
cb(undefined.selection[i]); | ||
for (var i = 0; i < this.selection.length; i++) { | ||
cb(this.selection[i]); | ||
} | ||
@@ -28,3 +28,3 @@ }; | ||
Project.prototype.forCompositions = function (cb) { | ||
undefined.forFilteredItems(function (item) { | ||
this.forFilteredItems(function (item) { | ||
return item instanceof CompItem; | ||
@@ -35,5 +35,5 @@ }, cb); | ||
Project.prototype.forCompositionsWithName = function (name, cb) { | ||
undefined.forFilteredItems(function (item) { | ||
this.forFilteredItems(function (item) { | ||
return item instanceof CompItem && item.name === name; | ||
}, cb); | ||
}; |
@@ -36,5 +36,5 @@ 'use strict'; | ||
console = { | ||
module.exports = { | ||
log: logConsole, | ||
error: logError | ||
}; |
{ | ||
"name": "extendscriptkit", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"description": "ExtendScript shims and helpers", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,2 @@ | ||
Application.prototype.undoable = (name, cb) => { | ||
Application.prototype.undoable = function (name, cb) { | ||
app.beginUndoGroup(name) | ||
@@ -7,3 +7,3 @@ cb() | ||
Application.prototype.faster = cb => { | ||
Application.prototype.faster = function (cb) { | ||
const tempOverlay = app.project.items.addComp('WORKING_PLEASE_WAIT', 10, 10, 1, 1, 12) | ||
@@ -10,0 +10,0 @@ tempOverlay.openInViewer() |
@@ -1,2 +0,2 @@ | ||
CompItem.prototype.forLayers = cb => { | ||
CompItem.prototype.forLayers = function (cb) { | ||
const layers = this.layers | ||
@@ -9,3 +9,3 @@ const numLayers = layers.length | ||
CompItem.prototype.forSelectedLayers = cb => { | ||
CompItem.prototype.forSelectedLayers = function (cb) { | ||
const selectedLayers = this.selectedLayers | ||
@@ -12,0 +12,0 @@ const numSelectedLayers = selectedLayers.length |
@@ -1,2 +0,2 @@ | ||
Project.prototype.forItems = cb => { | ||
Project.prototype.forItems = function (cb) { | ||
const numItems = this.numItems | ||
@@ -9,3 +9,3 @@ for (var i = 1; i <= numItems; i++) { | ||
Project.prototype.forFilteredItems = (filter, cb) => { | ||
Project.prototype.forFilteredItems = function (filter, cb) { | ||
const numItems = this.numItems | ||
@@ -18,3 +18,3 @@ for (var i = 1; i < numItems; i++) { | ||
Project.prototype.forSelections = cb => { | ||
Project.prototype.forSelections = function (cb) { | ||
for (var i = 0; i < this.selection.length; i++) { | ||
@@ -25,3 +25,3 @@ cb(this.selection[i]) | ||
Project.prototype.forCompositions = cb => { | ||
Project.prototype.forCompositions = function (cb) { | ||
this.forFilteredItems( | ||
@@ -33,3 +33,3 @@ item => item instanceof CompItem, | ||
Project.prototype.forCompositionsWithName = (name, cb) => { | ||
Project.prototype.forCompositionsWithName = function (name, cb) { | ||
this.forFilteredItems( | ||
@@ -36,0 +36,0 @@ item => item instanceof CompItem && item.name === name, |
@@ -26,5 +26,5 @@ const dispatch = require('./bridge') | ||
console = { | ||
module.exports = { | ||
log: logConsole, | ||
error: logError | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
95166