From a9f1758ebb3f6ea9992f87110e5d612c28d07807 Mon Sep 17 00:00:00 2001 From: Kyle Harter <99735799+kylemotion@users.noreply.github.com> Date: Mon, 10 Aug 2026 17:46:35 -0400 Subject: [PATCH] removed old scripts --- src/scripts/km-comp-duration-from-layer.jsx | 71 -------- src/scripts/km-layer-labeler.jsx | 134 --------------- src/scripts/km-layer-null-name-from-child.jsx | 66 -------- src/scripts/km-layer-props-copy-paste.jsx | 159 ------------------ src/scripts/km-recurse-cti-comp-center.jsx | 66 -------- .../km-trim-selected-comps-work_area.jsx | 60 ------- 6 files changed, 556 deletions(-) delete mode 100644 src/scripts/km-comp-duration-from-layer.jsx delete mode 100644 src/scripts/km-layer-labeler.jsx delete mode 100644 src/scripts/km-layer-null-name-from-child.jsx delete mode 100644 src/scripts/km-layer-props-copy-paste.jsx delete mode 100644 src/scripts/km-recurse-cti-comp-center.jsx delete mode 100644 src/scripts/km-trim-selected-comps-work_area.jsx diff --git a/src/scripts/km-comp-duration-from-layer.jsx b/src/scripts/km-comp-duration-from-layer.jsx deleted file mode 100644 index f4d134b..0000000 --- a/src/scripts/km-comp-duration-from-layer.jsx +++ /dev/null @@ -1,71 +0,0 @@ -/** - * @description a headless script that will set the comp to the selected layer's current duration - * @name km-comp-duration-from-layer - * @author Kyle Harter - * @version 1.0.0 - * - * @license This script is provided "as is," without warranty of any kind, expressed or implied. In - * no event shall the author be held liable for any damages arising in any way from the use of this - * script. - * - * - * - * - */ - -(function () { - //@include "../library/km_helperFunctions.jsx"; - //@include "../library/km_scriptUI_functions.jsx"; - //@include "../library/km_utilityFunctions.jsx"; - //@include "../library/km_textAnimators.jsx"; - //@include "../library/km_systemFunctions.jsx"; - try { - app.beginUndoGroup("Layer to comp dur"); - var km = kmFunction; - var kmScript = kmScriptUI; - var kmUtils = kmUtilityFunctions; - var kmTextAnims = KMTextAnimatorsLib; - var kmSystems = kmSystemsLib; - - var activeComp = km.getActiveComp(app.project); - if(!activeComp) return; - var selLayers = km.getSelectedLayers(activeComp); - if(!selLayers) return; - - - setCompDurationFromLayer(activeComp,selLayers[0]) - - } catch (error) { - alert( - "An error occured on line: " + - error.line + - "\nError message: " + - error.message, - ); - } finally { - // this always runs no matter what - app.endUndoGroup(); - } - - function setCompDurationFromLayer(comp,layer){ - var layerStart = layer.startTime; - var layerIn = layer.inPoint; - var layerOut = layer.outPoint; - var layerShiftTime; - comp.duration = layerOut-layerIn; - for(var i = 1; i<=comp.numLayers; i++){ - var compLayer = comp.layer(i); - $.writeln("Layer Start Time: " + layerIn) - if(layerIn > 0){ - layerShiftTime = -layerIn; - $.writeln("Layer Shift Time: " + layerShiftTime) - } else { - layerShiftTime = layerIn; - } - compLayer.startTime += layerShiftTime - } - - - return comp - } -})(); diff --git a/src/scripts/km-layer-labeler.jsx b/src/scripts/km-layer-labeler.jsx deleted file mode 100644 index 82d2766..0000000 --- a/src/scripts/km-layer-labeler.jsx +++ /dev/null @@ -1,134 +0,0 @@ -/** - * @description a script wiyh a UI that will do something really cool in AE - * @name km-layer-labeler - * @author Kyle Harter - * @version 1.0.0 - * - * @license This script is provided "as is," without warranty of any kind, expressed or implied. In - * no event shall the author be held liable for any damages arising in any way from the use of this - * script. - * - * - * - * -*/ - - -(function(thisObj){ - - //@include "../library/km_helperFunctions.jsx"; - //@include "../library/km_scriptUI_functions.jsx"; - //@include "../library/km_utilityFunctions.jsx"; - - var scriptName = "km-layer-labeler"; - - createUI(thisObj) - - function createUI(thisObj){ - var kmUtils = kmUtilityFunctions; - var file = new File('/Users/Shared/km/km-layer-labels.json'); - var config = kmUtils.readJSONFile(file); - var btnSize = [100,25] - - var win = thisObj instanceof Panel - ? thisObj - : new Window("window", scriptName, undefined, { - resizeable: true - }); - - win.orientation = 'column'; - win.alignChildren = ["left", "top"]; - - var mainGroup = win.add("group", undefined, "Main Group"); - mainGroup.orientation = 'column'; - - if(config && config.labels && config.labels.length > 0){ - var buttonsPerRow = 4; - var labelGroup = mainGroup.add("group", undefined, "Labels Group"); - labelGroup.orientation = "column"; - labelGroup.alignChildren = ["left", "top"]; - - for(var i = 0; i - * @version 1.0.0 - * - * @license This script is provided "as is," without warranty of any kind, expressed or implied. In - * no event shall the author be held liable for any damages arising in any way from the use of this - * script. - * - * - * - * - */ - -(function () { - //@include "../library/km_helperFunctions.jsx"; - //@include "../library/km_scriptUI_functions.jsx"; - //@include "../library/km_utilityFunctions.jsx"; - //@include "../library/km_textAnimators.jsx"; - //@include "../library/km_systemFunctions.jsx"; - try { - app.beginUndoGroup("what does this script do?"); - var km = kmFunction; - var kmScript = kmScriptUI; - var kmUtils = kmUtilityFunctions; - var kmTextAnims = KMTextAnimatorsLib; - var kmSystems = kmSystemsLib; - - var activeComp = km.getActiveComp(km.getProj()); - - var selLayers = km.getSelectedLayers(activeComp); - nullNamefromFirstChild(selLayers) - - } catch (error) { - alert( - "An error occured on line: " + - error.line + - "\nError message: " + - error.message, - ); - } finally { - // this always runs no matter what - app.endUndoGroup(); - } - - function nullNamefromFirstChild(layers) { - var found = false - for(var i = 0; i - * @version 1.0.0 - * - * @license This script is provided "as is," without warranty of any kind, expressed or implied. In - * no event shall the author be held liable for any damages arising in any way from the use of this - * script. - * - * - * - * -*/ - - -(function(thisObj){ - - //@include "../library/km_helperFunctions.jsx"; - //@include "../library/km_scriptUI_functions.jsx"; - //@include "../library/km_utilityFunctions.jsx"; - //@include "../library/km_textAnimators.jsx"; - //@include "../library/km_systemFunctions.jsx"; - - var scriptName = "km-layer-props-copy-paste"; - - createUI(thisObj) - - function createUI(thisObj){ - var win = thisObj instanceof Panel - ? thisObj - : new Window("window", scriptName, undefined, { - resizeable: true - }) - - win.orientation = 'column'; - win.alignChildren = ["left", "top"]; - - var mainGroup = win.add("group", undefined, "Main Group"); - mainGroup.orientation = 'column'; - - - var copyPasteGroup = mainGroup.add("group", undefined, "Copy Paste Group"); - copyPasteGroup.orientation = 'row'; - var copyButton = copyPasteGroup.add("button", undefined, "Copy"); - copyButton.preferredSize = [-1,30]; - var pasteButton = copyPasteGroup.add("button", undefined, "Paste"); - pasteButton.preferredSize = [-1,30]; - - var layerInfoGroup = mainGroup.add('group', undefined, 'Copy Info'); - layerInfoGroup.alignChildren = ['left','top']; - var layerInfoText = layerInfoGroup.add('staticText', undefined, 'text'); - layerInfoText.characters = 50; - - - var layerPropData = [{ - label: null, - name: '', - comment: '' - }]; - - - copyButton.onClick = function(){ - try { - app.beginUndoGroup("What script does"); - - var km = kmFunction; - var kmScript = kmScriptUI; - var kmUtils = kmUtilityFunctions; - var kmTextAnims = KMTextAnimatorsLib; - - var activeComp = km.getActiveComp(km.getProj()); - var selLayers = km.getSelectedLayers(activeComp); - - - copyProps(selLayers) - - layerInfoText.text = layerPropData.length + ' layers copied from ' + activeComp.name; - - } catch(error) { - alert("An error occured on line: " + error.line + "\nError message: " + error.message); - } finally { - // this always runs no matter what - app.endUndoGroup() - } - - } - - pasteButton.onClick = function(){ - try { - app.beginUndoGroup("What script does"); - - var km = kmFunction; - var kmScript = kmScriptUI; - var kmUtils = kmUtilityFunctions; - var kmTextAnims = KMTextAnimatorsLib; - - var activeComp = km.getActiveComp(km.getProj()); - var selLayers = km.getSelectedLayers(activeComp); - - pasteProps(selLayers) - - layerInfoText.text = layerPropData.length + ' layers pasted to ' + activeComp.name; - - } catch(error) { - alert("An error occured on line: " + error.line + "\nError message: " + error.message); - } finally { - // this always runs no matter what - app.endUndoGroup() - } - - } - - - function copyProps(selLayers){ - layerPropData = []; - - for(var i = 0; i - * @version 1.0.0 - * - * @license This script is provided "as is," without warranty of any kind, expressed or implied. In - * no event shall the author be held liable for any damages arising in any way from the use of this - * script. - * - * - * - * - */ - -(function () { - //@include "../library/km_helperFunctions.jsx"; - //@include "../library/km_scriptUI_functions.jsx"; - //@include "../library/km_utilityFunctions.jsx"; - //@include "../library/km_textAnimators.jsx"; - //@include "../library/km_systemFunctions.jsx"; - try { - app.beginUndoGroup("Moves each comp CTI to middle of comp timeline for easy viewing when viewing comp"); - var km = kmFunction; - var kmScript = kmScriptUI; - var kmUtils = kmUtilityFunctions; - var kmTextAnims = KMTextAnimatorsLib; - var kmSystems = kmSystemsLib; - - var proj = km.getProj(); - - - - batchCTICompCenter(proj) - - } catch (error) { - alert( - "An error occured on line: " + - error.line + - "\nError message: " + - error.message, - ); - } finally { - // this always runs no matter what - app.endUndoGroup(); - } - - function batchCTICompCenter(proj) { - var compsArray = [] - km.traverseFolder(proj, function (item){ - if(item instanceof CompItem){ - item.time = item.duration/2; - compsArray.push({ - compItem: item, - compName: item.name - }) - } - }) - - var msg = 'Analysis is complete!\r\r' + compsArray.length + ' comps\' CTIs were placed in the middle of their timelines.'; - - alert(msg) - - return; - } -})(); diff --git a/src/scripts/km-trim-selected-comps-work_area.jsx b/src/scripts/km-trim-selected-comps-work_area.jsx deleted file mode 100644 index 39765e8..0000000 --- a/src/scripts/km-trim-selected-comps-work_area.jsx +++ /dev/null @@ -1,60 +0,0 @@ -/** - * @description a headless script to do something cool in AE - * @name km-trim-selected-comps-work_area - * @author Kyle Harter - * @version 1.0.0 - * - * @license This script is provided "as is," without warranty of any kind, expressed or implied. In - * no event shall the author be held liable for any damages arising in any way from the use of this - * script. - * - * - * - * - */ - -(function () { - //@include "../library/km_helperFunctions.jsx"; - //@include "../library/km_scriptUI_functions.jsx"; - //@include "../library/km_utilityFunctions.jsx"; - //@include "../library/km_textAnimators.jsx"; - //@include "../library/km_systemFunctions.jsx"; - try { - app.beginUndoGroup("what does this script do?"); - var km = kmFunction; - var kmScript = kmScriptUI; - var kmUtils = kmUtilityFunctions; - var kmTextAnims = KMTextAnimatorsLib; - var kmSystems = kmSystemsLib; - - var comps = km.getSelectedComps(km.getProj()).comps; - - var trimmedComps = trimCompsWorkArea(comps); - - alert('Comps Trimmed: ' + trimmedComps) - - } catch (error) { - alert( - "An error occured on line: " + - error.line + - "\nError message: " + - error.message, - ); - } finally { - // this always runs no matter what - app.endUndoGroup(); - } - - function trimCompsWorkArea(comps) { - var compsTrimmed = 0 - for(var i = 0; i < comps.length; i++){ - var comp = comps[i]; - comp.openInViewer(); - app.executeCommand(2360); - comp.time = comp.duration/2; - compsTrimmed++ - } - - return compsTrimmed - } -})();