Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all 2143 articles
Browse latest View live

ExtendScript Toolkit - Object Model Viewer

$
0
0

Hi all,

 

I know there's not really a way around this but I'm curious if anyone knows why the Object Model Viewer in ExtendScript Toolkit doesn't have After Effects Object Model in the Browser dropdown?  It has it for Bridge, InDesign, Illustrator and Photoshop. 

 

Not that jumping into the AE Scripting Guide is much of a pain...but it just seems like it would be appropriate to have it inside ESTK...


Is there a way to save animation preset by script?

$
0
0

Hello,

    I have written a script named Memory,which save any layers even comp layer for later generating.https://github.com/Smallpath/Memory

    A few days ago,I completed the preview feature,and was ready to release it with v3.0 tag.However,script can't get or set the value of special plugins such as Curve,Particular and Puppet,nor do my script Memory.I know these plugins can be saved as animation preset by click in Ae,but that needs the user to click, select the folder,input the preset name and finally click OK,which is not I what.

   I really what to improve my script.Therefore,I wonder if there is a way to save animation preset by script.Maybe it can be a hidden method such as CompItem.saveFrameToPng.Thanks for any help

Time offset help

$
0
0

Hello Lovely AE Peeps

 

 

Slowly, incrementally, I am starting to get a glimmer of how JS works in AE- and then I hit a wall.

 

 

I don't understand how time offsetting works, if it can be applied 'deeper' into a script ( at the end of whatever values have been calculated), or if it has to be inserted directly to the source element that is producing the values. But that probably makes no sense, as I don’t know how to even talk about the operations within JS!

 

 

What I'm working on is some dynamic text driven animations that can be driven by text numerical values, entered by editors within Adobe Premiere.

 

 

For example, here is a simple graph that I have not spiffed up in any way yet:

Dynamic Text Graph.png

 

 

 

The dark red txt in the bottom right are set as guide layers (and will be invisible on renders).They are the Max, and Min Values for the graph, extracted using "parseFloat".

 

 

The value I'm representing in a bar graph, I refer to as a "plot". Here is my JS that produced the above image:

 

All the yellow values on the left are generated on the min/max values entered, and rounded to no decimal places with ".toFixed(0)"

 

The below script is what drives the white bar graph pictured above:

 

 

——————

 

plotTXT= thisComp.layer("Value input 1").text.sourceText;

plot = parseFloat(plotTXT);

//converts source text into value, for the "plot"

 

 

minTXT=thisComp.layer("Min Graph input"). text.sourceText;

min=parseFloat(minTXT);

//converts source text into value, for the "min"

 

 

maxTXT=thisComp.layer("Max Graph input"). text.sourceText;

max=parseFloat(maxTXT);

//converts source text into value, for the "max"

 

 

net=max-min;

 

percent=(plot/net);

 

//does the math to solve what percent the plot is of the net values listed on the graph.

 

 

percentANIM=percent*thisComp.layer("Animation").transform.position[0];

//takes an exponential animation from a null object's position (from 0-100), producing a scale up animation, for a transition in.

 

 

offset = -.5;

T=time+offset;

offsetAnim=valueAtTime(T);

// this is my scratch pad WIP that is not functioning yet.

 

 

 

[100, percentANIM]

//applies the script to the Y axis of a scale on my bar graph shape layer

(which has an anchor point set at the position of 0 on the graph)

——————

 

The above script generated this output:

 

Dynamic TXT driven Graph_Animated.gif

 

 

 

I got as far as I did with time offsetting via this helpful post:

AE Scripting Tutorial: Time Offset Expression

 

 

—————

 

offset = -.5;
//The offset in time, negative half a second.

p = thisComp.layer(“My Animated Layer”);
//The parent layer

t = time + offset;
//The current time minus half a second

p.position.valueAtTime(t);
//Value of the parent’s position property at the current time minus half a second

——————

 

 

I’m not having any luck formatting this for my animation type (Position value, from 0-100 on a Null Layer).

 

