├── img ├── Themes.gif ├── theme_pastel.png ├── theme_pico8.png ├── theme_vivid.png ├── theme_material.png ├── theme_david_arbor.png ├── theme_generic_16_cgp.png ├── theme_ryan_summers.png └── theme_paul_conigliaro.png ├── .github └── workflows │ └── main.yml ├── Snippets ├── Group Layers.js ├── Parent Layers to Null.js ├── Toggle Solo.js ├── Shy Everything Except.js ├── Toggle Shy.js ├── Create Solid Layer.js ├── Copy Color To Clipboard.js ├── Create Shape Layer.js ├── Push Layers Up By One.js └── Push Layers Back By One.js ├── Themes ├── Vivid.theme ├── Material.theme ├── Ryan Summers.theme ├── Pico-8.theme ├── Paul Conigliaro.theme ├── David Arbor.theme ├── Pastel.theme └── Generic 16 CGP.theme └── README.md /img/Themes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/Themes.gif -------------------------------------------------------------------------------- /img/theme_pastel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_pastel.png -------------------------------------------------------------------------------- /img/theme_pico8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_pico8.png -------------------------------------------------------------------------------- /img/theme_vivid.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_vivid.png -------------------------------------------------------------------------------- /img/theme_material.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_material.png -------------------------------------------------------------------------------- /img/theme_david_arbor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_david_arbor.png -------------------------------------------------------------------------------- /img/theme_generic_16_cgp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_generic_16_cgp.png -------------------------------------------------------------------------------- /img/theme_ryan_summers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_ryan_summers.png -------------------------------------------------------------------------------- /img/theme_paul_conigliaro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rendertom/Labels/HEAD/img/theme_paul_conigliaro.png -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: Build and release 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: 7 | - master 8 | 9 | jobs: 10 | build-and-release: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - name: Checkout 14 | uses: actions/checkout@v2 15 | 16 | # https://github.com/marketplace/actions/zip-release 17 | - name: Archive snippets 18 | uses: thedoctor0/zip-release@main 19 | with: 20 | filename: 'Snippets.zip' 21 | path: './Snippets' 22 | - name: Archive themes 23 | uses: thedoctor0/zip-release@main 24 | with: 25 | filename: 'Themes.zip' 26 | path: './Themes' 27 | 28 | # https://github.com/marketplace/actions/gh-release 29 | - name: Release 30 | uses: softprops/action-gh-release@v1 31 | with: 32 | tag_name: assets 33 | files: | 34 | Snippets.zip 35 | Themes.zip 36 | -------------------------------------------------------------------------------- /Snippets/Group Layers.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Groups all layers with same label color together underneath the topmost layer with that color. 10 | 11 | */ 12 | 13 | (function groupLayers() { 14 | var composition = app.project.activeItem; 15 | if (!composition || !(composition instanceof CompItem)) { 16 | return alert('Please select composition first'); 17 | } 18 | 19 | app.beginUndoGroup('Group Layers'); 20 | 21 | groupLayersByLabel(composition, Labels.index); 22 | 23 | app.endUndoGroup(); 24 | 25 | function groupLayersByLabel(composition, label) { 26 | var layer, firstLayerMachingLabel; 27 | for (var i = 1, il = composition.numLayers; i <= il; i++) { 28 | layer = composition.layer(i); 29 | if (layer.label !== label) continue; 30 | 31 | if (!firstLayerMachingLabel) { 32 | firstLayerMachingLabel = layer; 33 | continue; 34 | } 35 | 36 | layer.moveAfter(firstLayerMachingLabel); 37 | } 38 | } 39 | })(); -------------------------------------------------------------------------------- /Snippets/Parent Layers to Null.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Parent all layers with the same label color to a null. 10 | 11 | */ 12 | 13 | (function parentLayers() { 14 | var composition = app.project.activeItem; 15 | if (!composition || !(composition instanceof CompItem)) { 16 | return alert('Please select composition first'); 17 | } 18 | 19 | app.beginUndoGroup('Parent Layer to Null'); 20 | 21 | parentLayersToNull(composition, Labels.index); 22 | 23 | app.endUndoGroup(); 24 | 25 | function parentLayersToNull(composition, label) { 26 | var layer, nullLayer, indexOffset; 27 | 28 | indexOffset = 0; 29 | for (var i = 1, il = composition.numLayers; i <= il; i++) { 30 | layer = composition.layer(i + indexOffset); 31 | if (layer.label !== label) continue; 32 | 33 | if (!nullLayer) { 34 | nullLayer = composition.layers.addNull(); 35 | nullLayer.label = label; 36 | indexOffset = 1; 37 | } 38 | 39 | layer.parent = nullLayer; 40 | } 41 | } 42 | })(); -------------------------------------------------------------------------------- /Snippets/Toggle Solo.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Let's create a simple script that: 10 | 1. loops through all the layers in selected composition, 11 | 2. checks if layers label index maches _our_ Labels.index and 12 | 3. toggles layers 'solo' property if it matches 13 | 14 | */ 15 | 16 | (function toggleSolo() { 17 | var composition, layer; 18 | 19 | // Get active composition 20 | composition = app.project.activeItem; 21 | if (!composition || !(composition instanceof CompItem)) { 22 | return alert('Please select composition first'); 23 | } 24 | 25 | app.beginUndoGroup('Toggle Solo'); 26 | 27 | // Loop through all layers in composition 28 | for (var i = 1, il = composition.numLayers; i <= il; i ++) { 29 | layer = composition.layer(i); 30 | 31 | // Check if layers label matches our Labels.index 32 | if (layer.label !== Labels.index) { 33 | continue; 34 | } 35 | 36 | // Toggle layers 'solo' property. 37 | layer.solo = !layer.solo; 38 | } 39 | 40 | app.endUndoGroup(); 41 | })(); -------------------------------------------------------------------------------- /Snippets/Shy Everything Except.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Let's create a simple script that: 10 | 1. toggles 'solo' property of all layers that do not match given label color in composition 11 | 2. and toggles compositions 'hideShyLayers' property accordingly 12 | 13 | */ 14 | 15 | (function shyEverythingExcept() { 16 | var composition, layer; 17 | 18 | // Get active composition 19 | composition = app.project.activeItem; 20 | if (!composition || !(composition instanceof CompItem)) { 21 | return alert('Please select composition first'); 22 | } 23 | 24 | app.beginUndoGroup('Shy Everything Except'); 25 | 26 | for (var i = 1, il = composition.numLayers; i <= il; i ++) { 27 | layer = composition.layer(i); 28 | 29 | layer.shy = layer.label !== Labels.index; 30 | } 31 | 32 | composition.hideShyLayers = compHasShyLayers(composition); 33 | app.endUndoGroup(); 34 | 35 | function compHasShyLayers(composition) { 36 | for (var i = 1, il = composition.numLayers; i < il; i ++) { 37 | if (composition.layer(i).shy === true) { 38 | return true; 39 | } 40 | } 41 | return false; 42 | } 43 | })(); -------------------------------------------------------------------------------- /Snippets/Toggle Shy.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Let's create a simple script that: 10 | 1. toggles 'shy' property of all layers with given label color in composition 11 | 2. and toggles compositions 'hideShyLayers' property accordingly 12 | 13 | */ 14 | 15 | (function toggleShy() { 16 | var composition, layer; 17 | 18 | // Get active composition 19 | composition = app.project.activeItem; 20 | if (!composition || !(composition instanceof CompItem)) { 21 | return alert('Please select composition first'); 22 | } 23 | 24 | app.beginUndoGroup('Toggle Shy'); 25 | 26 | for (var i = 1, il = composition.numLayers; i <= il; i ++) { 27 | layer = composition.layer(i); 28 | 29 | if (layer.label !== Labels.index) { 30 | continue; 31 | } 32 | 33 | layer.shy = !layer.shy; 34 | } 35 | 36 | composition.hideShyLayers = compHasShyLayers(composition); 37 | app.endUndoGroup(); 38 | 39 | function compHasShyLayers(composition) { 40 | for (var i = 1, il = composition.numLayers; i < il; i ++) { 41 | if (composition.layer(i).shy === true) { 42 | return true; 43 | } 44 | } 45 | return false; 46 | } 47 | })(); -------------------------------------------------------------------------------- /Snippets/Create Solid Layer.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Let's create a simple script that: 10 | 1. creates a Solid Layer with base color of Labels.rgb 11 | and name Labels.hex and that fits into composition 12 | 2. Move it above selected layers. 13 | 14 | */ 15 | 16 | (function createSolidLayer() { 17 | // Get active composition 18 | var composition = app.project.activeItem; 19 | if (!composition || !(composition instanceof CompItem)) { 20 | return alert('Please select composition first'); 21 | } 22 | 23 | app.beginUndoGroup('Create Solid Layer'); 24 | 25 | // Store curent selection, so we can access it later; 26 | var selectedLayers = composition.selectedLayers; 27 | 28 | // Create Solid Layer 29 | var solidLayer = composition.layers.addSolid( 30 | Labels.rgb / 255, 31 | '#' + Labels.hex, 32 | composition.width, 33 | composition.height, 34 | 1 35 | ); 36 | 37 | // Change layers label color 38 | solidLayer.label = Labels.index; 39 | 40 | // Move layer above selected layer 41 | if (selectedLayers.length > 0) { 42 | solidLayer.moveBefore(selectedLayers[0]); 43 | } 44 | 45 | app.endUndoGroup(); 46 | })(); -------------------------------------------------------------------------------- /Snippets/Copy Color To Clipboard.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | */ 10 | 11 | (function copyColorToClipboard() { 12 | 13 | var hexColor = '#' + Labels.hex; 14 | copyToClipboard(hexColor); 15 | writeLn(hexColor); 16 | 17 | function copyToClipboard(string) { 18 | var cmd = 'cmd.exe /c cmd.exe /c "echo ' + string + ' | clip"'; 19 | if (isMac()) { 20 | var pathToTempFile = Folder.temp.fsName + "/ClipBoard.txt"; 21 | writeFile(pathToTempFile, string); 22 | cmd = 'cat ' + pathToTempFile + ' | pbcopy'; 23 | } 24 | 25 | system.callSystem(cmd); 26 | } 27 | 28 | function isMac() { 29 | return !isWin(); 30 | } 31 | 32 | function isWin() { 33 | return $.os.indexOf("Windows") !== -1; 34 | } 35 | 36 | function writeFile(fileObj, fileContent, encoding) { 37 | encoding = encoding || "utf-8"; 38 | fileObj = (fileObj instanceof File) ? fileObj : new File(fileObj); 39 | 40 | var parentFolder = fileObj.parent; 41 | if (!parentFolder.exists && !parentFolder.create()) 42 | throw "Cannot create file in path " + fileObj.fsName; 43 | 44 | fileObj.encoding = encoding; 45 | fileObj.open("w"); 46 | fileObj.write(fileContent); 47 | fileObj.close(); 48 | 49 | return fileObj; 50 | } 51 | 52 | })(); -------------------------------------------------------------------------------- /Snippets/Create Shape Layer.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Let's create a simple script that: 10 | 1. creates a Shape Layer, 11 | 2. adds Rectangle to it and scales it to fit composition, 12 | 3. adds Fill property and changes it's color to Labels.rgb, 13 | 4. sets layers name to Labels.hex color and 14 | 5. changes its label to Labels.index. 15 | 16 | */ 17 | 18 | (function createShapeLayer() { 19 | // Get active composition 20 | var composition = app.project.activeItem; 21 | if (!composition || !(composition instanceof CompItem)) { 22 | return alert('Please select composition first'); 23 | } 24 | 25 | app.beginUndoGroup('Create Shape Layer'); 26 | 27 | var selectedLayers = composition.selectedLayers; 28 | 29 | // Create Shape Layer 30 | var shapeLayer = composition.layers.addShape(); 31 | 32 | // Add Rectangle to Shape Layers Contens group and scale it to fit composition 33 | var rectangleGroup = shapeLayer.property('ADBE Root Vectors Group').addProperty('ADBE Vector Shape - Rect'); 34 | var sizeProperty = rectangleGroup.property('ADBE Vector Rect Size'); 35 | sizeProperty.setValue([composition.width, composition.height]); 36 | 37 | // Add Fill and change its color 38 | var fillGroup = shapeLayer.property('ADBE Root Vectors Group').addProperty('ADBE Vector Graphic - Fill'); 39 | var colorProperty = fillGroup.property('ADBE Vector Fill Color'); 40 | colorProperty.setValue(Labels.rgb / 255); 41 | 42 | // Rename Shape Layer to Labels.hex color 43 | shapeLayer.name = '#' + Labels.hex; 44 | 45 | // Change its label color 46 | shapeLayer.label = Labels.index; 47 | 48 | if (selectedLayers.length > 0) { 49 | shapeLayer.moveBefore(selectedLayers[0]); 50 | } 51 | 52 | app.endUndoGroup(); 53 | })(); -------------------------------------------------------------------------------- /Themes/Vivid.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "5", "Audio Label Index 2": "7", "Camera Label Index 2": "4", "Comp Label Index 2": "15", "Folder Label Index 2": "2", "Light Label Index 2": "6", "Null Label Index": "1", "Shape Label Index 2": "8", "Solid Label Index 2": "1", "Still Label Index 2": "5", "Text Label Index": "1", "Video Label Index 2": "3" }, "labels": [ { "name": "Royal Blue", "color": "#669ACC" }, { "name": "Orange", "color": "#FF6601" }, { "name": "Green", "color": "#38AB38" }, { "name": "Brown", "color": "#C75F3C" }, { "name": "Lime", "color": "#99CC32" }, { "name": "Royal Blue", "color": "#32CDFF" }, { "name": "Light Gray", "color": "#CCCCCC" }, { "name": "Medium Magenta", "color": "#BF43BF" }, { "name": "Magenta", "color": "#FF349A" }, { "name": "Red", "color": "#FF3334" }, { "name": "Yellow", "color": "#FFCD01" }, { "name": "Light Red", "color": "#FF3367" }, { "name": "Light Lime", "color": "#CCCC66" }, { "name": "Light Orange", "color": "#FE9933" }, { "name": "Light Pink", "color": "#FF679A" }, { "name": "Blue", "color": "#4C78CD" } ], "designer": "", "url": "" } -------------------------------------------------------------------------------- /Themes/Material.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "5", "Audio Label Index 2": "7", "Camera Label Index 2": "4", "Comp Label Index 2": "15", "Folder Label Index 2": "2", "Light Label Index 2": "6", "Null Label Index": "1", "Shape Label Index 2": "8", "Solid Label Index 2": "1", "Still Label Index 2": "5", "Text Label Index": "1", "Video Label Index 2": "3" }, "labels": [ { "name": "Red", "color": "#F44336" }, { "name": "Pink", "color": "#E91E63" }, { "name": "Purple", "color": "#9C27B0" }, { "name": "Deep Purple", "color": "#673AB7" }, { "name": "Indigo", "color": "#3F51B5" }, { "name": "Blue", "color": "#2196F3" }, { "name": "Light Blue", "color": "#03A9F4" }, { "name": "Cyan", "color": "#01BCD4" }, { "name": "Teal", "color": "#019688" }, { "name": "Green", "color": "#4CAF50" }, { "name": "Light Green", "color": "#8BC34A" }, { "name": "Lime", "color": "#CDDC39" }, { "name": "Yellow", "color": "#FFEB3B" }, { "name": "Amber", "color": "#FFC107" }, { "name": "Orange", "color": "#FF9801" }, { "name": "Deep Orange", "color": "#FF5722" } ], "designer": "Google", "url": "https://material.io" } -------------------------------------------------------------------------------- /Themes/Ryan Summers.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "0", "Audio Label Index 2": "0", "Camera Label Index 2": "0", "Comp Label Index 2": "0", "Folder Label Index 2": "0", "Light Label Index 2": "0", "Null Label Index": "0", "Shape Label Index 2": "0", "Solid Label Index 2": "0", "Still Label Index 2": "0", "Text Label Index": "0", "Video Label Index 2": "0" }, "labels": [ { "name": "Black", "color": "#010101" }, { "name": "Magenta", "color": "#FF0190" }, { "name": "Red", "color": "#B90109" }, { "name": "Orange", "color": "#F95232" }, { "name": "Amber", "color": "#FB942E" }, { "name": "Yellow", "color": "#F7E25B" }, { "name": "Neon", "color": "#97FA3E" }, { "name": "Green", "color": "#366D37" }, { "name": "Mint", "color": "#249688" }, { "name": "Cyan", "color": "#2EBED2" }, { "name": "Blue", "color": "#309CEF" }, { "name": "Violet", "color": "#3F59B1" }, { "name": "Indigo", "color": "#6345B3" }, { "name": "Purple", "color": "#9835AC" }, { "name": "Deep Purple", "color": "#211523" }, { "name": "White", "color": "#FFFFFF" } ], "designer": "Ryan Summers", "url": "http://ryansummers.net" } -------------------------------------------------------------------------------- /Themes/Pico-8.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "5", "Audio Label Index 2": "7", "Camera Label Index 2": "4", "Comp Label Index 2": "15", "Folder Label Index 2": "2", "Light Label Index 2": "6", "Null Label Index": "1", "Shape Label Index 2": "8", "Solid Label Index 2": "1", "Still Label Index 2": "5", "Text Label Index": "1", "Video Label Index 2": "3" }, "labels": [ { "name": "Black", "color": "#010101" }, { "name": "Dark Blue", "color": "#1D2B53" }, { "name": "Dark Purple", "color": "#7E2553" }, { "name": "Dark Green", "color": "#018751" }, { "name": "Brown", "color": "#AB5236" }, { "name": "Dark Gray", "color": "#5F574F" }, { "name": "Light Gray", "color": "#C2C3C7" }, { "name": "White", "color": "#FFF1E8" }, { "name": "Red", "color": "#FF014D" }, { "name": "Orange", "color": "#FFA301" }, { "name": "Yellow", "color": "#FFEC27" }, { "name": "Green", "color": "#01E436" }, { "name": "Blue", "color": "#29ADFF" }, { "name": "Indigo", "color": "#83769C" }, { "name": "Pink", "color": "#FF77A8" }, { "name": "Peach", "color": "#FFCCAA" } ], "designer": "Lexaloffle", "url": "https://lexaloffle.com/pico-8.php" } -------------------------------------------------------------------------------- /Themes/Paul Conigliaro.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "11", "Audio Label Index 2": "7", "Camera Label Index 2": "13", "Comp Label Index 2": "3", "Folder Label Index 2": "0", "Light Label Index 2": "4", "Null Label Index": "14", "Shape Label Index 2": "10", "Solid Label Index 2": "1", "Still Label Index 2": "9", "Text Label Index": "12", "Video Label Index 2": "7" }, "labels": [ { "name": "Mario", "color": "#E70101" }, { "name": "OJ", "color": "#FF6A01" }, { "name": "Mango", "color": "#FFB31A" }, { "name": "Peepee", "color": "#FFEC40" }, { "name": "Slimer", "color": "#9DDC0B" }, { "name": "Cash Money", "color": "#17AF1D" }, { "name": "Ocean", "color": "#079D94" }, { "name": "Elsa", "color": "#01D2ED" }, { "name": "Smurf", "color": "#2179F3" }, { "name": "Megaman", "color": "#132BB5" }, { "name": "Prince", "color": "#5924B7" }, { "name": "Anna", "color": "#9A18B0" }, { "name": "Peach", "color": "#E93595" }, { "name": "Captain Phasma", "color": "#607D8B" }, { "name": "Storm Trooper", "color": "#E6EEF2" }, { "name": "Darth Vader", "color": "#17191A" } ], "designer": "Paul Conigliaro", "url": "http://conigs.com" } -------------------------------------------------------------------------------- /Themes/David Arbor.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "3", "Audio Label Index 2": "14", "Camera Label Index 2": "10", "Comp Label Index 2": "15", "Folder Label Index 2": "7", "Light Label Index 2": "16", "Null Label Index": "1", "Shape Label Index 2": "4", "Solid Label Index 2": "1", "Still Label Index 2": "11", "Text Label Index": "9", "Video Label Index 2": "12" }, "labels": [ { "name": "Red", "color": "#CC3D3D" }, { "name": "Pink", "color": "#BF4292" }, { "name": "Purple", "color": "#8042BF" }, { "name": "Blue", "color": "#3D6DCC" }, { "name": "Cyan", "color": "#019499" }, { "name": "Green", "color": "#4A9945" }, { "name": "Yellow", "color": "#FFC04D" }, { "name": "Orange", "color": "#E67A2E" }, { "name": "Pale Red", "color": "#E57274" }, { "name": "Pale Pink", "color": "#FF98D0" }, { "name": "Pale Purple", "color": "#CA99FF" }, { "name": "Pale Blue", "color": "#99BBFF" }, { "name": "Pale Cyan", "color": "#66FAFF" }, { "name": "Pale Green", "color": "#B7FFB3" }, { "name": "Pale Yellow", "color": "#FFDB99" }, { "name": "Pale Orange", "color": "#FFB380" } ], "designer": "David Arbor", "url": "https://www.davidarbor.com" } -------------------------------------------------------------------------------- /Themes/Pastel.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "5", "Audio Label Index 2": "7", "Camera Label Index 2": "4", "Comp Label Index 2": "15", "Folder Label Index 2": "2", "Light Label Index 2": "6", "Null Label Index": "1", "Shape Label Index 2": "8", "Solid Label Index 2": "1", "Still Label Index 2": "5", "Text Label Index": "1", "Video Label Index 2": "3" }, "labels": [ { "name": "Soft Nebula", "color": "#898CFF" }, { "name": "Milky Star", "color": "#FF89B5" }, { "name": "Comet Trial", "color": "#FFDC89" }, { "name": "Voyager 1", "color": "#90D4F7" }, { "name": "Terraform", "color": "#71E096" }, { "name": "Space Debris", "color": "#F5A26F" }, { "name": "Cosmonaut", "color": "#668DE5" }, { "name": "Supergiant", "color": "#ED6D79" }, { "name": "Aeronautics", "color": "#5AD0E5" }, { "name": "Luna Base", "color": "#DA97E0" }, { "name": "Planetarium", "color": "#CFF381" }, { "name": "Binary Star", "color": "#FF96E3" }, { "name": "Asteroid Belt", "color": "#BB96FF" }, { "name": "Xenobiology", "color": "#67EEBD" }, { "name": "Dirt", "color": "#D89F6F" }, { "name": "Above Ground", "color": "#D0D9AD" } ], "designer": "", "url": "" } -------------------------------------------------------------------------------- /Themes/Generic 16 CGP.theme: -------------------------------------------------------------------------------- 1 | { "app": { "name": "Adobe After Effects", "version": "17.0.5x16" }, "assignments": { "Adjustment Label Index 2": "5", "Audio Label Index 2": "7", "Camera Label Index 2": "4", "Comp Label Index 2": "15", "Folder Label Index 2": "2", "Light Label Index 2": "6", "Null Label Index": "1", "Shape Label Index 2": "8", "Solid Label Index 2": "1", "Still Label Index 2": "5", "Text Label Index": "1", "Video Label Index 2": "3" }, "labels": [ { "name": "Magenta", "color": "#FF01FF" }, { "name": "Gray", "color": "#9D9D9D" }, { "name": "White", "color": "#FFFFFF" }, { "name": "Red", "color": "#BE2633" }, { "name": "Meat", "color": "#E06F8B" }, { "name": "Dark Brown", "color": "#493C2B" }, { "name": "Brown", "color": "#A46422" }, { "name": "Orange", "color": "#EB8931" }, { "name": "Yellow", "color": "#F7E26B" }, { "name": "Dark Green", "color": "#2F484E" }, { "name": "Green", "color": "#44891A" }, { "name": "Slime Green", "color": "#A3CE27" }, { "name": "Night Blue", "color": "#1B2632" }, { "name": "Sea Blue", "color": "#015784" }, { "name": "Sky Blue", "color": "#31A2F2" }, { "name": "Cloud Blue", "color": "#B2DCEF" } ], "designer": "Arne Niklas Jansson", "url": "http://androidarts.com/palette/16pal.htm" } -------------------------------------------------------------------------------- /Snippets/Push Layers Up By One.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Push layers with this label to the top of the layer stack one by one. 10 | 11 | */ 12 | 13 | (function() { 14 | var composition, layers, matchingLayers; 15 | 16 | composition = app.project.activeItem; 17 | if (!composition || !(composition instanceof CompItem)) { 18 | return alert('Please select composition first'); 19 | } 20 | 21 | layers = getAllOrSelectedLayers(composition); 22 | if (layers.length === 0) return; 23 | 24 | matchingLayers = filterLayersWithMatchingLabel(layers, Labels.index); 25 | if (matchingLayers.length === 0) return; 26 | 27 | 28 | app.beginUndoGroup('Push layers up by one'); 29 | 30 | pushLayersUpByOne(composition, matchingLayers); 31 | 32 | app.endUndoGroup(); 33 | 34 | 35 | function pushLayersUpByOne(composition, layers) { 36 | var layer, nextLayer; 37 | 38 | for (var i = 0, il = layers.length; i < il; i ++) { 39 | layer = layers[i]; 40 | 41 | if (layer.index === 1) continue; 42 | 43 | nextLayer = composition.layer(layer.index - 1); 44 | 45 | if (layer.label === nextLayer.label && arrayContains(layers, nextLayer)) continue; 46 | 47 | layer.moveBefore(nextLayer); 48 | } 49 | } 50 | 51 | function getAllOrSelectedLayers(composition) { 52 | var layers; 53 | 54 | layers = composition.selectedLayers; 55 | if (layers.length > 0) { 56 | arraySortByProperty(layers, 'index'); 57 | } else { 58 | layers = getAllLayersInComposition(composition); 59 | } 60 | 61 | return layers; 62 | } 63 | 64 | function getAllLayersInComposition(composition) { 65 | var layer, layers; 66 | 67 | layers = []; 68 | for (var i = 1, il = composition.numLayers; i <= il; i ++) { 69 | layer = composition.layer(i); 70 | layers.push(layer); 71 | } 72 | return layers; 73 | } 74 | 75 | function filterLayersWithMatchingLabel(layers, label) { 76 | var layer, matchingLayers; 77 | 78 | matchingLayers = []; 79 | for (var i = 0, il = layers.length; i < il; i ++) { 80 | layer = layers[i]; 81 | if (layer.label === label) { 82 | matchingLayers.push(layer); 83 | } 84 | } 85 | return matchingLayers; 86 | } 87 | 88 | function arraySortByProperty(array, property) { 89 | array.sort(function(a, b) { 90 | return a[property] - b[property]; 91 | }); 92 | } 93 | 94 | function arrayContains(array, element) { 95 | for (var i = 0, il = array.length; i < il; i ++) { 96 | if (array[i] === element) { 97 | return true; 98 | } 99 | } 100 | return false; 101 | } 102 | })(); -------------------------------------------------------------------------------- /Snippets/Push Layers Back By One.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Labels script exposes following API: 4 | index (Number) label index, 5 | hex (String) label HEX color, 6 | rgb (Array) label RGB color [0-255, 0-255, 0-255], 7 | name (String) label name 8 | 9 | Push layers with this label to the bottom of the layer stack one by one. 10 | 11 | */ 12 | 13 | (function() { 14 | var composition, layers, matchingLayers; 15 | 16 | composition = app.project.activeItem; 17 | if (!composition || !(composition instanceof CompItem)) { 18 | return alert('Please select composition first'); 19 | } 20 | 21 | layers = getAllOrSelectedLayers(composition); 22 | if (layers.length === 0) return; 23 | 24 | matchingLayers = filterLayersWithMatchingLabel(layers, Labels.index); 25 | if (matchingLayers.length === 0) return; 26 | 27 | 28 | app.beginUndoGroup('Push layers back by one'); 29 | 30 | pushLayersBackByOne(composition, matchingLayers); 31 | 32 | app.endUndoGroup(); 33 | 34 | 35 | function pushLayersBackByOne(composition, layers) { 36 | var layer, nextLayer, numLayers; 37 | 38 | numLayers = composition.numLayers; 39 | for (var i = layers.length - 1; i >= 0; i--) { 40 | layer = layers[i]; 41 | 42 | if (layer.index === numLayers) continue; 43 | 44 | nextLayer = composition.layer(layer.index + 1); 45 | 46 | if (layer.label === nextLayer.label && arrayContains(layers, nextLayer)) continue; 47 | layer.moveAfter(nextLayer); 48 | } 49 | } 50 | 51 | function getAllOrSelectedLayers(composition) { 52 | var layers; 53 | 54 | layers = composition.selectedLayers; 55 | if (layers.length > 0) { 56 | arraySortByProperty(layers, 'index'); 57 | } else { 58 | layers = getAllLayersInComposition(composition); 59 | } 60 | 61 | return layers; 62 | } 63 | 64 | function getAllLayersInComposition(composition) { 65 | var layer, layers; 66 | 67 | layers = []; 68 | for (var i = 1, il = composition.numLayers; i <= il; i ++) { 69 | layer = composition.layer(i); 70 | layers.push(layer); 71 | } 72 | return layers; 73 | } 74 | 75 | function filterLayersWithMatchingLabel(layers, label) { 76 | var layer, matchingLayers; 77 | 78 | matchingLayers = []; 79 | for (var i = 0, il = layers.length; i < il; i ++) { 80 | layer = layers[i]; 81 | if (layer.label === label) { 82 | matchingLayers.push(layer); 83 | } 84 | } 85 | return matchingLayers; 86 | } 87 | 88 | function arraySortByProperty(array, property) { 89 | array.sort(function(a, b) { 90 | return a[property] - b[property]; 91 | }); 92 | } 93 | 94 | function arrayContains(array, element) { 95 | for (var i = 0, il = array.length; i < il; i ++) { 96 | if (array[i] === element) { 97 | return true; 98 | } 99 | } 100 | return false; 101 | } 102 | })(); -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Clean SL](img/Themes.gif) 2 | 3 | # Labels # 4 | 5 | Collection of script Snippets and label Themes for Adobe After Effects script [Labels](https://aescripts.com/labels/) 6 | 7 | ## How to ## 8 | 9 | Read how to use all of this in the [documentation](https://labels.rendertom.com/#/) 10 | 11 | 12 | ## Snippets ## 13 | 14 | Download all snippets [here](https://github.com/rendertom/Labels/releases/download/assets/Snippets.zip) 15 | 16 | * [Copy Color To Clipboard](Snippets/Copy%20Color%20To%20Clipboard.js) - copies labels HEX color to the clipboard, 17 | * [Create Shape Layer](Snippets/Create%20Shape%20Layer.js) - creates a full sized Shape Layer and sets Fill color to the label color, 18 | * [Create Solid Layer](Snippets/Create%20Solid%20Layer.js) - creates a full sized Solid Layer and sets its source color to the label color, 19 | * [Group Layers](Snippets/Group%20Layers.js) - groups all layers with same label color together underneath the topmost layer with that color, 20 | * [Parent Layers to Null](Snippets/Parent%20Layers%20to%20Null.js) - parents all layers with the same label color to a null, 21 | * [Push Layers Back By One](Snippets/Push%20Layers%20Back%20By%20One.js) - pushes layers with this label to the bottom of the layer stack one by one, 22 | * [Push Layers Up By One](Snippets/Push%20Layers%20Up%20By%20One.js) - pushes layers with this label to the top of the layer stack one by one, 23 | * [Shy Everything Except](Snippets/Shy%20Everything%20Except.js) toggles 'solo' property of all layers that do not match given label color in composition, 24 | * [Toggle Shy](Snippets/Toggle%20Shy.js) - toggles 'shy' property of all layers with given label color in composition, 25 | * [Toggle Solo](Snippets/Toggle%20Solo.js) - toggles 'solo' property of all layers with given label color in composition. 26 | 27 | ``` javascript 28 | Labels script exposes the following API: 29 | 30 | index (Number) // label index, 31 | hex (String) // label HEX color, 32 | rgb ([Number]) // label RGB color [0-255, 0-255, 0-255] 33 | name (String) // label name 34 | ``` 35 | 36 | ``` javascript 37 | // Get an active composition 38 | var composition = app.project.activeItem; 39 | if (!composition || !(composition instanceof CompItem)) { 40 | return alert('Please select a composition first'); 41 | } 42 | 43 | // Create a Solid Layer with base color of Labels.rgb 44 | var layer = composition.layers.addSolid( 45 | Labels.rgb / 255, 46 | 'My Layer', 47 | composition.width, 48 | composition.height, 49 | 1 50 | ); 51 | 52 | // Set layers comment to Labels.hex color: 53 | layer.comment = Labels.hex; 54 | 55 | // Set layer name to Label.name 56 | myLayer.name = Labels.name; 57 | 58 | // Check if layer index matches Labels.index: 59 | var layerIndex = layer.index; 60 | var labelsIndex = Labels.index; 61 | if (layerIndex === labelsIndex) { 62 | alert('Layer index of ' layerIndex + ' matches the label index of ' + labelsIndex); 63 | } else { 64 | alert('Layer index of ' + layerIndex + ' does not match the label index of ' + labelsIndex); 65 | } 66 | ``` 67 | 68 | ## Themes ## 69 | 70 | Download all themes [here](https://github.com/rendertom/Labels/releases/download/assets/Themes.zip) or pick the one you like from the list below (and save it with extension **.theme**). 71 | 72 | * [David Arbor](https://www.davidarbor.com/) theme [![button](img/theme_david_arbor.png)](Themes/David%20Arbor.theme) 73 | * Generic Color Game Palette v16 CGP by [Arne Niklas Jansson](http://androidarts.com/palette/16pal.htm) [![button](img/theme_generic_16_cgp.png)](Themes/Generic%2016%20CGP.theme) 74 | * Material theme based on [Google Material Design](https://material.io) [![button](img/theme_material.png)](Themes/Material.theme) 75 | * Colection of pastel colors [![button](img/theme_pastel.png)](Themes/Pastel.theme) 76 | * [Paul Conigliaro](http://conigs.com) ( [@Conigs](https://twitter.com/conigs) ) theme [![button](img/theme_paul_conigliaro.png)](Themes/Paul%20Conigliaro.theme) 77 | * Pico-8 Game Console Palette by [Lexaloffle](https://lexaloffle.com/pico-8.php) [![button](img/theme_pico8.png)](Themes/Pico-8.theme) 78 | * [Ryan Summers](http://ryansummers.net) ( [@Oddernod](https://twitter.com/Oddernod) ) theme with custom Label Assignments [![button](img/theme_ryan_summers.png)](Themes/Ryan%20Summers.theme) 79 | * Vivid, almost random colors with bold hues [![button](img/theme_vivid.png)](Themes/Vivid.theme) --------------------------------------------------------------------------------