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

Understanding the interaction between ext.js, index.html, and Premiere.jsx

New Here ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

Hello, I am a game developer with minimal Javascript experience. I find myself needing to create panels for Adobe Premiere Pro and am having some difficulty in understanding how these script communicate. I have managed to create a new panel using the manifest.xml file and Frankenstein's Monster together home HTML in the index to show up as a hello world button and graph.

However, when I click the button I get that  "$._PPP_.helloWorld is not a function." I have also managed to get the "Undefined is not a object" message when I remove the PProPanel from the extensions file path (My panel is called Test and largely is just PProPanel copy and pasted). I changed the name of the function block in PremiereTest.jsx and once again got the Undefined error message. If I could get the basic explanation of how these scripts interact and call on each other I would be in a much better position.

It seems like Manifest is setting the Index and PProPanel (Which I have no idea what this does either). ext.js is calling Premiere.jsx (I think this is where my problem is occurring, I'm losing the connection between these in my renaming). Any help for a newby at this would be much appreciated. Thanks.

TOPICS
SDK

Views

340

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
Enthusiast ,
Oct 16, 2017 Oct 16, 2017

Copy link to clipboard

Copied

LATEST

Welcome to the wonderful, lightly documented world of Adobe CEP extension development!

_PPP_  wrote

However, when I click the button I get that  "$._PPP_.helloWorld is not a function." I have also managed to get the "Undefined is not a object" message when I remove the PProPanel from the extensions file path (My panel is called Test and largely is just PProPanel copy and pasted). I changed the name of the function block in PremiereTest.jsx and once again got the Undefined error message. If I could get the basic explanation of how these scripts interact and call on each other I would be in a much better position.

Okay, the opening line was a bit of a lark - things have been improving.

I would very much recommend reading over some documentation. The latest version is for CEP 8, which is for an as-yet-unreleased(?) version of Creative Cloud (2018). However, Adobe helpfully converted what was a PDF to a very link-able Markdown file so I can link it like this. Read that. You're dealing with two separate JavaScript contexts - one is the panel (standard browser JavaScript) and the other is the application (this is ExtendScript - an ECMAScript 3 dialect [similar to JavaScript circa 1999]). You specify the entry-points for these two contexts in the Manifest file. If you've changed the name of the .jsx file from the example panel, you'll need to adjust that one there.

I will also mention that you will need to make sure that the application processes any of your other jsx files - the application needs to know what to include. There are a few ways to do this but we handle it with code that looks like the following:

//@include ../lib/json2.jsx

//@include SomeOtherScript.jsx

As far as I'm aware, Adobe doesn't document this method anywhere. This is the other [documented] method. The current PProPanel version implements that loading logic here.

_PPP_  wrote

It seems like Manifest is setting the Index and PProPanel (Which I have no idea what this does either). ext.js is calling Premiere.jsx (I think this is where my problem is occurring, I'm losing the connection between these in my renaming). Any help for a newby at this would be much appreciated. Thanks.

Maybe? The PProPanel I believe is built to read all files found in the jsx folder. You can follow this through yourself. The Manifest indicates the HTML entrypoint (which it sounds like is working for you), as well as the ExtendScript entrypoint. Currently, the ExtendScript entrypoint adds some functions to assist in loading ExtendScript scripts. When the HTML entrypoint is loaded, it processes ext.js​ and calls into it when the "page" finishes loading. The callbacks prepared in ext.js then call loadJSX which attempts to load any and all .jsx files located in "ExtensionRoot/jsx" and "ExtensionsRoot/jsx/PPRO​". If your .jsx file is in one of those folders then you should be okay.

If your PremiereTest.jsx file is not in one of those two folders (jsx/ or jsx/PPRO/), then your script likely isn't being loaded and attempts to invoke it will fail.

Hope this helps!

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