简体   繁体   English

如何将参数实际值更改/更新为 UI 参数值? (后效果 sdk,C++)

[英]How do I change/update the parameter actual value to UI parameter value? (after effects sdk, c++)

How do I change/update the parameter actual value to UI parameter value?如何将参数实际值更改/更新为 UI 参数值? (after effects sdk). (后效果 sdk)。 When I go test the plugin, I change value of AUDIOSLIDER1 to a number higher than 5. Then, the AUDIOSLIDER2 actual value changes (inside the code) but not on the user interface.当我 go 测试插件时,我将AUDIOSLIDER1的值更改为大于 5 的数字。然后, AUDIOSLIDER2实际值发生变化(在代码内部),但在用户界面上没有变化。

RUNTIME AUDIOSLIDER2 ACTUAL VALUE IS 45运行时 AUDIOSLIDER2实际值为 45

RUNTIME USER INTERFACE AUDIOSLIDER2 VALUE DID NOT CHANGE and should be 45运行时用户界面AUDIOSLIDER2更改,应为 45

AFTER EFFECT SDK: https://ae-plugins.docsforadobe.dev/index.html后效 SDK: https://ae-plugins.docsforadobe.dev/index.html

static PF_Err
paramChanged(
    PF_InData* in_data,
    PF_OutData* out_data,
    PF_ParamDef* params[],
    PF_SmartRenderExtra* extra)
{
    PF_Err  err = PF_Err_NONE;

    int test = 100;

    if (params[SKELETON_AUDIOSLIDER1]->u.fs_d.value > 5.0f) {

        //the slider value will be set to 45.2
        params[SKELETON_AUDIOSLIDER2]->u.fs_d.value = 45.2f;

    
        //how to change the slider UI to reflect this change
        

    }


    return err;

}

Have a look at the example project "Supervisor":看看示例项目“Supervisor”:

params[SUPER_SLIDER]->u.sd.value = INT2FIX(50);
params[SUPER_SLIDER]->uu.change_flags = PF_ChangeFlag_CHANGED_VALUE;

You have to pass a flag that tells AE the UI has been modified您必须传递一个标志,告诉 AE UI 已被修改

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM