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

When is it OK to run a java script using AEGP_ExecuteScript.

New Here ,
Jul 09, 2015 Jul 09, 2015

Copy link to clipboard

Copied

Hello, I am writing a plugin using the c++ SDK which takes the fonts names of the current selected composition.

Get the font name is done by executing a java script and this code is a part of the idle hook.

My problem is that when a model window of after effects is open, i get popup messages telling me that it is not allowed to execute a script while a model window is open.

Also, when i try to edit a text i get a strange message saying: "need to focus on ourselves".

Is there any way to ask after effect if it is OK to run a script?

Thanks!

TOPICS
SDK

Views

919

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

Adobe Employee , Jul 21, 2015 Jul 21, 2015

Hi Aviya,

We discussed this off-forum, but I wanted to provide my response here for any others who may have the same question:

This error is shown by design.  Scripting can modify the current project, and if a dialog is open, the state of the AE project could be changing.  So to prevent problems with partially complete project changes, we disallow scripting during this time, and show the error.

I’ve logged a feature request for us to set aside time in the future to improve this scenario.

Votes

Translate

Translate
Adobe Employee ,
Jul 21, 2015 Jul 21, 2015

Copy link to clipboard

Copied

Hi Aviya,

We discussed this off-forum, but I wanted to provide my response here for any others who may have the same question:

This error is shown by design.  Scripting can modify the current project, and if a dialog is open, the state of the AE project could be changing.  So to prevent problems with partially complete project changes, we disallow scripting during this time, and show the error.

I’ve logged a feature request for us to set aside time in the future to improve this scenario.

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
New Here ,
Jul 21, 2015 Jul 21, 2015

Copy link to clipboard

Copied

Thanks For your answer, i'll be waiting for an update.

Aviya.

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
Contributor ,
Mar 11, 2016 Mar 11, 2016

Copy link to clipboard

Copied

Hello, I am also encountering this problem with a plugin we're creating with Extend Script and Angular. It occurs when the extension is running and the user tries to create a new text layer. Can you suggest ways that we could track down what specifically might be causing the issue?

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
New Here ,
Mar 13, 2016 Mar 13, 2016

Copy link to clipboard

Copied

LATEST

I just avoided the problem by not running the script while a text layer is on the user selected list.

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