How can i have exact same camera movement from Blender to After effect. i made units and Values Exact same But I think Camera Movement still not Right. do anyone have any idea What is the right Procedure To Import A 3d Camera into The After effect.
Camera Script Problem
Can't change preference
I am trying to turn off the mercury transmit video preview preference with a script.
I found in the preference file that the section name is "MacOS Video Preview Pref Section" and the preference is "Video Preview Enabled"
with the preference active I ran the following script
alert(app.preferences.getPrefAsBool("MacOS Video Preview Pref Section", "Video Preview Enabled")) app.preferences.savePrefAsBool("MacOS Video Preview Pref Section", "Video Preview Enabled", false) alert(app.preferences.getPrefAsBool("MacOS Video Preview Pref Section", "Video Preview Enabled")) app.preferences.saveToDisk();
when I run the script I get 2 alert boxes; the first says true, then false (which is what I expected...the box was checked, then I set the value to false so it alerted false)
However, when I open up preferences, the box is still checked (so it is really true)
To make things even more confusing when I run the scrip again, the first alert says false (even to the checkbox is still checked).
Any ideas as to what I am doing wrong?
Add entry to CEP Panel menu
What does app.purge() function actually do?
I wanted to purge memory and disk via script. I used this code:
app.purge(PurgeTarget.ALL_CACHES);
app.purge(PurgeTarget.UNDO_CACHES);
app.purge(PurgeTarget.SNAPSHOT_CACHES);
app.purge(PurgeTarget.IMAGE_CACHES);
To my surprise this didn't clear the cache. I deduced that from going to Edit->Purge->All Memory and Disk Cache where I was greeted with the message that a couple of GB will be cleared if I proceed.
On the other side, there was a bug in AE that caused AE crash on every second render of the same exact project. Running the code above resolved the issue.
So what does app.purge() really do?
Copy to Clipboard
I have a script that generates a text file.
I can save it just fine, but I need to be able to also copy it to the system clipboard.
It needs to work on whatever platform a user happens to be on: Windows, Mac, etc.
How do you do this in an AE script?
Thanks
system.callSystem() on Mac and ffmpeg
Hi,
I've been working a few hours on this with no luck, maybe anyone here can help:
I have an issue on Mac with a script where I want to transcode some files using ffmpeg.
Here's what's going on:
var cmd = pathToFFMpegBin + '/ffmpeg -h'; var output = system.callSystem(cmd); alert(output);
This works well, the command is executed and the alert shows the help for ffmpeg
But with the full command line to encode a file, like:
var cmd = pathToFFMpegBin + "/ffmpeg -h -i " + inputFilePath + " -c pcm_f32le " + outputFilePath; var output = system.callSystem(cmd); alert(output);
After Effects freezes (with the mouse cursor being the waiting cursor) like it's stuck in an endless loop
The alert is not shown, the script is stuck at the callSystem line.
BUT: the encoding does work, the new file is created and working...
- The same command works well in a terminal or as a bash script.
- The script works well in Windows
- If I provide a invalid path to the input file or the output file, it works as expected (the alert shows the error returned by ffmpeg)
- If I set ffmpeg to quiet mode (using the '-v quiet' option), it still don't work.
- I tried creating and executing a bash script, but I can't use File.execute() as it opens the script in a editor (even after I have set it to executable, that's normal behavior on Mac). I have to execute it via a callSystem('./file') and this freezes After Effects too.
- I tried launching the script via ExtendScript toolkit, both After Effecst and ExtendScript toolkit freeze, and I cannot stop the script in ES Toolkit.
- Tested on CC2017 and CC2015, same result.
- Javascript debugging is enabled, but I don't have any debug info, it's really like the script is in an endless loop, except I can't stop it.
Any idea? Or do you think about a workaround?
Oh and the ffmpeg binary was the snapshot build here: wihttps://evermeet.cx/ffmpeg/ the one recommended by the official ffmpeg website.
I still have to test with another version.
Guidance on how to leverage HTTPS calls via ajax/sockets?
I've seen plenty of information about how to use sockets or ajax to make http calls - has anyone been able to figure out https? Can somebody point me in the right direction on how to make SSL connections and invoke POST/GET operations in AE?
Much appreciated!
UI Panel to Change Audio Hardware?
I'm not sure this is even possible, but does anyone know how to create a UI Panel to switch between different Audio Hardware preferences? I switch between headphones and speakers quite a bit. Using the pulldown is tedious. Any help is greatly appreciated!
Extendscript: Is it possible to get individual character properties including its size and coordinates?
I have to animate a lot of text with multiple color images as part of the text (the same way we use emojis in chats, just as font). Since it's impossible to do this natively, the basic idea was to use some text placeholders (like special characters) to be replaced by the script with images later. So, is it possible to find the position and rectangle size of these characters?
If not, I will really appreciate any other ideas.
app.open() is not a function
Using ExtendScript to develop with After Effects CC 2018. The script worked in the development environment until a few days ago.
Now I have the error app.open is not a function. And it is right: looking through the data browser, app refers to the ExtendScript Toolkit rather than AfterEffects.
The scrap of script below uses a working project file which I can load manually but cannot find a way to load through a script in ExtendScript debugging.
Suggestions gratefully received!
I am running:
Adobe After Effects CC 2018
ExtendScript Toolkit 4.0.0.1
Here is the nub of the issue in code - it really does not get more basic than this.
var my_file = new File("/Users/rl/Documents/Dev/AdobeData/candidates/tamara/tamararig.aep");
if (my_file.exists) {
app.open(my_file); //fails on this line with app.open is not a function
}
Show and Hide a Layer with Script?
I have about 20 layers of the same comp that I have arranged in a bit of a data diagram. Inside these comps is a common hexagon shape that I want to apply a glow to at specific intervals from the master timeline. What I would love to do is at certain points in time trigger this glow. I used a lot of Flash way back in the day and the way you might do something like this is with the tellTarget command. And you could target Symbols within Symbols as deep as you want and then trigger playback of a certain frame. In this case I would maybe just show and then hide a layer containing a comp of a glow, ideally fading it in and out (maybe it's a loop). I feel like this is something everyone would want to do via a script of some sort.
Current for arguments sake this is what my structure looks like and how I think structurally this would work. I have very little AE script knowledge, but understand programming.
Master Timeline
-COMP A
--comp1
---compx (layer 2 has the glow and opacity 0%)
--comp2
---compx (layer 2 has the glow and opacity 0%)
--comp3
---compx (layer 2 has the glow and opacity 0%)
So let's say at a certain point in time I want to show the glow on comp2 I would imagine in COMPA it would look something like this:
comp1.compx.layer2.opacity = 100;
Then when I want it off:
comp1.compx.layer2.opacity = 0;
I would want the opacity to fade up though and then fade out.
Am I barking up the wrong tree here?
Online development and syncing
Hi there, have been using ESTK, Sublime, Notepad ++ for years for development.
May I ask what people use for versioning ?
and is there a useful Online Dev Environment that can be used to link actual scripts to the cloud ?
ie. if I wanted to edit stuff offsite (without need for debugging), - syncing my scripts folder to Google drive or something
and linking that to JsFiddle or one of those ?
Thanks !
Currently using https://codeshare.io/ to do light editing and copy and paste to native software then.
How to get markers from QuickTime file?
If you export a QuickTime ProRes from Premiere with timeline markers, then import it into After Effects, and drag it into a Comp, Ae automatically shows the timeline markers as layer markers.
I need a way to programattically grab this metadata from an arbitrary QT video file. But I've Googled high and low and found nothing. I've tried examining the QuickTime file with all kinds of tools and haven't found where these markers are stored. They've got to be in there somewhere.
Anyone have a clue?
how to get blendingmode type,not the value~
i saved the layer informations of my project when i was useing after effects 2014 cc.
at that time,if the layer blending mode was "NORMAL",it will return "4812".
but...when i useing after effects 2018,the value "4812" can't set to my new layer;
i found blending mode "NORMAL",is return "5237"now...;
how to fix the problem? or can it return the TYPE not the value number?
Script To Make Video Variations With Layer Visibility
Hello! I'm looking for someone with JavaScript experience to help me make something for After Effects. I'm looking for something that can take specifically named layers and render out the video so one version of each layer is visible. I tried to make an example of what the project might look like:
Essentially, I'd want it to render out so there's a version with A1-B1-C1, then a version with A1-B1-C2, then a version with A1-B2-C1 etc etc until it renders out every variation possible (in the example it'd make 24 videos). The layers would probably be precomps, I just used shape layers because they were quick to make. Does anyone know if this is possible, and if so can they help me with a script that will run it? If you'd like to be paid to write the script, that can be arranged!
Thank you for reading!
If/else issue since upgrading to CC19 (v16.0)
I just upgraded from AE 15.1.2, and I'm finding that this expression isn't working in v16.0. Does anyone know if there's a change to the way this needs to be written in v16.0?
I've got multiple layers, and I'm controlling which layer's opacity is at 100% by changing values on a slider (named Slider Control" that's on Null 1. Here's the expression that says if Slider Control is set to 1, then the opacity for the layer is 100, and if not, then it is 0:
if(thisComp.layer("Null 1").effect("Slider Control")("Slider")==1) 100 else 0
Opening a project that was made last week in AE 15.1.2, the expression hasn't changed at all, yet works perfectly. But the same expression used in a new project gives this error:
“Undefined value used in expression (could be an out of range array subscript?, an expression was disabled as a result of an error.”
I can't find any information on changes to expressions that will allow me to figure out how to get this to work in v16.0. Any help is appreciated!
How to edit a text Master Property via ExtendScript?
Hi,
This seems basic, but I can't figure it out. I can't change the value of my text Master Property, via Extendscript. I tried treating the property the same way I would treat the Source Text property of a text layer, but After Effects doesn't like this.
var newText = new TextDocument("This is new text.");
var myLayer = myComp.layer("Title Text"); //This is my comp with the master properties.
var myLayer2 = myComp.layer("Text 1"); //This is my text layer.
var myProp = myLayer.masterProperty("Text");
var myProp2 = myLayer2.sourceText;
myProp2.setValue(newText); //This is changing the text of the text layer and works.
myProp.setValue(newText); //This is changing the text of the master property and doesn't work.
The error I get in Extendscript is "After Effects error: invalid text layer."
I would appreciate any help.
CC19 running scripts significantly slower than CC18 (Video Proof)
What you will see in the video below:
-Script UI Panel I made
-Identical projects and environments in CC19 and CC18
-I will click a button that runs a refresh function
-All it does is cycle through all of the layers and properties in the currently opened comp looking for identifiers, and adds expression data to properties that match what it's looking for.
As you can see, there's a big difference. This is a pretty small project that I demoed here, it's much worse in larger projects. I'm assuming it has to do with the new expression engine. I'm just wondering if there is something I can change in my script to make it run faster. I know it's hard to say without the code in front of you, but is there any general tips or things to keep in mind when scripting for the new engine?
Can't wait to hear from somebody. Thanks!
Windows 10 64bit pro
i7 4770k
GTX 1060 6gb
32gb ram
AE installed on SSD with OS
Importing Layers from Project file
Hi All,
I'm looking to create a master After effects file with all the templates I normally use on a daily basis and then tie it into a script UI panel so I can call individual comps and place them into my new comps without importing the entire project and clogging up my workflow.
Any ideas?
I currently am doing a lot of if then statements to build specific solids and effects layers but the templates change so much that I think hard coding them is the wrong way to go.
Any help would be great.
Thanks.
Ben
about app.beginUndoGroup() function
I use
app.beginUndoGroup();<some code> app.executeCommand(app.findMenuCommandId("Convert Expression to Keyframes"));<some code> app.endUndoGroup()
in my javascript;
after run my script,
I use keyboard shortcut "Ctrl + M" add a comp to render queue;
then I use "Ctrl + Z" want to undo add comp to render queue;
but AE told me "Undo group mismatch, will attempt to fix";
and AE back to before run my script;
in my other script, I found
app.project.renderQueue.render()
this function will affect undo group,
did convert expression will affect undo group too ?
any other command else ??