diff --git a/helper.js b/helper.js index 81dab2e..70dc274 100644 --- a/helper.js +++ b/helper.js @@ -22,72 +22,7 @@ function getSize () { return { height: doc.height, width: doc.width } } -// function getLayerSize (layer) { -// console.log('layer.bounds:') -// console.dir(layer.bounds) -// const bounds = layer.bounds -// const height = bounds.bottom - bounds.top -// const width = bounds.right - bounds.left -// return { -// height: height, -// width: width, -// left: bounds.left, -// right: bounds.right, -// top: bounds.top, -// bottom: bounds.bottom -// } -// } -// async function getSelectionInfo () { -// console.log('getSelectionInfo was called') -// const { batchPlay } = require('photoshop').action -// const { executeAsModal } = require('photoshop').core - -// async function batchPlayWrapper () { -// const result = await batchPlay( -// [ -// { -// _obj: 'get', -// _target: [ -// { -// _property: 'selection' -// }, -// { -// _ref: 'document', -// _id: app.activeDocument._id -// } -// ], -// _options: { -// dialogOptions: 'dontDisplay' -// } -// } -// ], -// { -// synchronousExecution: true, -// modalBehavior: 'execute' -// } -// ) - -// return result -// } - -// try { -// const selection = (await executeAsModal(batchPlayWrapper))[0].selection - -// let selection_info = { -// left: selection.left._value, -// right: selection.right._value, -// bottom: selection.bottom._value, -// top: selection.top._value, -// height: selection.bottom._value - selection.top._value, -// width: selection.right._value - selection.left._value -// } -// // console.dir({selection_info}) -// return selection_info -// } catch (e) { -// console.warn('selection info error', e) -// } -// } const { batchPlay } = require('photoshop').action const { executeAsModal } = require('photoshop').core diff --git a/outpaint.js b/outpaint.js index 1cdc3b5..7c82d49 100644 --- a/outpaint.js +++ b/outpaint.js @@ -48,32 +48,9 @@ async function moveLayersToGroup (group_id) { }) } -// function unselectActiveLayers(){ -// const layers = app.activeDocument.activeLayers -// for (layer of layers){ -// layer.selected = false -// } -// } -// function selectLayers(layers){ -// unselectActiveLayers() -// for (layer of layers){ -// layer.selected = true -// } -// } - -// function selectGroup(layer){ -// unselectActiveLayers() -// layer.parent.selected = true - -// } - -// async function mergeGroup(layer){ -// selectGroup(layer) -// await app.activeDocument.activeLayers[0].merge() -// } async function createSnapshot () { const { executeAsModal } = require('photoshop').core