Skip to content

Commit 7a81add

Browse files
author
Nik Ska
committed
Refresh&Cleanup
1 parent 4a5ba8c commit 7a81add

12 files changed

+36
-337
lines changed

README.md

+28-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
This repo has been built over the years as the result of working on [vk.com community on AE expressions and scripts](http://vk.com/ae_exp).
44

5-
Some of these scripts are unfinished or may work not as expected.
6-
But that's the point of education.
5+
The main purpose of the repository is education, so you are free to use these scripts in any way you see fit.
6+
*Some of these scripts are unfinished or may work not as expected.*
77

88
### Contents
99

@@ -14,3 +14,29 @@ But that's the point of education.
1414
+ copyMarkersToComp.jsx – *unfinished* an experiment to transfer markers from a layer to compotion
1515
+ csvreader.jsx – an example of parsing csv file into AE comps
1616
+ debughelper.jsx – *unfinished* an experiment to create a text panel connected to selected properties
17+
+ dropNthFrame.jsx – drops every Nth frame starting from a given
18+
+ enableDisableExpression.jsx – enables, disables or removes all expressions on selected layers
19+
+ filterInput.jsx – snippet to filter edittext input to only numbers
20+
+ getPropertyParent – snippet to get the property parent layer
21+
+ guiTemplate.jsx – just a template for GUI
22+
+ importBoujouTracking.jsx – imports Boujou 2d tracks to AE
23+
+ makeClosest16 – script for making comp size divisible by 16
24+
+ newAdjust.jsx – snippet that lets you name the new Adjustment Layer before it's created
25+
+ newTrimmedNull.jsx – creates a null trimmed to the highest selected layer
26+
+ nicePrecomp.jsx – Experiment to make nice and clean precomps. Works for AE prior to CC, where "adjust precomp to layers"
27+
+ nullsToOne.jsx – snippet for converting a pack of nulls into one
28+
+ openProjectFolder.jsx – Opens Project Folder
29+
+ precompSelected.jsx – snippet to precomp all selected layers into separate comps
30+
+ renderAll.jsx – Script for creating new version of active or selected comps and rendering them with preset templates to the "render" subfolder of a project folder
31+
+ setBounceExpression.jsx – This script is used to set a classic bounce expression to the selected property and link it to slider controls
32+
+ separateBrushes.jsx – snippet to separate brushes into different layers
33+
+ setColor.jsx – *I think it is used to set selected color to one of predefined colors*
34+
+ setExpressionToPaths.jsx – sets one expression to all paths
35+
+ setKeysForPaths.jsx – sets keyframe for all paths in a shape layer
36+
+ setLoop.jsx – snippet for adding a time remap loop for each selected layer
37+
+ setRoundCaps.jsx – Sets all Stroke caps to Round in all shape groups
38+
+ shape-duplicator.jsx – *unfinished* a tool to duplicate shape layer into another group
39+
+ sortByPosition.jsx – snippet used to sort layers depending on their position, left to right
40+
+ textToKeys.jsx – creates hard-coded "typewriter" effect of a Text Layer with keyframes
41+
+ trimFirstToSecond.jsx – trim First Selected layer to the second one
42+
+ upscaleComp.jsx – script is used to rescale composition with all its contents preserving keyframes etc

disableExpressions.jsx

-1
This file was deleted.

dropNthFrame.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Script drops every Nth frame starting from the defined frame
1+
//Script drops every Nth frame starting from a given frame
22

33
var activeItem = app.project.activeItem;
44
if(activeItem != null && activeItem instanceof CompItem){

filterInput.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//snippet to filter edittext input for only numbers for example
1+
//snippet to filter edittext input to only numbers
22

33
edittext.onChanging = function(){
44
preFilter = /[+-]?([0-9\:\.]*)/; //this one does not allow to input anything but numbers and some symbols;

getPropertyParent.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//Just a little function to get the property parent layer
2-
//Nik Ska
1+
//Snippet to get the property parent layer
2+
//Nik Ska, 2013
33

44
function getParentLayer(_property){
55
//recursively gets the parent layer

guiTemplate.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//CC-BY-SA, Nik Ska 2014#script "somescript"var somescript = this; //назови не somescript а как тебе хочетсяsomescript.scriptTitle = "Somescript";somescript.run = function(){ this.buildGUI(this);}somescript.buildGUI = function(thisObj){ thisObj.w = (thisObj instanceof Panel) ? thisObj : new Window("palette", thisObj.scriptTitle, undefined, {resizeable:true}); thisObj.w.alignChildren = ['left', 'top'] var g = thisObj.w.add("group{orientation:'row', alignChildren: ['left', 'top']}"); /* * Поле для цифр */ var timeText = g.add("editText", undefined, "0"); timeText.size = [50, 25]; /* * Кнопка */ var goBttn = g.add("button", undefined, "Go!"); goBttn.onClick = function(){ //callback для кнопки app.beginUndoGroup("name"); //какое-то Undo /* * НЕ ЗАБУДЬ ПРОПИСАТЬ АРГУМЕНТЫ ЕСЛИ ОНИ ЕСТЬ */ thisObj.runThisShit(); app.endUndoGroup(); }; timeText.onChanging = function(){ //эта херня делает так что вводятся только цифры preFilter = /(\d*)/; this.text = this.text.match(preFilter)[0]; } if (thisObj.w instanceof Window){ thisObj.w.center(); thisObj.w.show(); } else thisObj.w.layout.layout(true);}somescript.runThisShit = function(){ //ТУТ ТВОЯ ОСНОВНАЯ ФУНКЦИЯ}somescript.run()
1+
//Just a template for GUI//CC-BY-SA, Nik Ska 2014#script "somescript"var somescript = this; //назови не somescript а как тебе хочетсяsomescript.scriptTitle = "Somescript";somescript.run = function(){ this.buildGUI(this);}somescript.buildGUI = function(thisObj){ thisObj.w = (thisObj instanceof Panel) ? thisObj : new Window("palette", thisObj.scriptTitle, undefined, {resizeable:true}); thisObj.w.alignChildren = ['left', 'top'] var g = thisObj.w.add("group{orientation:'row', alignChildren: ['left', 'top']}"); /* * Поле для цифр */ var timeText = g.add("editText", undefined, "0"); timeText.size = [50, 25]; /* * Кнопка */ var goBttn = g.add("button", undefined, "Go!"); goBttn.onClick = function(){ //callback для кнопки app.beginUndoGroup("name"); //какое-то Undo /* * НЕ ЗАБУДЬ ПРОПИСАТЬ АРГУМЕНТЫ ЕСЛИ ОНИ ЕСТЬ */ thisObj.runThisShit(); app.endUndoGroup(); }; timeText.onChanging = function(){ //эта херня делает так что вводятся только цифры preFilter = /(\d*)/; this.text = this.text.match(preFilter)[0]; } if (thisObj.w instanceof Window){ thisObj.w.center(); thisObj.w.show(); } else thisObj.w.layout.layout(true);}somescript.runThisShit = function(){ //ТУТ ТВОЯ ОСНОВНАЯ ФУНКЦИЯ}somescript.run()

longShadow.jsx

-1
This file was deleted.

planeResolve.jsx

-5
This file was deleted.

precompSelected.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
//Small snippet to precomp all selected layers into different comps//CC-BY, Nik Ska, 2014var precompSelected = this;precompSelected.go = function(_moveAllAttributes){ var activeComp = app.project.activeItem; if(activeComp && activeComp instanceof CompItem){ var sel = activeComp.selectedLayers; if(sel){ app.beginUndoGroup("Batch Precomp"); //sort selection by index sel = sel.sort(function(a,b){ return (b.index - a.index) }); for(var s = sel.length-1; s>=0; s--){ //check for Text of Shape layers if(sel[s] instanceof ShapeLayer || sel[s] instanceof TextLayer) move = true; else move = _moveAllAttributes; var p = activeComp.layers.precompose([sel[s].index], sel[s].name+"_precomp", move); p.parentFolder = activeComp.parentFolder; } app.endUndoGroup(); } }}precompSelected.go(false)
1+
//Snippet to precomp all selected layers into separate comps//CC-BY, Nik Ska, 2014var precompSelected = this;precompSelected.go = function(_moveAllAttributes){ var activeComp = app.project.activeItem; if(activeComp && activeComp instanceof CompItem){ var sel = activeComp.selectedLayers; if(sel){ app.beginUndoGroup("Batch Precomp"); //sort selection by index sel = sel.sort(function(a,b){ return (b.index - a.index) }); for(var s = sel.length-1; s>=0; s--){ //check for Text of Shape layers if(sel[s] instanceof ShapeLayer || sel[s] instanceof TextLayer) move = true; else move = _moveAllAttributes; var p = activeComp.layers.precompose([sel[s].index], sel[s].name+"_precomp", move); p.parentFolder = activeComp.parentFolder; } app.endUndoGroup(); } }}precompSelected.go(false)

renderAll.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//Script for creating new version of active or se;ected comps
1+
//Script for creating new version of active or selected comps
22
//and rendering them with preset templates
33
//to the "render" subfolder of a project folder
44

0 commit comments

Comments
 (0)