Copy link to clipboard
Copied
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.
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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... 🙂
Copy link to clipboard
Copied
Thank you for advice, Shachar!
I think I'll stick to javascript for now.
Took me awhile to figure out how set up the button in UI.
What a challenge!