Skip to main content
Participant
July 9, 2015
Answered

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

  • July 9, 2015
  • 1 reply
  • 1127 views

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!

This topic has been closed for replies.
Correct answer Zac Lam

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.

1 reply

Zac LamCorrect answer
Inspiring
July 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.

aviyaCheAuthor
Participant
July 22, 2015

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

Aviya.