-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathIncrease_All_Pin_Sizes.jsx
58 lines (53 loc) · 1.85 KB
/
Increase_All_Pin_Sizes.jsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/**
* @name Increase All Pin Sizes
* @version 1.0
* @author Kyle Martinez <www.kyle-martinez.com>
*
* @description Increase the scale of all DuIK Pin layers in the current project.
*
* @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.
*
* I'm just trying to help make life as an After Effects animator a little easier.
*/
(function increaseAllPinSizes() {
function fixPin(effect, size) {
effect.property(2).setValue(size);
}
function iterateThroughEffects(layer, size) {
var effects = layer.property("ADBE Effect Parade");
var numEffects = effects.numProperties;
if (numEffects !== 0) {
for (var e = 1; e <= numEffects; e++) {
var effect = effects.property(e);
if (effect.matchName === "Pseudo/Duik pin02") {
fixPin(effect, size);
}
}
}
}
function iterateThroughLayers(comp, size) {
var layers = comp.layers;
for (var l = comp.numLayers; l > 0; l--) {
var layer = layers[l];
iterateThroughEffects(layer, size);
}
}
app.beginUndoGroup("Increase Pin Size");
var newSizeString = prompt("Size (Percent)", "100");
if (newSizeString !== null && newSizeString.length > 0) {
var size = parseInt(newSizeString, 10);
if (isNaN(size) === false) {
var project = app.project;
var items = project.items;
for (var i = project.numItems; i > 0; i--) {
var item = items[i];
if (item instanceof CompItem) {
iterateThroughLayers(item, size);
}
}
}
}
app.endUndoGroup();
})();