This file contains 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
for (var i=1; i < app.project.activeItem.numLayers; i++) { | |
if (app.project.activeItem.layer(i).shy) app.project.activeItem.layer(i).locked = true; | |
} |
This file contains 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
separatePositionOfSelectedLayers(); | |
function separatePositionOfSelectedLayers () { | |
if ( !(app.project.activeItem instanceof CompItem) || app.project.activeItem.selectedLayers.length == 0) { | |
alert("Please select some layers"); | |
return; | |
} | |
for (var i=0; i < app.project.activeItem.selectedLayers.length; i++) { | |
var myLayer = app.project.activeItem.selectedLayers[i]; | |
if (myLayer.transform.position.isSeparationLeader) myLayer.transform.position.dimensionsSeparated = true; | |
} |
This file contains 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 reduceAndKeepFolders () { | |
app.beginUndoGroup("Reduce & Keep Folders"); | |
if (app.project.selection.length == 0) { | |
alert("Please select at least one item to keep"); | |
return; | |
} | |
var projFolders = []; | |
for (var i=1; i<=app.project.numItems; i++) { |
This file contains 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
if (app.project.activeItem instanceof CompItem) { | |
var myCam; | |
if (app.project.activeItem.activeCamera instanceof CameraLayer) | |
myCam = app.project.activeItem.activeCamera; | |
else | |
myCam = app.project.activeItem.layers.addCamera("Target Camera", [app.project.activeItem.width/2,app.project.activeItem.height/2]); | |
var myNull = app.project.activeItem.layers.addNull(); | |
myNull.name = "Target"; | |
myCam.cameraOption.focusDistance.expression = "target = thisComp.layer(\"Target\");\nv1 = target.toWorld(target.anchorPoint) - toWorld([0,0,0]);\nv2 = toWorldVec([0,0,1]);\ndot(v1,v2);"; | |
} else { |
This file contains 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
//Select the layers to be parented. The first selected layer will be the parent. | |
2 | |
3 app.beginUndoGroup("Parent Selected Layers"); | |
4 | |
5 if (app.project.activeItem.selectedLayers.length > 1){ | |
6 | |
7 var parent = app.project.activeItem.selectedLayers[0]; | |
8 for (var i = 1; i < app.project.activeItem.selectedLayers.length; i++){ | |
9 app.project.activeItem.selectedLayers[i].parent = parent; | |
10 } |
This file contains 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
try { | |
var a = app.project.activeItem.selectedProperties; | |
if (c=prompt("How many copies?",10)) { | |
app.beginUndoGroup ("Prop Duplicator"); | |
propDuplicate(a[0],c); | |
app.endUndoGroup(); | |
} | |
function propDuplicate (prop,num) { | |
var b = prop.duplicate(); | |
if (num > 1) { |
This file contains 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
try{ | |
for (var i=0; i < app.project.selection.length; i++) { | |
app.project.selection[i].name = app.project.selection[i].name.toUpperCase(); | |
} | |
} | |
catch (e) { | |
alert (e); | |
} |
This file contains 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
try{ | |
for (var i=0;i<app.project.activeItem.selectedLayers.length;i++) | |
if (app.project.activeItem.selectedLayers[i].canSetCollapseTransformation) | |
app.project.activeItem.selectedLayers[i].collapseTransformation = !(app.project.activeItem.selectedLayers[i].collapseTransformation); | |
} | |
catch (e) { | |
alert (e); | |
} |
This file contains 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
try{ | |
var adjLayer = app.project.activeItem.layers.addSolid([0,0,0], "Adjustment Layer", app.project.activeItem.width, app.project.activeItem.height, app.project.activeItem.pixelAspect, app.project.activeItem.duration); | |
adjLayer.adjustmentLayer = true; | |
adjLayer.effect.addProperty("Curves"); | |
} | |
catch (e) { | |
alert (e); | |
} |
This file contains 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.purge(PurgeTarget.ALL_CACHES); |
OlderNewer