Skip to main content
Participant
September 7, 2015
Question

《 command selectors》

  • September 7, 2015
  • 1 reply
  • 301 views

For effects plug-ins, After Effects sends command selectors (and relevant information) to the plug-in entry point function designated in the effects’ PiPL resource.


what is "selector "

This topic has been closed for replies.

1 reply

Inspiring
September 13, 2015

"Selector" is an enumerated integer value used in the switch-case statement in EntryPointFunc()

It is passed from AE to your plugin as the paramter "cmd", which is of type PF_Cmd (itself a type definition of a long integer)

DllExport

PF_Err

EntryPointFunc (

PF_Cmd  cmd,

PF_InData  *in_data,

PF_OutData  *out_data,

PF_ParamDef  *params[],

PF_LayerDef  *output,

void  *extra)

{

      PF_Err  err = PF_Err_NONE;

      try  {

            switch (cmd) {

                 case PF_Cmd_ABOUT:

                      err = About(in_data,out_data,params,output);

                      break;

                 case PF_Cmd_GLOBAL_SETUP:

                      err = GlobalSetup(in_data,out_data,params,output);

                      break;

                 case PF_Cmd_PARAMS_SETUP:

                      err = ParamsSetup(in_data,out_data,params,output);

                      break;

                  // etc...

          }

     }

}