Skip to content

Instantly share code, notes, and snippets.

@eeropic
Last active June 12, 2024 10:23
Show Gist options
  • Select an option

  • Save eeropic/eea5c38887178b1756d99da453e4977f to your computer and use it in GitHub Desktop.

Select an option

Save eeropic/eea5c38887178b1756d99da453e4977f to your computer and use it in GitHub Desktop.

Revisions

  1. eeropic revised this gist Apr 23, 2018. 1 changed file with 6 additions and 1 deletion.
    7 changes: 6 additions & 1 deletion vector smear motion path.js
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,11 @@
    //Create "vector smear" for a single point motion path expression by @eeropic
    //Apply to a shape "Path" property

    //You need 2 layers
    //1. A layer with keyframed motion (preferably a circle)
    //2. A shape layer below with a stroked vector path with this expression applied
    //to the "Path" property
    var pts=[], inTangents=[],outTangents=[];
    //Reference to the layer with keyframed motion, currently pointing to the layer above
    var ref=thisComp.layer(index-1);
    var averageSpeed=0;
    for(var i=0;i<5;i++){
  2. eeropic revised this gist Apr 22, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion vector smear motion path.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    //Create "vector smear" motion path expression by @eeropic
    //Create "vector smear" for a single point motion path expression by @eeropic
    //Apply to a shape "Path" property
    var pts=[], inTangents=[],outTangents=[];
    var ref=thisComp.layer(index-1);
  3. eeropic revised this gist Apr 22, 2018. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions vector smear motion path.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    //reference layer
    //Create "vector smear" motion path expression by @eeropic
    //Apply to a shape "Path" property
    var pts=[], inTangents=[],outTangents=[];
    var ref=thisComp.layer(index-1);
    var averageSpeed=0;
    for(var i=0;i<5;i++){
    @@ -7,7 +9,6 @@ for(var i=0;i<5;i++){
    averageSpeed=averageSpeed/5;
    var spd=Math.max(1,averageSpeed/180);

    var pts=[], inTangents=[],outTangents=[];
    for(var i=-spd/2;i<spd/2;i++){
    timePos=time-i/120;
    pts.push(ref.position.valueAtTime(timePos));
  4. eeropic revised this gist Apr 22, 2018. 1 changed file with 19 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions vector smear motion path.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    //reference layer
    var ref=thisComp.layer(index-1);
    var averageSpeed=0;
    for(var i=0;i<5;i++){
    averageSpeed+=ref.position.speedAtTime(time+framesToTime(i-2));
    }
    averageSpeed=averageSpeed/5;
    var spd=Math.max(1,averageSpeed/180);

    var pts=[], inTangents=[],outTangents=[];
    for(var i=-spd/2;i<spd/2;i++){
    timePos=time-i/120;
    pts.push(ref.position.valueAtTime(timePos));
    var inTangent=div(ref.position.velocityAtTime(timePos),360);
    var outTangent=mul(inTangent,-1);
    inTangents.push(inTangent);
    outTangents.push(outTangent);
    }
    createPath(pts,inTangents,outTangents,false);
  5. eeropic revised this gist Apr 19, 2018. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions StaggerShapePoints.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,5 @@
    //Stagger mask or shape layer path points expression by @eeropic
    //Apply to a mask or shape "Path" property
    var len=points().length;
    var pointDelay=framesToTime(2);
    var newPoints=[], newInTangents=[], newOutTangents=[];
  6. eeropic revised this gist Apr 18, 2018. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions Ae expressions and scripts.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,6 @@
    //dynamic parenting for 3d layers
    //from Dan Ebberts on forums I think..

    //Position
    L=thisComp.layer("Object center");
    L.toWorld(L.effect(name)("3D Point"));
  7. eeropic revised this gist Apr 18, 2018. No changes.
  8. eeropic revised this gist Apr 17, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion StaggerShapePoints.js
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    //Stagger shape layer points expression by @eeropic
    //Stagger mask or shape layer path points expression by @eeropic
    var len=points().length;
    var pointDelay=framesToTime(2);
    var newPoints=[], newInTangents=[], newOutTangents=[];
  9. eeropic revised this gist Apr 17, 2018. 2 changed files with 14 additions and 1 deletion.
    13 changes: 13 additions & 0 deletions StaggerShapePoints.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    //Stagger shape layer points expression by @eeropic
    var len=points().length;
    var pointDelay=framesToTime(2);
    var newPoints=[], newInTangents=[], newOutTangents=[];
    for(var i=0;i<len;i++){
    //increase index count in both directions from first vertex
    var pointIndex = ( len / 2 ) - Math.abs( i - ( len/2 ) );
    var staggerTime = time - pointDelay * pointIndex;
    newPoints.push( points( staggerTime )[i] );
    newInTangents.push( inTangents( staggerTime )[i] );
    newOutTangents.push( outTangents( staggerTime )[i] );
    }
    createPath(newPoints,newInTangents,newOutTangents,true)
    2 changes: 1 addition & 1 deletion apply pseudo effect as animation preset.jsx
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    from tomas sinkunas
    //from tomas sinkunas

    // Apply Pseudo Effect as Animation Preset
    // By Tomas Sinkunas (www.rendertom)
  10. eeropic revised this gist Jan 8, 2018. 1 changed file with 121 additions and 0 deletions.
    121 changes: 121 additions & 0 deletions apply pseudo effect as animation preset.jsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,121 @@
    from tomas sinkunas

    // Apply Pseudo Effect as Animation Preset
    // By Tomas Sinkunas (www.rendertom)

    /*
    Script applies Pseudo Effect as Animation preset, eliminating the need for the end user to install Pseudo Effect to XML and restart AE.
    How to make it work:
    1. Install Pseudo Effect on your machine.
    2. Apply Pseudo Effect to a layer and export it as Animation Preset. Animation Presets are not backwards compatible, so use as lowest AE version as you can.
    3. Convert exported FFX file to binary string and paste it to myPseudoEffect.presetBinary property.
    4. Done. Your clients dont need to install Pseudo Effect as it will be applied ad Animation Preset. Enjoy.
    */

    myAwesomeScript();
    function myAwesomeScript() {

    // Define your Pseudo Effect here
    var myPseudoEffect = {
    matchName : null,
    presetName : "Scribe.ffx",
    presetBinary: ["RIFX\x00\x00\x11\u00D4FaFXhead\x00\x00\x00\x10\x00\x00\x00\x03\x00\x00\x00Q\x00\x00\x00\b\x00theLIST\x00\x00\x11\u00B0bescbeso\x00\x00\x008\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00`\x00\x00\x18\x00\x00\x00\x00\x00\x04\x00\x01\x00\x01\x07\u0080\x048?\u00F0\x00\x00\x00\x00\x00\x00@$\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u00FF\u00FF\u00FF\u00FFLIST\x00\x00\x00\u00ACtdsptdot\x00\x00\x00\x04\u00FF\u00FF\u00FF\u00FFtdpl\x00\x00\x00\x04\x00\x00\x00\x02LIST\x00\x00\x00@tdsitdix\x00\x00\x00\x04\u00FF\u00FF\u00FF\u00FFtdmn\x00\x00\x00(ADBE Effect Parade\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00@tdsitdix\x00\x00\x00\x04\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdsn\x00\x00\x00\x07Scribe\x00\x00LIST\x00\x00\x00dtdsptdot\x00\x00\x00\x04\u00FF\u00FF\u00FF\u00FFtdpl\x00\x00\x00\x04\x00\x00\x00\x01LIST\x00\x00\x00@tdsitdix\x00\x00\x00\x04\u00FF\u00FF\u00FF\u00FFtdmn\x00\x00\x00(ADBE End of path sentinel\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x104sspcfnam\x00\x00\x000Scribe\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x06pparTparn\x00\x00\x00\x04\x00\x00\x00\btdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0000\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00sitd\u00DE\b_\u00BF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u00FF\u00FF\u00FF\u00FF\u00FF\x7F\x00\x00\\\u0090\u00D3\u0089\u00FF\x7F\x00\x00ww\u00BF_tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x05Color\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\u00FF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00sitd\u00DE\b_\u00BF\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u00FF\u00FF\u00FF\u00FF\u00FF\x7F\x00\x00\\\u0090\u00D3\u0089\u00FF\x7F\x00\x00ww\u00BF_tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\nThickness\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Dz\x00\x00\x00\x00\x00\x00B\u00C8\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00ww\u00BF_tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\rTrim\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\"\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0004\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\nStart\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u0080\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u0080\x00\x00\x00B\u00C8\x00\x00\x00\x00\x00\x00B\u00C8\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0005\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\nEnd\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@Y\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00B\u00C8\x00\x00\x00\x00\x00\x00B\u00C8\x00\x00B\u00C8\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0006\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\nOffset\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u00C4z\x00\x00Dz\x00\x00\u00C2\u00C8\x00\x00B\u00C8\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0007\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pard\x00\x00\x00\u0094\x00\x00\x00\x00\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00\x0E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\t`tdgptdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\x07Scribe\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0000\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00\u00DAtdbstdsb\x00\x00\x00\x04\x00\x00\x00\x03tdsn\x00\x00\x00\x01\x00\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x01\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x04\x04\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u0080\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdpi\x00\x00\x00\x04\x00\x00\x00&tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0001\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x01\ntdbstdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\x06Color\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x04\x00\x07\x00\x01\x00\x02\u00FF\u00FF\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00`@o\u00E0\x00\x00\x00\x00\x00@o\u00E0\x00\x00\x00\x00\x00@o\u00E0\x00\x00\x00\x00\x00@o\u00E0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0002\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00\u00F6tdbstdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\nThickness\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x01\x00\x01\x00\x00\u00FF\u00FF\u00FF\u00FF\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\b\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdum\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00\x00tduM\x00\x00\x00\b@Y\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0003\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00\u00D2tdbstdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\x05Trim\x00\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x01\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\b\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u0080\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0004\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00\u00F2tdbstdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\x06Start\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x01\x00\x01\x00\x00\u00FF\u00FF\u00FF\u00FF\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\b\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00(\u0080\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdum\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00\x00tduM\x00\x00\x00\b@Y\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0005\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00\u00F0tdbstdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\x04End\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x01\x00\x01\x00\x00\u00FF\u00FF\u00FF\u00FF\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\b\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00(@Y\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdum\x00\x00\x00\b\x00\x00\x00\x00\x00\x00\x00\x00tduM\x00\x00\x00\b@Y\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0006\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00\u00F4tdbstdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\x07Offset\x00\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x01\x00\x01\x00\x00\u00FF\u00FF\u00FF\u00FF\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\b\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdum\x00\x00\x00\b\u00C0Y\x00\x00\x00\x00\x00\x00tduM\x00\x00\x00\b@Y\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(Pseudo/9db0uID/Scribe-0007\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00LIST\x00\x00\x00\u00CEtdbstdsb\x00\x00\x00\x04\x00\x00\x00\x01tdsn\x00\x00\x00\x01\x00\x00tdb4\x00\x00\x00|\u00DB\u0099\x00\x01\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00`\x00?\x1A6\u00E2\u00EB\x1CC-?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00?\u00F0\x00\x00\x00\x00\x00\x00\x00\x00\x00\b\t\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\u0080\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00cdat\x00\x00\x00(\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00tdmn\x00\x00\x00(ADBE Group End\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00pgui\x00\x00\x00\x10\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00<?xpacket begin=\"\u00EF\u00BB\u00BF\" id=\"W5M0MpCehiHzreSzNTczkc9d\"?>\n<x:xmpmeta xmlns:x=\"adobe:ns:meta/\" x:xmptk=\"Adobe XMP Core 5.3-c011 66.146227, 2012/04/10-09:44:09 \">\n <rdf:RDF xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n <rdf:Description rdf:about=\"\"\n xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n <dc:format>application/vnd.adobe.aftereffects.preset-animation</dc:format>\n </rdf:Description>\n <rdf:Description rdf:about=\"\"\n xmlns:xmp=\"http://ns.adobe.com/xap/1.0/\">\n <xmp:CreatorTool>Adobe After Effects CS6 (Macintosh)</xmp:CreatorTool>\n <xmp:CreateDate>2016-07-16T23:22:44+03:00</xmp:CreateDate>\n <xmp:MetadataDate>2016-07-16T23:22:44+03:00</xmp:MetadataDate>\n <xmp:ModifyDate>2016-07-16T23:22:44+03:00</xmp:ModifyDate>\n </rdf:Description>\n <rdf:Description rdf:about=\"\"\n xmlns:xmpMM=\"http://ns.adobe.com/xap/1.0/mm/\"\n xmlns:stEvt=\"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#\">\n <xmpMM:InstanceID>xmp.iid:02801174072068118A6DD39CD982CFC0</xmpMM:InstanceID>\n <xmpMM:DocumentID>xmp.did:02801174072068118A6DD39CD982CFC0</xmpMM:DocumentID>\n <xmpMM:OriginalDocumentID>xmp.did:02801174072068118A6DD39CD982CFC0</xmpMM:OriginalDocumentID>\n <xmpMM:History>\n <rdf:Seq>\n <rdf:li rdf:parseType=\"Resource\">\n <stEvt:action>created</stEvt:action>\n <stEvt:instanceID>xmp.iid:02801174072068118A6DD39CD982CFC0</stEvt:instanceID>\n <stEvt:when>2016-07-16T23:22:44+03:00</stEvt:when>\n <stEvt:softwareAgent>Adobe After Effects CS6 (Macintosh)</stEvt:softwareAgent>\n </rdf:li>\n </rdf:Seq>\n </xmpMM:History>\n </rdf:Description>\n </rdf:RDF>\n</x:xmpmeta>\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n<?xpacket end=\"w\"?>"]
    }




    var myComp = app.project.activeItem;
    if (!myComp || !(myComp instanceof CompItem)) {
    myComp = app.project.items.addComp("My Comp", 1920, 1080, 1, 10, 24);
    myComp.openInViewer();
    }

    var myLayer = myComp.selectedLayers[0];
    if (!myLayer)
    myLayer = myComp.layers.addSolid([0,0,0], "My Layer", myComp.width, myComp.height, 1);

    var effectsProp = myLayer.property("ADBE Effect Parade");




    // APPLY PSEUDO EFFECT
    if (effectsProp.canAddProperty(myPseudoEffect.matchName)) {
    effectsProp.addProperty(myPseudoEffect.matchName);
    } else {
    applyPseudoEffect(myPseudoEffect, effectsProp);
    }



    ///// HELPER FUNCTIONS /////
    function applyPseudoEffect(myPseudoEffect, effectsProp) {
    var userDataFolder = getUserDataFolder();
    var animationPreset = createResourceFile(myPseudoEffect.presetName, myPseudoEffect.presetBinary, userDataFolder);

    var masterLayer = effectsProp.parentProperty;
    var curentComp = masterLayer.containingComp;

    var tempSolid = curentComp.layers.addSolid([0,0,0], "Temp Solid", 10, 10, 1);
    var tempSolidSource = tempSolid.source;
    var tempSolidFolder = tempSolidSource.parentFolder;

    tempSolid.applyPreset(File(animationPreset));
    myPseudoEffect.matchName = tempSolid.property("ADBE Effect Parade").property(1).matchName;

    masterLayer.selected = true;
    effectsProp.addProperty(myPseudoEffect.matchName);

    tempSolidSource.remove();
    if (tempSolidFolder.numItems === 0) tempSolidFolder.remove();
    }

    function getUserDataFolder() {
    try {
    var userDataFolder = Folder.userData;
    var aescriptsFolder = Folder(userDataFolder.toString() + "/Aescripts/test/");
    if (!aescriptsFolder.exists) {
    var checkFolder = aescriptsFolder.create();
    if (!checkFolder) {
    alert ("Error creating \"" + checkFolder.fsName + "\nPlease check the permissions for this folder:\n" + userDataFolder + "\n\nA temp folder will be used instead");
    aescriptsFolder = Folder.temp;
    }
    }
    return aescriptsFolder.toString();
    } catch(err) {
    alert("Permissions issue with user data folder\nPlease give AE full read and write permissions to the ~/Library/Application Support/Aescripts/test folder.");
    }
    }

    function createResourceFile (filename, binaryString, resourceFolder) {
    try {
    var myFile = new File(resourceFolder + "/" + filename);
    if (!File(myFile).exists) {
    if (!(isSecurityPrefSet())) {
    alert ("This script requires access to write files.\n" +
    "Go to the \"General\" panel of the application preferences and make sure\n" +
    "\"Allow Scripts to Write Files and Access Network\" is checked.");
    app.executeCommand(2359);
    if (!isSecurityPrefSet()) return null;
    }
    myFile.encoding = "BINARY";
    myFile.open( "w" );
    myFile.write( binaryString );
    myFile.close();
    }
    return myFile;
    } catch(err){
    alert("Error in createResourceFile function\n" + err.toString());
    }
    }

    function isSecurityPrefSet(){
    try {
    var securitySetting = app.preferences.getPrefAsLong("Main Pref Section", "Pref_SCRIPTING_FILE_NETWORK_SECURITY");
    return (securitySetting == 1);
    } catch(err){
    alert("Error in isSecurityPrefSet function\n" + err.toString());
    }
    }
    }
  11. eeropic revised this gist Jan 8, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion path length.jsx
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    from Paul Conigliaro
    //from Paul Conigliaro

    /********************************
  12. eeropic revised this gist Jan 8, 2018. 2 changed files with 31 additions and 0 deletions.
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,4 @@
    //dynamic parenting for 3d layers
    //Position
    L=thisComp.layer("Object center");
    L.toWorld(L.effect(name)("3D Point"));
    30 changes: 30 additions & 0 deletions shape distort along path.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,30 @@
    //from Satoru Yonekura

    dist = effect(“Offset”)(“Slider”); // Position on path.
    w = effect(“Width”)(“Slider”); // Normal direction width.

    restpath = thisProperty;
    targetpath = thisComp.layer(“Path”).content(“Shape 1).content(“Path 1).path; // Target Path
    refpt = restpath.points();
    refintan = restpath.inTangents();
    refouttan = restpath.outTangents();
    points =[];
    intangents = [];
    outtangents = [];

    for(i=0; i<refpt.length; i++){
    rest = refpt[i];
    f = dist + rest[0] / thisComp.width;
    pathpoint = targetpath.pointOnPath(f);
    pathnormal = targetpath.normalOnPath(f);
    angle = Math.atan2(-pathnormal[0], pathnormal[1]);
    intanx = refintan[i][0] * Math.cos(angle) refintan[i][1] * Math.sin(angle);
    intany = refintan[i][0] * Math.sin(angle) + refintan[i][1] * Math.cos(angle);
    outtanx = refouttan[i][0] * Math.cos(angle) refouttan[i][1] * Math.sin(angle);
    outtany = refouttan[i][0] * Math.sin(angle) + refouttan[i][1] * Math.cos(angle);
    points.push( pathpoint + pathnormal * rest[1] *w);
    intangents.push( [intanx, intany * w] );
    outtangents.push( [ outtanx, outtany * w] );
    }

    createPath(points, intangents, outtangents);
  13. eeropic revised this gist Jan 8, 2018. 1 changed file with 75 additions and 0 deletions.
    75 changes: 75 additions & 0 deletions path length.jsx
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,75 @@
    from Paul Conigliaro

    /********************************
    Path Length
    Writes the length of the first selected path to the Info panel
    and copies result to clipboard
    ********************************/
    {
    var thisComp = app.project.activeItem;
    var thisShape = thisComp.selectedProperties[0];

    try{
    var pathLength = Math.round(getPathLength(thisShape.property("Path").value)*100)/100;
    if($.os.indexOf("Macintosh") === -1) { var cmdString = 'cmd.exe /c cmd.exe /c "echo ' + pathLength + ' | clip"'; }
    else { var cmdString = 'echo "' + pathLength + '" | pbcopy'; }
    system.callSystem(cmdString);
    clearOutput();
    writeLn("Path Length: " + pathLength + " pixels.");
    //Uncomment this line to display alert instead.
    //alert("Path Length: " + pathLength + " pixels.");
    } catch(e){
    alert("ERROR: Did you select only paths?");
    }


    function getPathLength(shapePath) {
    var len = 0;
    var verts = shapePath.vertices;
    var numVerts = verts.length;
    var ins = shapePath.inTangents;
    var outs = shapePath.outTangents;

    for (var i = 0; i < numVerts-1; i++) { len += getCurveLength(verts[i],verts[i+1],outs[i],ins[i+1]); }
    if(shapePath.closed == true) { len += getCurveLength(verts[numVerts-1],verts[0],outs[numVerts-1],ins[0]);}
    return len;

    //Curve Segement Length function from Hernan Torrisi
    function getCurveLength(initPos, endPos, outBezier, inBezier) {
    var k, curveSegments = 100, point, lastPoint = null, ptDistance, absToCoord, absTiCoord, triCoord1, triCoord2, triCoord3, liCoord1, liCoord2, ptCoord, perc, addedLength = 0, i, len;
    for (k = 0; k < curveSegments; k += 1) {
    point = [];
    perc = k / (curveSegments - 1);
    ptDistance = 0;
    absToCoord = [];
    absTiCoord = [];
    len = outBezier.length;
    for (i = 0; i < len; i += 1) {
    if (absToCoord[i] === null || absToCoord[i] === undefined) {
    absToCoord[i] = initPos[i] + outBezier[i];
    absTiCoord[i] = endPos[i] + inBezier[i];
    }
    triCoord1 = initPos[i] + (absToCoord[i] - initPos[i]) * perc;
    triCoord2 = absToCoord[i] + (absTiCoord[i] - absToCoord[i]) * perc;
    triCoord3 = absTiCoord[i] + (endPos[i] - absTiCoord[i]) * perc;
    liCoord1 = triCoord1 + (triCoord2 - triCoord1) * perc;
    liCoord2 = triCoord2 + (triCoord3 - triCoord2) * perc;
    ptCoord = liCoord1 + (liCoord2 - liCoord1) * perc;
    point.push(ptCoord);
    if (lastPoint !== null) {
    ptDistance += Math.pow(point[i] - lastPoint[i], 2);
    }
    }
    ptDistance = Math.sqrt(ptDistance);
    addedLength += ptDistance;
    lastPoint = point;
    }
    return addedLength;
    }

    }

    }
  14. eeropic created this gist Jan 4, 2018.
    24 changes: 24 additions & 0 deletions Dynamic parenting for 3d layers.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,24 @@
    //Position
    L=thisComp.layer("Object center");
    L.toWorld(L.effect(name)("3D Point"));

    //Scale
    L =thisComp.layer("Object center");
    [L.transform.scale[0]/100*value[0],L.transform.scale[1]/100*value[1],L.transform.scale[2]/100*value[2]];

    //Orientation
    L = thisComp.layer("Object center");
    u = fromWorldVec(L.toWorldVec([1,0,0]));
    v = fromWorldVec(L.toWorldVec([0,1,0]));
    w = normalize(fromWorldVec(L.toWorldVec([0,0,1])));
    sinb = clamp(w[0],-1,1);
    b = Math.asin(sinb);
    cosb = Math.cos(b);
    if (Math.abs(cosb) > .0005){
    c = -Math.atan2(v[0],u[0]);
    a = -Math.atan2(w[1],w[2]);
    }else{
    a = (sinb < 0 ? -1 : 1)*Math.atan2(u[1],v[1]);
    c = 0;
    }
    [radiansToDegrees(a),radiansToDegrees(b),radiansToDegrees(c)]