Hi,
I'm making an exporter plug-in using PPro SDK 5.5.
I noticed that the value range of a param went wrong if I export a sequence twice. For example, if I register "MyAwesomeParam" with min value of 10 and max value of 20, at first export if I enter 0, it jumps to 10 because the entered value is smaller than the min value. But in second export, if I enter 0, it stays 0.
Have any of you encounterer this problem? Is there a workaround for it? Please tell me if you know anything about this, since the SDK guide and sample offered very little help.
Thanks
it's because AME caches settings of prior jobs. I noticed this too. it doesn't run exSDKGenerateDefaultParams(), only exSDKPostProcessParams(). So, you never had the code run that set the max, min etc.
In exSDKPostProcessParams you need to read every parameter and than fix all the fields - the only thing you can trust is .value, all the others like .maxrange.value, .minrange.value .hidden, .disabled, etc are potentially corrupted so you need to fix them and write them back (ChangeParam())
eg: This is my Frame Rate code in exSDKPostProcessParams. I setup the string labels but more importantly I read, fix and write the frameRateValues structure.
// --------------------------
// "Frame Rate (fps)" [TEXT]: [DROPBOX]
copyConvertStringLiteralIntoUTF16(STR_FRAME_RATE, tempString);
lRec->exportParamSuite->SetParamName( postProcessParamsRecP->exporterPluginID,
0,
ADBEVideoFPS,
tempString);
// Get the preset
lRec->exportParamSuite->GetParamValue(postProcessParamsRecP->exporter PluginID,
0,
ADBEVideoFPS,
&lRec->frameRateValues);
// Update local storage
lRec->frameRate = lRec->frameRateValues.value.timeValue;
lRec->frameFPS = (float)ticksPerSecond / (float)lRec->frameRate;
// Fix the broken fields (only trust "intValue")
lRec->frameRateValues.structVersion = 1;
lRec->frameRateValues.rangeMin.timeValue = 1;
lRec->timeSuite->GetTicksPerSecond (&lRec->frameRateValues.rangeMax.timeValue);
lRec->frameRateValues.disabled = kPrFalse;
lRec->frameRateValues.hidden = kPrFalse;
lRec->frameRateValues.optionalParamEnabled = kPrFalse;
// Write back to AME preset storage
lRec->exportParamSuite->ChangeParam(postProcessParamsRecP->exporterPl uginID,
0,
ADBEVideoFPS,
&lRec->frameRateValues);
// FRAMES PER SECOND DROP BOX VALUES
lRec->exportParamSuite->ClearConstrainedValues( postProcessParamsRecP->exporterPluginID,
0,
ADBEVideoFPS);
for (int i = 0; i < sizeof(frameRates) / sizeof (PrTime); i++)
{
tempValue.timeValue = frameRates[i];
copyConvertStringLiteralIntoUTF16( (wchar_t *)frameRateStrings[i], tempString);
lRec->exportParamSuite->AddConstrainedValuePair( postProcessParamsRecP->exporterPluginID,
0,
ADBEVideoFPS,
&tempValue,
tempString);
}
North America
Europe, Middle East and Africa
Asia Pacific