Does anyone have any advice on how I could achieve a time offset of the animation from my null layer:

"thisComp.layer("Animation").transform.position[0]”;

 

so that I could stager the transition in animations of multiple elements, driven by one animation?

 

I’m hoping to have all the visual elements animate in to their full positions, and to add several more user-enterable bar graphs to the right of the one pictured.

 

 

Any help is appreciated

Best,

David

 

 

 

 

 

 

 

 

Run .jsx file in AE from PHP

$
0
0

Hello, I am trying to execute .jsx file via PHP server to start my script automatically, but when AE open file, it says format unsuported.

 

My execute line is:

shell_exec('"C:\Program Files\Adobe\Adobe After Effects CC 2018\Support Files\AfterFX.exe" C:\Program%20Files\Adobe\Adobe%20After%20Effects%20CC%202018\Support%20Files\Scripts\vide ov2.jsx');

 

This command is works fine for PS, but in AE program stops. If I execute script via AESToolkit, all fine. How to solve this problem?

 

Thanks for all your answers!

Import items into AE from Shared Cloud Library

$
0
0

Hi all,

 

I am trying to mimic the process of importing items into the project pane in AE, but instead of pulling from a location on the user's computer, I'd like to be able to pull a select number of items from a shared Adobe CC Library that I've created, which would be shared with the user. I can't for the life of me figure out how to call the path to the shared cloud library.

 

In a nutshell, I'd like the user to be able to select a category, and then comb the library for all items that fit in that category, and import them into the project pane, at which point I'll sort them into various comps.

 

Any help would be greatly appreciated, as I've submitted this question to CreativeCow and GitHub and received crickets.

 

Thank you!

Use text source to change comp name

$
0
0

Is there a script that automatically changes the name of the comp based on a text field in the comp?  Example: LowerThird text (John Doe), comp changes to "John Doe".

Add keyframe to all path shape

$
0
0

Hi Everyone,

 

I'm new in scripting but I try to write a simple script for adding a keyframe on every path of shape layer, i succeed with a part of that:

 

var myLayers = app.project.activeItem.selectedLayers;
var myLayer;
for (var i = 0; i < myLayers.length; i++){  myLayer = myLayers[i];  if (myLayer instanceof ShapeLayer){    var myContents = myLayer.property("ADBE Root Vectors Group");    for (var j = 1; j <= myContents.numProperties; j++){      myContents.property(j).property("ADBE Vectors Group").property("ADBE Vector Shape - Group").property("ADBE Vector Shape").addKey(1);    }  }
}

 

but i have difficult if there is a lot of "Vector Shape" on "Shape - Group" it doesn't work.

key path.PNG

Do you have an idea how to do it ?

Thanks a lot

Is it possible to change "Layer Styles" properties such as "Color Overlay" in script ?

$
0
0

Hi Everyone!

 

Is it possible to change "Layer Styles" properties such as "Color Overlay" and "Gradient Overlay" in script ?

 

 

Thanks,

 

visuall


How to make a script which allows me to do "save as" in AE?

$
0
0

How to make a script which allows me to create a new window using the plus button to "save as" a new version of  AE like 3D max?

thanks a lot!

 

[Question moved to the AfterEffects forum]

Save as "Copy"

$
0
0

I have a quick question.  Is it possible to save as "copy", and keep the current project open, unsaved?  I am basically trying to replicate the function of Auto-saving, except adding some extras.  I am using app.scheduleTask() to do auto-saves, theoretically.

 

Thanks for any help!

How to move outPoint of layer in a comp to comp outpoint?

$
0
0

Please help me to write a script that changes the layer endPoint (i.e duration of footage layer) to the comp work area outpoint.

 

script_001.jpg

 

I tried by writing the code as shown below, but it doesn't give the result

 

var myComp = app.project.item(1);  //Comp item

var myLayer = myComp.layer(1);    // Layer in the comp

var endTime = myComp.duration;  // end time of comp

myLayer.outPoint = endTime;          // layer endPoint to comp outpoint

 

