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

How to update UI params after sequence resetup?

Community Beginner ,
Dec 09, 2018 Dec 09, 2018

Copy link to clipboard

Copied

Hello,

My plugins rename param on cmd PF_Cmd_UPDATE_PARAMS_UI

                            PF_ParamDef param_copy = *params[id];
                            strcpy( param_copy.name, parameter.name );

                            param_copy.uu.change_flags = PF_ChangeFlag_CHANGED_VALUE;

                            ERR( suites.ParamUtilsSuite3()->PF_UpdateParamUI( in_data->effect_ref,
                                id,
                                &param_copy ) )

but, if I close and open solution, name of param return to default, and don't call cmd PF_Cmd_UPDATE_PARAMS_UI.

Maybe as it is possible to force this event?

Thanks!

TOPICS
SDK

Views

2.2K

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
Community Expert ,
Dec 09, 2018 Dec 09, 2018

Copy link to clipboard

Copied

indeed, param names don't save with the project and get reset when a

project is loaded.

technically, you can change param names during USER_CHANGED_PARAM, however,

conceptually, it should be done during UPDATE_PARAMS_UI.

the latter, is sent when in instance is either created or loaded (and a

bunch of other occasions).

if you can't deduce the correct name changing during "update params" and

can only do so during "user changed param", consider storing the relevant

data in sequence_data during "user change param", where you can access it

later during "update params ui". sequence data can also be stored with the

project, and therefore will be available when the saved project is loaded.

On Sun, Dec 9, 2018 at 6:30 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Dec 09, 2018 Dec 09, 2018

Copy link to clipboard

Copied

The problem is that after creating and calling PF_Cmd_SEQUENCE_RESETUP I set the flag

out_data-> out_flags | = PF_OutFlag_REFRESH_UI

but the PF_Cmd_UPDATE_PARAMS_UI is not called.

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
Community Expert ,
Dec 09, 2018 Dec 09, 2018

Copy link to clipboard

Copied

do you have PF_OutFlag_SEND_UPDATE_PARAMS_UI set on global setup?

in any case, UPDATE_PARAMS_UI will be sent on the first time the effect

instance is visible on the ECW, and not necessarily right after

SEQUENCE_RESETUP.

point being, you should get a "update params ui" call at the relevant time.

On Sun, Dec 9, 2018 at 9:56 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

Yes, I have PF_OutFlag_SEND_UPDATE_PARAMS_UI,

UPDATE_PARAMS_UI will be sent on the first time the effect

instance is visible on the ECW

But, until I click on the effect, this event will not be sent and I see the default name.

The task is to transfer data from the plugin to the script, I need to pass a string. And I decided to change the name of one and attributes, and read it in the script

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
Community Expert ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

when and how is the script triggered?

On Mon, Dec 10, 2018 at 8:54 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

My effect add shader on layer, and I need to get some data from the shader to script export. I put this data to param name.  I already understand that this is not the right way. But maybe you know how to get to the internal data of the effect from the script, such as the string name of the shader?

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
Community Expert ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

the simplest way to pass data to a script is to define an argument in the

javascript function, and call that function using AEGP_ExecuteScript(),

with a string containing the function name and arg. (for example:

"myFunction('string arg');")

alas, i don't what triggers that script, and does that component have

access to the relevant data to determine the correct value.

so: what determines that string's value? you mentioned it's happening

during USER_CHANGED_PARAM. can the same decision making happen at other

times?

On Mon, Dec 10, 2018 at 9:22 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

need the opposite, from script get access to effect internal data. how am i doing now, I collect data and call AEGP_ExecuteScript where app.settings.saveSetting I save my data. But I need to know the key by which I saved. So I’m trying to keep this key in the param name

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
Community Expert ,
Dec 10, 2018 Dec 10, 2018

Copy link to clipboard

Copied

we seem to miss the mark with our dialogue...

if the param name is being determined during USER_CHANGED_PARAM, can it not

be determined at some other time, such as when ExecuteScript is being

called?

(when you said you keep effect instance data stored in the app settings i

got that i don't understand your process at all)

On Mon, Dec 10, 2018 at 10:00 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Mar 26, 2019 Mar 26, 2019

Copy link to clipboard

Copied

Hello,
"in any case, UPDATE_PARAMS_UI will be sent on the first time the effect

instance is visible on the ECW, and not necessarily right after

SEQUENCE_RESETUP."

But i don't catch PF_Cmd_UPDATE_PARAMS_UI cmd after SEQUENCE_RESETUP.

I try call PF_UpdateParamUI in PF_Cmd_SEQUENCE_RESETUP cmd, but without result

help find a way to solve this problem

Thanks!

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
Community Expert ,
Mar 26, 2019 Mar 26, 2019

Copy link to clipboard

Copied

UPDATE_PARAMS_UI should indeed be called after SEQUENCE_RESETUP, but in the

sense of "never before", not in the sense of "always follows".

UPDATE_PARAMS_UI is called when AE thinks an update may be needed, as in

the case of a project being loaded from disk.

sometimes SEQUENCE_RESETUP is called for benign reasons, such as render

thread syncing with ui thread, or even if the effect was copied regardless

of being pasted). in such cases AE might not call UPDATE_PARAMS_UI after

