I have written a set of 2 plugins that do everything I need, except the first plugin needs to be invoked 4 times with different presets before the second plugin can do the final thing. I'd like to be able to do all steps using a single all-in-one plugin. I've figured out how to initiate a sequence of export sessions, but each export session gets the same property table. I can change individual properties in the table, but what I really want is to load different presets for each export session, so that image dimensions and everything else are whatever were defined in the specified preset. Any ideas? I suppose I can clone the first plugin 4 times and that way it'll use whatever the last presets were for it, but its kinda tacky. There has got to be a better way, but I dont know what it is. LrFilterContext???
I am not experienced enough with the LR SDK to guarantee that the following can be done, but maybe you could use the functionality provided by the LrPrefs namespace in a creative way to achieve your goal.
For example, could the preference table stored for your plugin have 4 sub-tables, each containing the preference set for 1 export. Then, one preference field in the top-level preference table could be used to indicate which one of the 4 sub-tables to use for preferences. This one preference could then be updated by your plug-in every time it runs. (I.e. increment by one, unless it is already 4, in which case set back to 1)
Your plug-in would have to have code in place to grab the appropriate settings, of course.
I guess you would also have to write initialization code to create the prefs table the first time the plug-in runs, when there is no prefs table present.