This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function dropDisable () { | |
| window.addEventListener('dragover', function (e) { | |
| e.preventDefault(); | |
| }, false); | |
| window.addEventListener('drop', function (e) { | |
| e.preventDefault(); | |
| }, false); | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Loop through keyframes and remove all gaps | |
| if(!app.project.activeItem instanceof CompItem){ | |
| alert('Please Select a Comp'); | |
| } | |
| else if(!app.project.activeItem.selectedProperties[0]){ | |
| alert('Please Select at least one Property with Keyframes'); | |
| }else{ | |
| var comp = app.project.activeItem; | |
| var keyedProps = app.project.activeItem.selectedProperties; | |
| for (var i = 0; i < keyedProps.length; i++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Creates a Null named \Master\ colored Orange | |
| // And parents all unparented layers to it | |
| app.beginUndoGroup('Create Master Null'); | |
| try { | |
| function forEachLayer(comp, callback) { | |
| var layers = comp.layers; | |
| var len = layers.length; | |
| for (var i = 0; i < len; i++) { | |
| if (callback(layers[i + 1]) === false) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function setPropByName(clip, effectName, propName, value) { | |
| var effect; | |
| var prop; | |
| for (var i = 0; i < clip.components.length; i++) { | |
| var component = clip.components[i]; | |
| if (component.displayName === effectName) { | |
| effect = component; | |
| } | |
| } | |
| if (component) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| app.enableQE(); | |
| var clip = qe.project.getActiveSequence().getVideoTrackAt(0).getItemAt(0); | |
| var effect = qe.project.getVideoEffectByName("Track Matte Key"); | |
| clip.addVideoEffect(effect); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const os = require('os'); | |
| const fs = require('fs'); | |
| const execSync = require('child_process').execSync; | |
| const debugSwitch = state => { | |
| let csxsFiles = []; | |
| if (os.platform() == 'win32') { | |
| const qStr = 'REG QUERY HKEY_CURRENT_USER\\Software\\Adobe\\'; | |
| const stdout = execSync(qStr, { encoding: 'utf8' }); | |
| const entries = stdout.split(/\r|\n/); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Node.js script to change proxy audio after rendering to match source audio in Premiere Pro | |
| const execSync = require('child_process').execSync; | |
| const path = require('path'); | |
| const fs = require('fs'); | |
| const src = '/path/to/source/folder; | |
| const dst = '../'; | |
| const generateCmd = (fileName, outFile, channelType, channelCount) => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const keyRegisterOverride = () => { | |
| const platform = navigator.platform.substring(0, 3); | |
| let maxKey; | |
| if (platform === 'Mac') | |
| maxKey = 126; // Mac Max Key Code | |
| else if (platform === 'Win') | |
| maxKey = 222; // HTML Max Key Code | |
| let allKeys = []; | |
| for (let k = 0; k <= maxKey; k++) { | |
| for (let j = 0; j <= 15; j++) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const getCmdIds = datFile => { | |
| return new Promise(resolve => { | |
| const stream = require('stream'); | |
| const fs = require('fs'); | |
| const readline = require('readline'); | |
| const instream = fs.createReadStream(datFile, 'utf16le'); | |
| const outstream = new stream(); | |
| const rl = readline.createInterface(instream, outstream); | |
| let menuIDs = {}; | |
| rl.on('line', line => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Sets a Motion Graphics Template property | |
| var clip = app.project.activeSequence.videoTracks[4].clips[0]; | |
| var mgt = clip.getMGTComponent(); | |
| var prop = mgt.properties.getParamForDisplayName("Small Text"); | |
| prop.setValue('test'); |