Copy link to clipboard
Copied
In my custom exporter i add parameters with every new version / release. This causes a screwed up UI interface when the plugin is in an existing project.
The Parameter Caching section of the Adobe Premiere Pro SDK Guide tells me to use parameter versioning. I already use SetParamsVersion() for quite a long time now and with every parameter change I increase the version number. But this does not improve the situation. Users have still problems with malfunctioning UI parameters. Need to flush parameter cache or create new projects.
Can anybody please help me with that? What am I missing here?
Thanks,
Daniel
Copy link to clipboard
Copied
Hi Daniel,
That's good that you are calling SetParamsVersion() on exSelGenerateDefaultParams.
On exSelPostProcessParams, are you calling GetParamsVersion() and validating the existing parameter values that are loaded from the saved project? There may be some translation to do here if parameters have changed.
Copy link to clipboard
Copied
Thanks Zac, that was a hint in the right direction. Unfortunalety I don't find anything about this topic in the SDK guide.
But for me it is not about missing translations (not only). UI parameters are completely not shown, or the type, min/max, etc information and everything is gone.
Is there some documentation or example code about this on how to do this correctly? Or can you tell me what needs to be done if versions do not match?
Thanks again.
Daniel
Copy link to clipboard
Copied
Hey Daniel,
If you have a simple example of what you've done from one version to the next, I can take a look. Can you describe specifically how you want to change the parameters from one version to the next? For example, "parameter 3 was a slider, but for the next version, parameter 3 should be a checkbox and parameter 4 should be that slider". If you can give a simple example of what you're trying to do, and what is going wrong, I can look at the specific behavior. Also, could you share a couple different versions of your plug-in, and repro steps? Feel free to send it via a direct message on this forum.
Copy link to clipboard
Copied
exSelGenerateDefaultParams:
---------------------------
exNewParamInfo updateParam;
...
(just like in the example exporter / setting default, min and max value here too)
exportParamSuite->AddParam(pluginId, groupIndex, VKDRUpdateGroup, &updateParam);
exportParamSuite->SetParamsVersion(pluginId, paramVersion);
exSelPostProcessParams:
-----------------------
exportParamSuite->SetParamName(pluginId, groupIndex, VKDRUpdateButton, L"Label");
exportParamSuite->SetParamDescription(pluginId, groupIndex, VKDRUpdateButton, L"Description");
In case of dropdowns:
exportParamSuite->ClearConstrainedValues(pluginId, 0, ADBEVideoAspect);
exportParamSuite->AddConstrainedValuePair(...);
Other types (i.e. int):
----------------------
exParamValues paramValues;
exportParamSuite->GetParamValue(pluginId, groupIndex, paramInfo->name.c_str(), ¶mValues);
paramValues.rangeMin.intValue = paramInfo->min.intValue;
paramValues.rangeMax.intValue = paramInfo->min.intValue;
exportParamSuite->ChangeParam(pluginId, groupIndex, paramInfo->name.c_str(), ¶mValues);
- Issues occur when adding or removing new parameters.
- What is the correct way of post processing parameters (besides name and description)?
- How to correctly handle parameter versioning?
- What parameter fields ne to be (re-)set in that case?
Thanks alot for your help.
Copy link to clipboard
Copied
Hi Daniel,
Can you explain what parameters you are adding in the new version? And how does the Export Settings UI misbehave?
Thanks,
Zac
Copy link to clipboard
Copied
Here is an example:
I simply changed an existing parameter ("Color Format") id from "x264ColorFormat" to "x264ColorFormat2" in the VS debugger. This is both a removal of a parameter and an addition of a new one. So for the new id the code in both "exSelGenerateDefaultParams" and "exSelPostProcessParams" gets executed, everything alright. But there is still the cached data for the old parameter id which generates a "ghost" parameter marked with the red outline.
Some users also report effects like this:
Somehow everything except the current value got lost and all i did was adding new parameters (not removing any).
I hope this helps.
Copy link to clipboard
Copied
Is there maybe a way to flush all parameter caches and force the project to use the default parameters/values? At least as a workaround?
Copy link to clipboard
Copied
Hi Daniel, I see the direct message you sent me. Let me investigate.
Copy link to clipboard
Copied
Hello Zac. Do you have any idea what is causing this issue so far?
Copy link to clipboard
Copied
Hey Daniel,
I've built two versions of the sample exporter plug-in to simulate what you're doing, and I've reproduced the same behavior here. I've logged it as bug DVAPR-4208879.
The problem seems to be compounded by the presets. Without any presets, when you reopen the Export Settings after installing the updated plug-in, you'll see some parameter UI issues, but if you switch to a different format and back, the problem clears up. With presets, the problem remains.
Copy link to clipboard
Copied
Hey Zac,
Good thing you can reproduce the bug. I don't think there is a workaround for this issue, right?