usually I use shortcut "]" for moving layer outPoint. but by using above code it was trimming the layer instead of moving?

 

Please help me, Thank you in advance!!

Scale shape over time based on position

$
0
0

I'm totally new to expressions and have spent a couple of hours trying to figure this out. Thanks in advance for your assistance.

 

I have a shape layer (an ellipse). It is meant to represent where a person's eyes are looking on the screen (like in this video: https://youtu.be/TwNNij89qro). The position of the ellipse changes based on when the eyes move from point to point. I have set all the position keyframes manually. I'd like the scale of the ellipse to change based on how long it remains fixed in one location. The longer it remains in one spot, the larger it gets. A 10% increase per frame seems to work well. So, if the ellipse remains in one place for ten frames, it will increase in size to 200%. If it's just five frames, the ellipse grows to 150%. When it moves to a new location, the scale should reset to 100%.

 

Here's my newbie expression (feel free to laugh). This expression has been placed on the Scale property for the ellipse. Parts of this seem to work on their own, but it's not doing what I would like it to do as a whole:

 

var prevFrame = position.valueAtTime(time - .0333)

var currentFrame = position.valueAtTime(time);

if (currentFrame = prevFrame) transform.scale +[10, 10];

else [100, 100];

 

As you'll see, I tried to look at the position of the previous frame, then compare it's position to the current frame. I've calculated one frame to be .033 seconds. The ellipse scales up to 110% but that's it. It starts at 110% and stays that size for all frames. The expression doesn't generate an error, so I'm thinking I might be close. But I'm also guessing there are ten other ways to do this that might be better.

 

Thanks for looking this over and offering your guidance.

execute script with aerender

$
0
0

Hi,

 

I have a project that Im trying to do an automatic render using aerender.  However I would need to run a script after the composition.  The scripts sets up a bunch of stuff and modify certain properties. 

 

So I was wondering if there is a way of running the script either through AERender or maybe an expression within AE project before the automatic render?

ExtendScript Toolkit no longer works after I update to After Effects CC 2015!!

$
0
0

I can not launch the ExtendScript Toolkit from AE CC 2015, it says the ESTK is not installed. How do I make it work? Everything was working with AE CC 2014, and I stupidly update it to CC 2015 and nothing works now!!

Arabic text flow

$
0
0

Hello All,

 

I am new in After Effects and thus need help. I am writing a javascript which reads the text from the Json file and replaces the content under the text frame in the AE Project file. This works fine if the Text is in English. But If I try to replace the Arabic text then the text looses the formation and breaks the words. I tried changing the keyboard language to Arabic. But it still doesn't work.

 

The value under the javascript variable looks correct.

 

Can anyone please help.

 

Thanks all in advance.

Farzana.


Possible to get positions of characters in a text layer?

$
0
0

Hello. Is it possible to get position of each character in a text layer? I'm building words from individual characters (one per layer), but would like to obtain kerning from complete words.

Can i get preview time from extendscript?

$
0
0

Can i get preview time from extendscript?

 

 

I want to put subtitles into my video..

I created the dialog that record time when click a button...   to make easy this work..

First time..  I recorded "app.project.activeItem.time" ..  but it recorded preview started time every clicking

How to obtain positional data with the follow-up of trajectory?

$
0
0

Hello,

 

I need your help :

 

I have abode effects and I cannot extract the positional data in format .csv "excel" ?

 

It's possible ? Can you explain please ?

 

It's for extract the positional data of the football players during a game to obtain :

 

sujet-physique-et-tableur-excel-123606.html

 

Thanks,

 

Julien

Search for a comp marker by name.

$
0
0

Is it possible to search for a comp marker by name and get its time?

Split text layer into one-character text layers.

$
0
0

I wonder if anyone has been able to do this using ExtendScript. I would like to split a line of text in a text layer into layers with one character per layer.

 

Example: a layer with "This is AE" would be replaced with 8 eight text layers "T" ... "E" that could be animated separately.

Viewing all 2143 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>