8 Replies Latest reply on Feb 3, 2015 1:30 AM by Maxim3

    Develop setting names in LR3 and LR4,5

    Maxim3 Level 1

      Hello

       

      I'm trying to work with develop setting.

      to get current setting I use

      photo:getDevelopSettings()

       

      and for set settings I use

      LrApplication.addDevelopPresetForPlugin

      photo:applyDevelopPreset

       

      The problem is. If in LR3 (bot Mac and Win) I modify a settings with keyname "Contrast" then it is correctly applied this setting to LR's develop seting "Contrast" and everuthing works as it should.

       

      But in LR 4 and LR 5 it just create an inner plug-in seting with name "Contrast" what has not any affect on LR's setting "Contrast"

       

      I looked throw many pages of this forum and dint meet any mention about same problem. But I met what sometimes in some samples the develop settings are named as i.e "Exposure2012" instead of "Exposure".  There is a some special rules how to use setting's keys to access to standard LR develop settings independly of LR version?

        • 1. Re: Develop setting names in LR3 and LR4,5
          Maxim3 Level 1

          One note.

           

          If in LR menu I'll choose "Setting->Process->2010" then everything works well.

          Probably. it needs to count the currently used settings version 2010 or 2012. Somebody has a sample how to correct process setting versions in different versions of Lightrooms?

           


          • 2. Re: Develop setting names in LR3 and LR4,5
            johnrellis Most Valuable Participant

            Process version 2012 introduced a number of new develop settings, e.g. Contrast2012, Exposure2012, etc. See the API documentation for photo:getDevelopSettings().  The documentation doesn't seem to be maintained, so the most authoritative way to find out the names of develop settings is by printing the result of photo:getDevelopSettings().

            • 3. Re: Develop setting names in LR3 and LR4,5
              Maxim3 Level 1

              Now it is moreless clear what in LR3 i.e. the "Contrast" parameter has keyname "Contrast" and in LR4 it has keyname "Contrast2012". But what about i.e. localized versions of LR? If a LR is localized for a national characters then maybe the keyname also may be different, some like "Контрастность2012"? Where is a standard pattern how to correct process keynames independly on LR version?

              I met a sample on one forum but I'm not sure what it is a correct approach

              local settingsKeys = require('DevelopSettingKeys')

              ....

              logging:log(tostring(developSettings[settingsKeys.Exposure]))

              • 4. Re: Develop setting names in LR3 and LR4,5
                johnrellis Most Valuable Participant
                If a LR is localized for a national characters then maybe the keyname also may be different, some like "Контрастность2012"?

                No, all of the names in the SDK are as written in the documentation, in English (for better or worse).  They don't get localized to the installed language.

                • 5. Re: Develop setting names in LR3 and LR4,5
                  Maxim3 Level 1

                  Unfortunatelly "Lightroom SDK Guide.pdf" doesnt contain a list of settings keynames. The API Reference for LR5SDK contains i.e "Contrast" keyname. About "Contrast2012" it is possible to read only from forums.

                  If there is not a standard pattern how to work with different versions of LR then probably the simplest way is just check some global environment variable with LR version number and use keynames accordingly this value. 

                  • 6. Re: Develop setting names in LR3 and LR4,5
                    johnrellis Most Valuable Participant

                    The LR 5 SDK API Reference does mention the process version 2012 settings:

                    Untitled.png

                    However, as mentioned above, the documentation isn't well-maintained, so you're always better off double-checking it by dumping out the results of getDevelopSettings().  E.g. in LR, take a sample photo, set all the develop settings to non-default values, and then in a script invoke Debug.lognpp(photo:getDevelopSettings())  (using the Debug module from my debugging toolkit for Lightroom).

                     

                    probably the simplest way is just check some global environment variable with LR version number and use keynames accordingly this value.

                    Agreed.  You can get the version via LrApplication.versionTable().

                    • 7. Re: Develop setting names in LR3 and LR4,5
                      jarnoh Level 1

                      Check "ProcessVersion" in the photo development settings, Process Version 2012 is "6.7" (there also was a "6.6" for LR4 beta). 

                      • 8. Re: Develop setting names in LR3 and LR4,5
                        Maxim3 Level 1

                        Thanks Jarnoh

                        It is a valuable advice