I usually don't have any problems with my actions, and don't use many camera moves so it's not really an issue, but if I could get to create the CAM layer with only 1 step that would be sweet

Code: Select all
if (documents.length) {
aL = (aD = 'activeDocument') +'.activeLayer', bol = true, arr = []
while(bol) aL += '.parent', String(AL = eval(aL)).slice(1, 9) != 'LayerSet' ? bol = !bol : arr.push(AL.name)
aDl = aD + l = '.layers', n = arr.length - 1, evl = eval(aDl);
(function set() {
for(i = 0; i < evl.length; i++) {
if (evl[i].name == arr[n]) {
aDl += '[i]' + l, n--, aD += l + '[' + i + ']'
if (!n) {
for(j = 0; j < eval('(ARR = ' + aD +'.layers.getByName(arr[0]).layers).length'); j++) {
if (!ARR[j].kind) {bol = true; break} else bol = false
}
}
if (n > -1) set(); break
}
}
})()
L = eval("(aL = activeDocument.activeLayer).kind == 'LayerKind.NORMAL' ?\
((lay = (P = aL.parent).layers).length == 1 ?\
(bol ? 1 : (!n ? 2 : (P.name.slice(0, 1) == 'A' ? 1 : (n < 0 ? 1 : 2)))) :\
(!n ? 2 : (bol ? 1 : (lay[0] == aL ? (arr.length > 1 ? 2 : 1) : 2)))) : 2")
lyr = eval(aD).artLayers.add(), eval('doc.activeHistoryState =\
(hS = (doc = activeDocument).historyStates)[hS.length - L]'), lyr.name = 'CAM'
} else alert('Create/Open at least one document!')