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 setDelta(e) { | |
//Работает только для одометра | |
function setYesterDate(sheet, row, col){ | |
//выставляет вчерашнюю дату | |
var MILLIS_PER_DAY = 1000 * 60 * 60 * 24; | |
var dateCell = col + String(row); | |
var today = new Date(); | |
var yesterday = new Date(today.getTime() - MILLIS_PER_DAY); |
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
// Photoshop Script to Create iPhone Icons from iTunesArtwork | |
// | |
// WARNING!!! In the rare case that there are name collisions, this script will | |
// overwrite (delete perminently) files in the same folder in which the selected | |
// iTunesArtwork file is located. Therefore, to be safe, before running the | |
// script, it's best to make sure the selected iTuensArtwork file is the only | |
// file in its containing folder. | |
// | |
// Copyright (c) 2010 Matt Di Pasquale | |
// Added tweaks Copyright (c) 2012 by Josh Jones http://www.appsbynight.com |
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
n = 0; | |
if (marker.numKeys > 0){ | |
n = marker.nearestKey(time).index; | |
if (marker.key(n).time > time) n--; //проверка | |
} | |
if(n>0){ | |
try{ | |
t = time-marker.key(n).time; //время прошедшее с маркера | |
thisProperty.valueAtTime(t+thisProperty.key(1).time); |
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
//Remove every second keyframe for selected property | |
var start = 0; //Start with 0 or 1 | |
var activeComp = app.project.activeItem; | |
if(activeComp && activeComp instanceof CompItem){ | |
var sel = activeComp.selectedProperties; | |
if(sel.length > 0){ | |
app.beginUndoGroup("Remove every 2nd"); | |
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
var a = [1,2,3] | |
var b = [1,2,3] | |
Array.prototype["=="] = function(operand){ | |
for(var i = 0; i < this.length; i++){ | |
if(this[i] != operand[i]) return false; | |
} | |
return 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
for(var i = 1; i < app.project.items.length; i++){ | |
app.beginUndoGroup("Unparent All"); | |
if(app.project.items[i] instanceof CompItem){ | |
unParentComp(app.project.items[i]) | |
} | |
app.endUndoGroup(); | |
} | |
function unParentComp(_comp){ |
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
n = 0; | |
t = 0; | |
if (thisProperty.numKeys > 0){ | |
n = thisProperty.nearestKey(time).index; | |
if (thisProperty.key(n).time > time) n--; | |
} | |
if(n < thisProperty.numKeys){ | |
linear(time, thisProperty.key(n).time, thisProperty.key(n+1).time, thisProperty.key(n).value, thisProperty.key(n+1).value) | |
} |
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
/* | |
Скрипт создает шейп, проходящий через position всех выбранных слоев | |
Не будет работать, если: | |
-слои прикреплены к другим слоям | |
-на позиции есть ключевые кадры/выражения | |
-Все в 3д и есть камеры | |
Все эти пункты легко исправляются по необходимости | |
Nik Ska, 2015 |
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
findCompByName=function(_name){ | |
for(var i=1;i<=app.project.numItems;i++) | |
{ | |
var curItem=app.project.item(i); | |
if (curItem.name==_name && curItem instanceof CompItem) return curItem; | |
} | |
return null; | |
} |
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
var audioSource = thisComp.layer("Audio Amplitude").effect("Both Channels")("Slider"); | |
var step = 1; // step in frames | |
var accum = 0; | |
if(audioSource.numKeys > 0){ | |
var k = 0; | |
if(time >= step*2){ |
NewerOlder