• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Include js files to the jsx script

Explorer ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

Is it possible to include the "polylabel" algorithm in the After Effects .jsx script, without using CEP panel. 

 

Link to the algorithm:

https://github.com/mapbox/polylabel

TOPICS
Expressions , Resources , Scripting , SDK

Views

476

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 12, 2023 Jan 12, 2023

Modern JS variants and the pretty old jsx od After Effects have some syntax differences (mostly new features not available in jsx, yet). You can be lucky that copy & paste of the js code works out of the box. Maybe you also have to tweak the code or use a system like babel.

Votes

Translate

Translate
LEGEND ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

Since it's plain JS you should have no problems just copy & pasting into whatever you want. Of course you will need to adapt variables and replace some functions with their AE functions. Not sure what more you need to know. The specifics will depend on what you actually want to do with this.

 

Mylenium 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

look at the "call nested script.jsx" file, located at "C:\Program Files\Adobe\Adobe After Effects 2022\Support Files\Scripts\(instructional)".

it shows how to include another file from a script. perhaps that would work for you.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

Modern JS variants and the pretty old jsx od After Effects have some syntax differences (mostly new features not available in jsx, yet). You can be lucky that copy & paste of the js code works out of the box. Maybe you also have to tweak the code or use a system like babel.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 13, 2023 Jan 13, 2023

Copy link to clipboard

Copied

LATEST

Finding ExtendScript-ready libraries is pretty challenging these days, as ES3 is extremely old. If you need to do any advanced calculations, you'll have a much easier (and faster) time with a CEP panel.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines