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
| // Selects all Unparented Layers | |
| var layers = app.project.activeItem.layers; | |
| var num = app.project.activeItem.layers.length; | |
| for(var i = 0; i < num;i++){ | |
| var layer = layers[i+1]; | |
| layer.parent === null ? layer.selected = true: null; | |
| } |
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
| // Resets All Position Values to 0 | |
| app.beginUndoGroup('Reset 0'); | |
| var selectedLayers = app.project.activeItem.selectedLayers; | |
| for (var i = 0; i < selectedLayers.length; i++) { | |
| var layer = selectedLayers[i]; | |
| var is3D = layer.threeDLayer; | |
| if(layer.transform.position.canSetExpression){ | |
| layer.transform.position.setValue([0,0,0]); | |
| }else{ | |
| layer.transform.xPosition.setValue(0); |
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
| // Inverts selected layers in the Active Comp | |
| var active = app.project.activeItem; | |
| if (active && active instanceof CompItem) { | |
| var layerLen = active.layers.length; | |
| for (var i = 1; i < layerLen + 1; i++) | |
| active.layers[i].selected = active.layers[i].selected === 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
| // Resets Position, Scale, and Rotation on selected 2D or 3D Layers | |
| app.beginUndoGroup('Reset PSR'); | |
| var selectedLayers = app.project.activeItem.selectedLayers; | |
| for (var i = 0; i < selectedLayers.length; i++) { | |
| var layer = selectedLayers[i]; | |
| var center = [Math.round(app.project.activeItem.width / 2), Math.round(app.project.activeItem.height / 2), 0] | |
| var is3D = layer.threeDLayer; | |
| if(layer.transform.position.canSetExpression){ | |
| layer.transform.position.setValue(center); |
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
| var sequence = app.project.activeSequence, trackGroups = [sequence.audioTracks, sequence.videoTracks], items = []; | |
| for (i = 0; i < trackGroups.length; i++) { | |
| var trackCount = trackGroups[i].numTracks; | |
| for (j = 0; j < trackCount; j++) { | |
| var clipCount = trackGroups[i][j].clips.numItems; | |
| for (k = 0; k < clipCount; k++) | |
| trackGroups[i][j].clips[k].setSelected(!1 === trackGroups[i][j].clips[k].isSelected()); | |
| } | |
| } |
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
| // Premiere Pro CC2018 and later | |
| for (var selection, viewIDs = app.getProjectViewIDs(), i = 0; i < viewIDs.length; i++) | |
| if (app.getProjectFromViewID(viewIDs[i]).name == app.project.name) { | |
| selection = app.getProjectViewSelection(viewIDs[i]); | |
| break | |
| } | |
| for (i = 0; i < selection.length;i++){ | |
| var item = selection[i]; | |
| item.videoComponents[0].properties[25].setValue(1); // set to REDgamma3 | |
| // item.videoComponents[0].properties[25].setValue(4); // set to REDlogFilm |
NewerOlder