1 Reply Latest reply on Jun 17, 2011 4:57 PM by Zac Lam

    Export parameters not remembered in prExport call


      Hi Zac et al,


      I have my export plugin coming along very nicely.

      All the parameters are drawing and reacting as I want...



      If I leave a file in the queue and reopen AME the parameters are the plug defaults (or garbage if not initialized).


      How does the User Preset (.epr) or one of the saved Presets get loaded into the parameters?


      I would have thought it HAD to call prValidateParameters after parsing the .epr and in turn changing all the GUI parameters.




      AME then changes all the parameters to the epr values then calls



      but it isn't doing that at all.


      Without that code path prExport starts with the prDefaultParameters (which is wrong since a generic default is not the same as the user's .epr).


      How is this supposed to work?


        • 1. Re: Export parameters not remembered in prExport call
          Zac Lam Adobe Employee

          Hi Edward,


          Not sure if you already worked this out, but here's some findings from testing with the SDK exporter.  The process of restoring the parameter values from a previous session or a preset should be automatic.  By the time exSelPostProcessParams is called, the param values from the preset should be loaded and accessible using GetParamValue().  The trick is to set the min/max ranges during exSelPostProcessParams (since that is the proper time to set those), without overwriting the param values that came from the preset.  For the slider param in the SDK Exporter, this code works:


              // Set the slider ranges, while preserving the current value
              exParamValues sliderValues;
              lRec->exportParamSuite->GetParamValue(exID, 0, ID_SLIDER, &sliderValues);
              sliderValues.rangeMin.floatValue    = 1.0;
              sliderValues.rangeMax.floatValue    = 50.0;
              sliderValues.disabled               = kPrFalse;
              sliderValues.hidden                 = kPrFalse;


          If you're seeing strange values coming in from presets, it could be that your presets were created with an older version of your plug-in, where the parameters were defined differently.  Since you don't have to worry about backwards compatibility yet, you might consider deleting them, flushing the parameter cache, and recreating the presets.