SEQUENCE_RESETUP.

On Tue, Mar 26, 2019 at 8:26 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Mar 26, 2019 Mar 26, 2019

Copy link to clipboard

Copied

Is there a way to ask force for it?

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
Community Expert ,
Mar 26, 2019 Mar 26, 2019

Copy link to clipboard

Copied

suites.AdvAppSuite2()->PF_RefreshAllWindows()

it's pretty violent, but if you don't call it every other second you should

be ok.

On Tue, Mar 26, 2019 at 9:54 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

I call suites.AdvAppSuite2()->PF_RefreshAllWindows()

but, nothing happened.

Cmd PF_Cmd_UPDATE_PARAMS_UI don't call

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
Community Expert ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

do you get that call at all? did you set PF_OutFlag_SEND_UPDATE_PARAMS_UI

in global setup?

On Wed, Mar 27, 2019 at 8:09 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

Yes, I setup PF_OutFlag_SEND_UPDATE_PARAMS_UI

    out_data->out_flags = PF_OutFlag_PIX_INDEPENDENT |
        PF_OutFlag_SEQUENCE_DATA_NEEDS_FLATTENING |
        PF_OutFlag_SEND_UPDATE_PARAMS_UI |
        PF_OutFlag_USE_OUTPUT_EXTENT |
        PF_OutFlag_DEEP_COLOR_AWARE |
        PF_OutFlag_WIDE_TIME_INPUT;

and I call in SequenceResetup

suites.AdvAppSuite2()->PF_RefreshAllWindows();

but cmd PF_Cmd_UPDATE_PARAMS_UI don't call, Only if I click on a layer, I catch this cmd in EntryPointFunc

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
Community Expert ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

is the effect fully visible in the ECW and you still don't get an

UPDATE_PARAMS_UI call?

On Wed, Mar 27, 2019 at 8:52 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Community Beginner ,
Mar 28, 2019 Mar 28, 2019

Copy link to clipboard

Copied

LATEST

Screenshot_1.png

This I see after load project

Screenshot_2.png

And, this I see after click on layer

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
Community Beginner ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

I also tried, AEGP_SetStreamValue in SequenceResetup, but I get AE error

"After Effects warning: A plugin is attempting to do an invalid operation: using wrong thread to access project

( 1 :: 0 )"

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
Community Expert ,
Mar 27, 2019 Mar 27, 2019

Copy link to clipboard

Copied

as for using SetStreamValue during sequence resetup, that's indeed an

invalid operation.

the sequence resetup can happen before AE associates the effect with a

layer, so param streams are not yet available for access.

On Wed, Mar 27, 2019 at 8:55 PM yuriy_levchenko <forums_noreply@adobe.com>

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
Engaged ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

https://forums.adobe.com/people/shachar+carmi  wrote

technically, you can change param names during USER_CHANGED_PARAM, however,

conceptually, it should be done during UPDATE_PARAMS_UI.

the latter, is sent when in instance is either created or loaded (and a

bunch of other occasions).

On Sun, Dec 9, 2018 at 6:30 PM yuriy_levchenko <forums_noreply@adobe.com>

This is not true according to SDK Manual it is the other way around..

I am confused too - this is by far the most complicated SDK ever written. (For something as simple as rendering a few pixels)

I quote

""

Only cosmetic changes may be made in response to this command. Don’t change parameter values while responding to PF_Cmd_UPDATE_PARAMS_UI; do so during PF_Cmd_USER_CHANGED_PARAM instead.

""

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
Community Expert ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

actually that quote says exactly what i have said.

the changing of param names is a "cosmetic" operation, and therefore

belongs in PF_Cmd_UPDATE_PARAMS_UI.

changing param VALUE is not "cosmetic" and therefore doesn't belong

in PF_Cmd_UPDATE_PARAMS_UI, but instead should be done during

PF_Cmd_USER_CHANGED_PARAM.

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
Engaged ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

???

you said

technically, you can change param names during USER_CHANGED_PARAM, however,

conceptually, it should be done during UPDATE_PARAMS_UI.

suggesting it should be done in UPDATE_PARAMS_UI which according to SDK Manual is not legal

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
Community Expert ,
Jan 03, 2019 Jan 03, 2019

Copy link to clipboard

Copied

that is exactly what i suggested.

where does it say that param names can't be changed during UPDATE_PARAMS_UI?

(hey, i might be wrong, but to the best of my knowledge this is the way

it's supposed to be done)

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