ADOBE AFTER EFFECTS: Forum Expressions Tutorials Creative Cloud

Atom text editor for after effects scripting

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Andrei Popa
Atom text editor for after effects scripting
on Dec 6, 2017 at 8:52:39 am

Hey guys. I lost quite some time trying to do this with no results whatsoever. Does anyone know how to configure the Atom text editor to run scripts for after effects. It looks and acts way way better than extendscript. But i can't configure it to run the scripts and I don't even know what topics to search in order to get there. Any information would be helpful.

Andrei
My Envato portfolio.


Return to posts index

DeMarc Johnson
Re: Atom text editor for after effects scripting
on Dec 7, 2017 at 1:38:31 am

You can use the $.evalFile() method to use upload an external file. Inside evalFile you are going to add the address of the file on your computer. If you are working in Windows use 'Copy Path' in the window explorer to get the file's address. You can code and save the file in Atom or any text editor and After Effects will see the code and run it. Write your code how you usually would in After Effects and everything should be good.

Tip: Since JavaScript and Expression are very similar languages save your file as a js file which stand for JavaScript. Atom will give you more options as js rather than a txt file.

I'd also did a video on it in a little bit more detail...
https://www.youtube.com/watch?v=NXkKGd-6T5s

//Example:
var path = "C:\\Users\\Admin\\Desktop\\Coding After Effects\\Episodes\\Back to Basics\\Text Editor\\Document\\expression.js";
//Use a double backslashes or a single forward slash because a single backslash will take the text out of the string
$.evalFile(path);


For Expression Tutorials:
https://www.youtube.com/channel/UCe77szX2n1WSKsGs-2gmbDw


Return to posts index

Andrei Popa
Re: Atom text editor for after effects scripting
on Dec 7, 2017 at 9:11:09 am

Thanks for that sir. Great information. But that is not what i was talking about. I know that you can use the Atom text editor to run scripts directly from the editor. I wasn't talking about expression. Just like you hit that play button in Extendscript. I hope you understand what i mean.

Andrei
My Envato portfolio.


Return to posts index


DeMarc Johnson
Re: Atom text editor for after effects scripting
on Dec 7, 2017 at 4:05:22 pm

I don't know if it's possible, but I looked at Atom's plugins. Out the all the major text editors I would say that Atom has the most plugins (Atom has a lot of plugins). Most of the plugin involving ExtendScript seem to compile it, but not run it. I've tried looking at Node.js npm packages which is kind of like a huge plugin database for any text editor, and I didn't find anything. Just try looking at both Atom's plugins and npm, even if they don't have exactly what you want they still have some cool stuff.

For Expression Tutorials:
https://www.youtube.com/channel/UCe77szX2n1WSKsGs-2gmbDw


Return to posts index

DeMarc Johnson
Re: Atom text editor for after effects scripting
on Dec 10, 2017 at 12:48:02 am

Yesterday, I did seen a plugin for Atom called atom-to-photoshop that runs ExtendScript/jsx files. There is a good chance that atom-to-photoshop work with ExtendScript for After Effects by adding #target aftereffects in the first line if not I know that the brackets version does, example here https://github.com/JavierAroche/brackets-to-photoshop. The only catch is it only runs on Mac OS. I have a Windows so I couldn't try it out, so I don't know if works, but it's worth trying. I'm still looking for a Windows solution.

For Expression Tutorials:
https://www.youtube.com/channel/UCe77szX2n1WSKsGs-2gmbDw


Return to posts index

Rainier Raydán
Re: Atom text editor for after effects scripting
on Dec 13, 2017 at 7:06:42 pm

Hi guys!

I'm also very interest on this... Atom is way better than ExtendScript but that run buttom... I hope someone finds the answer.


Return to posts index


Andrew Hildebrand
Re: Atom text editor for after effects scripting
on Jan 8, 2018 at 4:15:18 am

There's actually a very useful package for this called Process-Palette (by morassman) that let's you run shell commands directly from Atom. And you can run Extendscripts directly from there. Same as hitting the play button in Exendscript.

Go to Atom>Preferences and in Settings choose Install

Search for Process-Palette under Packages and click Install

Now from the menu choose Packages > Process Palette > Edit Configuration > Global Configuration

Click Add to add a new command

Give it whatever Namespace and Action Name you want.

Under Shell Command if you're on a Mac enter:
osascript -e 'tell application "Adobe After Effects CC 2018" to activate' -e 'tell application "Adobe After Effects CC 2018" to DoScriptFile "{fileAbsPath}"'

Windows enter:
"C:&#092;Program Files&#092;Adobe&#092;Adobe After Effects CC 2018&#092;Support Files &#092;afterfx.exe" -r {fileAbsPath}

Under Keystroke give it a hotkey that's not used anywhere else in Atom.

Scroll down to Notifications, and you'll probably want to turn off both Success & Error


While you're at it another package you may want to install is: React.js (by orktes), it makes it so Atom recognizes .jsx files for the auto-color functionality.


Return to posts index

Andrei Popa
Re: Atom text editor for after effects scripting
on Jan 8, 2018 at 10:12:49 am

You are a lifesaver. I fell like Smeagol receiving the ring :D. And a bonus. React package is awesome. The batch comman did not work like this though, i had to replace the HTML-code &#092; with the actual character. Just saying this, in case anyone else has the same problem. Thanks a lot man! I owe you big time!

Andrei
My Envato portfolio.


Return to posts index

Andrew Hildebrand
Re: Atom text editor for after effects scripting
on Jan 8, 2018 at 3:48:52 pm

You're definitely right. That's funny. When I pasted it , it was totally a backslash. The cow must have switched it out.

Also, for some reason using the hotkey inside of Process Palette gives some kind of error in AE about trying to run the script 2x. To get around it you have to set up the hotkey in the Atom keymap.

I actually got this info from this tutorial series. https://www.fxphd.com/details/539/
It's behind a paywall, but you can just sign up for a month, get access to all of their tutorials, and then cancel. REALLY helpful.


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 CreativeCOW.net All Rights Reserved
[TOP]