8 Replies Latest reply on Feb 16, 2011 6:21 PM by areohbee

    exportServiceProvider.allowFileFormats

    jovenator Level 1

      I am trying to write a publish service provider that works with originals only. When I set the allowFileFormats to { 'ORIGINAL' }, the File Settings section in the configuration dialog is grayed out with Original selected. This is what I expect. But when I publish photos, they are always rendered as jpgs. If I remove the allowFileFormats setting from my plugin and explicitly choose Original in the File Settings section, then the photos are rendered in their original form. This sounds like a bug to me. Is there anything I can do to work around this?

       

      Thanks!

      Andy

        • 1. Re: exportServiceProvider.allowFileFormats
          areohbee Level 5

          Try hiding all formats and just explicitly set the format to 'ORIGINAL'.

          • 2. Re: exportServiceProvider.allowFileFormats
            jovenator Level 1

            I've tried hiding all formats but still see the same problem. Do I need to do anything to explicitly set the format to ORIGINAL? Its not obvious how I can programatically change the built-in settings.

             

            Thanks!

             

            Andy

            • 3. Re: exportServiceProvider.allowFileFormats
              areohbee Level 5

              jovenator wrote:

               

              Do I need to do anything to explicitly set the format to ORIGINAL?

               

              Yes - you have to set the LR_format export property before the export has been started.

               

              I dont know how your export is getting kicked off but, somewere there needs to be line like:

               

              exportParams.LR_format= 'ORIGINAL'

               

              Here's a cut from NxTooey for exporting a tif:

              ------------------------------------------------------

                  local params = {}
                  params.LR_collisionHandling = 'rename' -- this should never happen - I'll be checking in case it does.
                  params.LR_export_bitDepth = 16
                  params.LR_export_colorSpace = prefs.tifColorSpace
                  params.LR_export_destinationType = "sourceFolder"
                  params.LR_export_useSubfolder = false
                  params.LR_extensionCase = "lowercase"
                  params.LR_format = "TIFF"
                  params.LR_initialSequenceNumber = 1
                  params.LR_jpeg_limitSize = 100
                  params.LR_jpeg_quality = 1
                  params.LR_jpeg_useLimitSize = false
                  params.LR_metadata_keywordOptions = "lightroomHierarchical"
                  params.LR_minimizeEmbeddedMetadata = false
                  params.LR_outputSharpeningLevel = 2
                  params.LR_outputSharpeningMedia = "screen"
                  params.LR_outputSharpeningOn = false
                  params.LR_reimportExportedPhoto = false
                  params.LR_reimport_stackWithOriginal = false
                  params.LR_reimport_stackWithOriginal_position = "below"
                  params.LR_renamingTokensOn = true
                  params.LR_size_doConstrain = false
                  params.LR_size_resolution = 240
                  params.LR_size_resolutionUnits = "inch"
                  params.LR_tokenCustomString = ""
                  params.LR_tokens = LrPathUtils.removeExtension( filename )
                  params.LR_useWatermark = false
                  params.LR_watermarking_id = "<simpleCopyrightWatermark>"
                 
                  local exportSession = LrExportSession {
                      photosToExport = { photo },
                      exportSettings = params,
                  }
                  exportSession:doExportOnCurrentTask() -- block until all renditions are created.

               

              ------------------------------------------------------

              Rob

              • 4. Re: exportServiceProvider.allowFileFormats
                jovenator Level 1

                Thanks Rob that worked great!

                • 5. Re: exportServiceProvider.allowFileFormats
                  areohbee Level 5

                  jovenator,

                   

                  I'm guessing if format is not specified, Lightroom defaults to jpeg or something.

                   

                  Glad you got it working!

                   

                  Cheers,

                  Rob

                  • 6. Re: exportServiceProvider.allowFileFormats
                    jovenator Level 1

                    Are these LR_xxx parameters documented somewhere?

                     

                    Thanks,

                    Andy

                    • 7. Re: exportServiceProvider.allowFileFormats
                      jovenator Level 1

                      Nevermind. Found em in the guide.


                      • 8. Re: exportServiceProvider.allowFileFormats
                        areohbee Level 5

                        They didn’t used to be, but they're in the pdf guide now - search for LR_format.

                         

                        In case you want to double-check the document, run a test export and dump the export params using exportParams:pairs() - export parameters are an ordinary observable property table.