13 Replies Latest reply on Feb 27, 2016 8:49 AM by LightroomStatistics

    getDevelopSettings().Exposure2012 returns -999999

    LightroomStatistics Level 1

      In my Relative adjustments plug-in I use the getDevelopSettings() to get the original values for, for example, Exposure2012.


      One client had a problem and diving into this I discovered that when, for example when retrieving the Exposure setting, in some cases LR returns -99999 instead of the real values. Although, when navigating to the image, the settings in de Basic panel are correct.
      This client is on LR5.



      1. Run the test plug-in below on a large folder (> 200) with RAW files
        Sometimes the error occurs direct, sometimes after applying a setting on a undeveloped image.
      2. Otherwise
        1. (Create a new catalog, Best to experiment on a new catalog)
        2. Import 200 - 300 RAW photos
        3. Select them all and apply Auto-Tone to all of them (Library module & Grid) -> Right mouse click -> Develop settings -> Auto tone.
        4. Run the code below and see what's in the log file.

      On some photos this -99999 is returned and on others not. Mostly on photos not visible on screen.

      When in Develop mode, I scroll through all the photos manually, then afterwards it seems fine. Caching problem??



      • Any tips & tricks how to solve this issue?
      • Did I miss some thing?
      • How can I correct this behavior?



      local info =
          LrSdkVersion        = 4.0,
          LrToolkitIdentifier = 'com.LightroomStatistics.lightroom.develop.test',
          LrPluginName        = "Test",
          LrPluginInfoUrl     = 'http://www.LightroomStatistics.com/',
          LrAlsoUseBuiltInTranslations = true,
          VERSION = { major=0, minor=1, revision=1, build=0, },
          LrHelpMenuItems = {
                  title = "List exposure setting photos",
                  file = "ShowSettings.lua",
      return info



      local LrTasks = import 'LrTasks'
      local catalog = import "LrApplication".activeCatalog()
      local ProgressScope = import 'LrProgressScope'
      local LrDialogs = import 'LrDialogs'
      local LrView = import 'LrView'
      local LrPathUtils = import 'LrPathUtils'
      local LrFileUtils = import 'LrFileUtils'
      local logFilename = 'ExposureSettings'
      local myLogger = import 'LrLogger'( logFilename )
      myLogger:enable( "logfile" )
      Name        emptyLogFile
      Purpose        Clears the existing log file.
      From cookbook: http://cookbooks.adobe.com/post_Clearing_your_logfile_automatically-19677.html
      function emptyLogFile()
          --local myLogger = import 'LrLogger'( 'Stash' )
          logPath = LrPathUtils.child(LrPathUtils.getStandardFilePath('documents'), logFilename .. ".log")
          if LrFileUtils.exists( logPath ) then
              local success, reason = LrFileUtils.delete( logPath )
              if not success then
                  logger:error("Error deleting existing logfile!" .. reason)
          myLogger:enable( "logfile" )
      Main function
      Name        Select images
      Purpose        This plug-in will select every second photo.
                  The selected photo is the first photo to be selected and then every second
                  photo will also be selected.
      Version        1.0
      Developer    D. Holtman
      LrTasks.startAsyncTask( function()
          --    Get all the selected photos and the active photo
          local cat_photos = catalog:getTargetPhotos()
          local nCountSelected = #cat_photos
          myLogger:info('List table develop settings')
          for i, photo in ipairs(cat_photos) do
              local devSettings = photo:getDevelopSettings()
              local name = photo:getFormattedMetadata( "fileName" )
              myLogger:info('Photo', name, devSettings.Exposure2012)
          LrDialogs.message('Listing exposure', 'Finished')