I dont know what the problem is, but I've solved this kind of thing before by doing the export in two phases
1. just do the photo settings (on initial export - no need to render anything).
2. do the final exporting (on a subsequent export - rescheduled).
I've never tried the export filter to do this sort of thing, but that might work too.
Don't know if this is exactly right but might give you some ideas...
it's an intersting approach but the question is how to trigger the second export process without any interaction by the user? As far as I know there isn't any way, is there?
One way: Create a new export session then call do-export-on-new-task.
that is what I tried. But then the exportContext is changed in a stupid way: AgExportRendition:recordRemotePhotoId: can only be called when doing publish
it looks like that the export works well but the publish service was left before :-( That is really terrible!!!!! Any other ideas? ;-)
@Adobe: why isn't there a function/hook etc. to walk in BEFORE any rendering is started and the user has access to the photos???
I think a (sometimes lengthy) task needs to run in Lightroom to really apply the develop settings, before you go a-rendering.
Try sleeping a long while after applying the preset, I bet after a good wait those settings will be active for the rendering.
bad news: it doesn't work to sleep. I mean LR sleeps and is applying the preset, but doesn't export the file with the new preset.
After studiing the manual it wrotes that the processRenderedPhotos is called after the internal rendition, so I assume that there is no other way then exporting the file two times (as you suggested in your first response).
But this doesn't work in a publishing environment: when I set up a new LrExportSession object and make a exportSession:doExportOnNewTask the "real render" works well, BUT the methods rendition:recordPublishedPhotoId( ) and rendition:recordPublishedPhotoUrl( ) are not working because LR is guessing that it is not a publish operation.
Well actually I have no idea how to solve this... It would be nice to hear from somebody from Adobe how to solve this issue (manuel set up a LrExportSession for a publishing service?)
Yeah - too bad.
If you make a "petition" (read: Feature Request) for an LrPublishSession I'll "sign" it (read: +1 vote) - I know at least one other plugin maker would use it too.
Even just a menu item to start a publish would allow you to use an autokey script to start it.
I'm out of ideas too at the moment.
Good luck and let me know if you think of anything - I'll do the same...
why dont you use a LrExportFilterProvider ?
i use it for manipulating the metadata before rendering...