Skip to main content
Inspiring
November 24, 2020
Answered

where to put AEGP_ExecuteScript in c++ plugin

  • November 24, 2020
  • 1 reply
  • 736 views

Greetings, all!

 

I make a dialog text input box in my c++ plugin .

I already figured out how to read out the user input. 

 

But at the moment I put  AEGP_ExecuteScript() function inside 

 

static PF_Err  GlobalSetup()

 

Obviously, the user to enter his(her) text just once during the AE session.

 

Where shall I put AEGP_ExecuteScript() so that the pop-up windows appears  whenever my plugin is applied to the layer. 

 

I thoght about putting it inside 

 

static PF_Err  ParamsSetup()

 

where all the sliders are defined. But I'm not exactly sure if I'm correct on this.

Does someone have some experience or advice on this?

 

Yaroslav.

Yaroslav.

 

 

 

 

This topic has been closed for replies.
Correct answer shachar carmi

param_setup also happens only once per session (wounds wierd, but that's how it is)

you should probably go with either sequence_setup which occurs only once when a new instance is applied to a layer (and not say, when duplicated or copy/pasted), or suring update_params_ui, which will happen when the effect has been applied but also on other occasions so you need to keep track of having already launched the box for that instance.

1 reply

shachar carmiCommunity ExpertCorrect answer
Community Expert
November 24, 2020

param_setup also happens only once per session (wounds wierd, but that's how it is)

you should probably go with either sequence_setup which occurs only once when a new instance is applied to a layer (and not say, when duplicated or copy/pasted), or suring update_params_ui, which will happen when the effect has been applied but also on other occasions so you need to keep track of having already launched the box for that instance.

Inspiring
November 24, 2020

Thank you, Shachar.

 

One more thing.

For text input I use javascript pop up window. Well, this pop-up thing simply doesn't feel very professional.

I'd like the text field to be a constant thing placed next to AE plugin sliders.

 

Do you by chance know the example where user text field window is coded?

Yaroslav.

Community Expert
November 25, 2020

there is no such sample, and actually doing that is a bit tricky.

any custom UI bit in the ECW or the comp window is handled exclusibely via drawbot. you can't just add an os level text field directly to the ui. you'll need to wrap it in some system that would translate user input (also handled exclusively through AE's "event" calls) onto some offscreen text controller and copy it's image buffer, or create a text editor from scratch using the event system and drawbot.

 

i personally use a javascript window for the input, and then display the result as a non-interactive text in the ECW that launched the javascript window when clicked on.

i never got any complaint that the users don't find it proffesional... 🙂