Hello,
I'm currently developing a Source Settings Plug-in with Importer and Effect (Effect from AE SDK).
I've already read the 2 discussions on the forum which deal with Source Settings :
I'm working with the last SDK versions.
What I've coded/understood for now
For the effect : I started with Skeleton. In the PiPL the "AE_Effect_Match_Name" is "ADBE Skeleton"
For the importer side, I tried to start coding from the "SDK File Importer" Example in the PPro SDK.
After that, I tried to connect the effect with the importer. I created a structure (flat) to communicate between the 2 sides (as written in the doc : the "prefs data"). I called this structure : "MyCommonStructure".
As written in the PPro documentation I added these things in the importer file to connect an effect for the Source Settings :
- imInit selector :
- hasSourceSettingsEffect = kPrTrue (on imImportInfoRec)
- imGetInfo8selector :
- wcscpy_s(fileInfo8->sourceSettingsMatchName, wcslen(L"ADBE Skeleton") + 1, L"ADBE Skeleton");
- imPerformSourceSettingsCommandselector :
- I fill the "MyCommonStructure" (created on the effect while PF_Cmd_SEQUENCE_SETUP) with informations of the source.
In the effect :
- PF_Cmd_SEQUENCE_SETUP Selector :
- AEFX_SuiteScoper<PF_SourceSettingsSuite> sourceSettingsSuite(in_data, kPFSourceSettingsSuite, kPFSourceSettingsSuiteVersion, out_data);
- MyCommonStructure prefsFromImporter = MyCommonStructure();
- sourceSettingsSuite.PerformSourceSettingsCommand(in_data->effect_ref, &prefsFromImporter, sizeof(MyCommonStructure));
- PF_Cmd_TRANSLATE_PARAMS_TO_PREF Selector :
- Change prefs in terms of the GUI sliders. With that prefs data (shared between Effect and Importer), the importer will answer to the GUI Slider change.
Behavior
When I load a ".sdk" file, the effect is not called (and not set to the source). The effect is present in the available effects list.
If I set the effect to the source, the PF_Cmd_SEQUENCE_SETUP is called and PerformSourceSettingsCommand works, it call the importer with the imPerformSourceSettingsCommand selector.
If I change the "sourceSettingsMatchName", there is the same behavior... It seems that this name is not used. I tried to set it as "Skeleton" and not "ADBE Skeleton" but there is the same behavior.
PF_Cmd_Render is called and not PF_Cmd_TRANSLATE_PARAMS_TO_PREF.
On the importer side, no selector is called when I trigger a param of the effect.
Test
The "PrSDKAESupport.h" which contains the SourceSettings Suite is in version 1 in AE SDK. So I can not used the "SetIsSourceSettingsEffect" function as it is indicated in documentation. So I replaced the "PrSDKAESupport.h" in AE SDK by the same file from PPro SDK.
=> PF_Cmd_Render is not called anymore, but PF_Cmd_TRANSLATE_PARAMS_TO_PREF is still not called. On the importer side, no selector is called when I trigger a param of the effect.
Questions
- How can I get the effect auto applied to the source ?
- How can I remove the effect from the available effect list ? (So this effect will be used ONLY on source and set automatically).
- Why PF_Cmd_TRANSLATE_PARAMS_TO_PREF is never called ? How could I warn the importer to render a new frame, taking into account the new parameters from the effect ?
Thanks a lot for your attention,
Nicolas