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

Where to put #include/script src statement

Explorer ,
May 31, 2017 May 31, 2017

Copy link to clipboard

Copied

This will probably be a confusing question, but I'm going to give it a shot.

In my panel development, I use the PProPanel as a base to start developing. 

In that 'package', I have:

ext.js

index.html

PProPanel.jsx

Premiere.jsx

plus other files and folders.

In my development, I have created a library of custom functions that I use across multiple panels.

(example: myPProFunctions.js, myAEFunctions.js, myCommonFunctions.js)

I add this to individual panels by using an #include line, usually in the Premiere.jsx or the AE.jsx.

However, I've created some library functions that I can utilize in the ext.js and index.html.

My question is, where do I add the #include or the script src line so the libraries can be utilized across all files?

I've found that when I add the #include line to the Premiere.jsx file the ext.js file can't see the functions.

thanks for any input,

Kelly

TOPICS
SDK

Views

505

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

Engaged , Jun 01, 2017 Jun 01, 2017

Hi Kelly,

if I'm not mistaken the ExtendScript domain and the HTML5 domain are entirely separated, functions will not permeate from one side to the other. The only thing you can pass between them are JSON objects (and simpler types of course).

On the ExtendScript side you use includes (#include or @include), on the HTML5 side it's the easiest to load every script file in order in the <head> area. You could alternatively use jQuery's getScript, but this seems to not have worked reliably in the past

...

Votes

Translate

Translate
Engaged ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

Hi Kelly,

if I'm not mistaken the ExtendScript domain and the HTML5 domain are entirely separated, functions will not permeate from one side to the other. The only thing you can pass between them are JSON objects (and simpler types of course).

On the ExtendScript side you use includes (#include or @include), on the HTML5 side it's the easiest to load every script file in order in the <head> area. You could alternatively use jQuery's getScript, but this seems to not have worked reliably in the past.

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
Explorer ,
Jun 01, 2017 Jun 01, 2017

Copy link to clipboard

Copied

LATEST

Thank you for the response.  Makes sense. 

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