Pages: [1] 2   Go Down

Author Topic: Open as Smart Object as default  (Read 968 times)

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Open as Smart Object as default
« on: July 08, 2022, 09:32:51 am »

Does anyone know if it is possible to make "Open as Smart Object" the default setting for Ctrl-E in LR? Just to be explicitly clear, I am editing a DNG file in LR and then finishing in PS.

john beardsworth

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4740
    • My photography site
Re: Open as Smart Object as default
« Reply #1 on: July 08, 2022, 10:26:04 am »

No, you can't.
Logged

jrsforums

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1229
Re: Open as Smart Object as default
« Reply #2 on: July 08, 2022, 01:40:06 pm »

With either Loupedeck CT (or Live) or Stream deck, you can create a button action with multiple steps that will do that….or other similar actions.
Logged
John

leuallen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 447
Re: Open as Smart Object as default
« Reply #3 on: July 08, 2022, 05:36:00 pm »

You could do it with AutoHotKey (Windows only, sorry Mac and free. There may be a Mac equivalent. I don't know cause I don't do Apple). It is not terribly hard to learn for what you want to do if you have a little programming experience. I have hot keys for many functions that Lightroom did not provide keys for but which I use often. For example, press a key to go to PS, I could probably (and did) adapt that to go as a Smart Object. Could also probably set up on a control pad such as Genovation CP24 ($85-$100). I use both and find them indispensible. Lightroom becomes much faster and easier to use if you have a good set of hot keys that suit your workflow. Just noticed that I had a macro  (AutoHotKeys) that did just what you need but I needed the key for a different macro so I scrapped it. Don't use Smart Objects much.

I can't find the Smart Object macro but here is the macro to Open as Layers which is in the same menu as Smart Objects so you would just substitute the Smart Objects position for the position of Open with Layers. This is AutoHotKey. This the macro below.

;Start

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetTitleMatchMode, 2
IfWinActive, Lightroom
{

; other macros here

#5:: ; open as layers in Photoshop
   SendInput g  ; go to Grid in Library mode.
;   sleep,500 ; not used left for testing. A delay to allow the computer to catch up.
   SetTitleMatchMode, 2 ; Substring match. Set up the next command for desired use.
   WinMenuSelectItem, Classic,, 4&, 10&, 18&
   ;MsgBox, 0, Ya Hoo, Opening as Files Layers, 3 ; test to see if it gets here
   return
}

; End

It is fairly simple. #5 means the Win Key + 5 is the hot key. Your choice.
WinMenuSelectItem is where the work is done. It defines LR Classic as the program it run in, 4& means the 4th menu at the top (Photo), 10& means the 10th item down in that menu (dividing lines are counted) which is Edit In.  18& is the position of Open in Layers. You would change that to 15&, the position of Smart Objects.

Text following a ; are comments and are not processed.
MsgBox is commented out. Used for testing.

You can see it is fairly simple. Once you have this macro you can extend it to any item in the menus regardless if they have a hot key or not.

You can use this macro by pressing Win Key + 5 or as I did, I assigned #5 to a key on Genovation so that it was a labeled single key press. If you don't want the Genovation just use the AutoHotkey macro. I have not used this macro lately so if it does not work check the position of the commands on your version of LR. I generally use the Win Key as a hot key because LR does not use it and therefore no conflicts.

As an example of a very useful timesaving macro (using Genovation only) I use when I batch process files for noise reduction using Dxo. The processed files come back stacked but with the original file on top. Dumb. You need the processed file on top because that is the one you are going to work on. Fortunately the files are arranged in a systematic manner. I have all files open stack and select the first stacks processed file. Press my hot key and it moves the processed file to the top of the stack, closes the stack and moves to the next processed file so I can repeat the process. I just sit there and press the hot key until all the files are done. I have tried setting it to a repeating key but it sometimes messes up so this method is better as I can correct any errors easily. There may be 50-200 files so moving with the mouse is quite tedious.

You only need Genovation if the program has hot keys for all the operations you wish to execute. AutoHotkeys is needed if there is no hot key for some of the commands you wish to execute. In the above macro for Smart Objects, there is no hot key for Smart Objects so you have to create one based upon its position in the menus. Caution: in new upgrades to LR it is possible that the command you wish to execute will have its position changed in the menu. It is easy to change the numbers to the new position if you are aware of this.

AutoHotKey can be compiled so it runs very fast. You can Google this, there are tons of tutorials and videos.


Logged

john beardsworth

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 4740
    • My photography site
Re: Open as Smart Object as default
« Reply #4 on: July 09, 2022, 05:23:15 am »

Does anyone know if it is possible to make "Open as Smart Object" the default setting for Ctrl-E in LR? Just to be explicitly clear, I am editing a DNG file in LR and then finishing in PS.

The risk of doing this comes later when you want to make further PS edits to a TIF/PSD file with a DNG smart object layer.

Normally Ctrl-E would ask if you want to edit the original TIF/PSD or make a copy. But remapping Ctrl E to Open as Smart Object would remove this choice and would simply send the TIF/PSD as a smart object layer into a brand new PS file.
Logged

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Re: Open as Smart Object as default
« Reply #5 on: July 09, 2022, 08:51:49 am »

John, I understand your point. I wouldn't remap Ctrl+E, I'd use Win+E as suggested by leuallen. Ctrl+E for tif/ps* makes sense for the reasons you specify.

leuallen, thanks for your extensive reply and the macro. I'll have to see if I can grok AutoHotKey.

Simon J.A. Simpson

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 523
Re: Open as Smart Object as default
« Reply #6 on: July 09, 2022, 11:46:31 am »

Right click (Mac ctrl+click) on the image you want to open.  From the contextual menu select 'Edit In' and then 'Open as Smart Object in Photoshop…'.

Not as slick as a keystroke though.

Any use ?
Logged

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Re: Open as Smart Object as default
« Reply #7 on: July 09, 2022, 12:43:17 pm »

Thanks, Simon, not for me, but perhaps others. I think AutoHotKey is a fairly simple way to; syntax reminds of my old programming days when I was writing scripts in DOS.
leuallen, I am assuming that since you posted the script I can copy and use it?
« Last Edit: July 09, 2022, 12:46:18 pm by David Eckels »
Logged

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Re: Open as Smart Object as default
« Reply #8 on: July 09, 2022, 01:23:00 pm »

This is what I came up with:

;Start

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
#Warn  ; Recommended for catching common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetTitleMatchMode, 2
IfWinActive, Lightroom
{

; other macros here

#E:: ; open as Smart Object in Photoshop (press Win+E)
   SendInput g  ; go to Grid in Library mode.
;   sleep,500 ; not used left for testing. A delay to allow the computer to catch up.
   SetTitleMatchMode, 2 ; Substring match. Set up the next command for desired use.
   WinMenuSelectItem, Classic,, 4&, 10&, 16&
   ;MsgBox, 0, Ya Hoo, Opening as Smart Object, 3 ; test to see if it gets here
   return
}

; End


In the WinMenuSelectItem line, can I assume "Classic,," is a finger stutter and it should be "Classic," and also that dividing lines are to be counted in the sub-menu?

leuallen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 447
Re: Open as Smart Object as default
« Reply #9 on: July 09, 2022, 06:45:14 pm »

Quote
can I assume "Classic,," is a finger stutter and it should be "Classic," and also that dividing lines are to be counted in the sub-menu?

No, if I remember two commas with nothing between indicates an option not used. Check me on this, go to AutoHotKey help and look up the item. Or you can test the macro, if it works with, use otherwise use one comma. I am pretty sure two commas is correct.

Yes dividing lines count.

Have you gotten the macro to work?

You might want to pick up the free text editor, SciTE4AutoHotkey. Google it. This is a syntax colored simple text editor that has a lot of features that make the programming easier
Logged

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Re: Open as Smart Object as default
« Reply #10 on: July 10, 2022, 09:14:33 am »

Works like a charm!  :) :) :)
Final version:

;Start

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

SetTitleMatchMode, 2
IfWinActive, Lightroom
{

; other macros here

#e:: ; open as Smart Object in Photoshop (press Win+E)
   SendInput g  ; go to Grid in Library mode.
   SetTitleMatchMode, 2 ; Substring match. Set up the next command for desired use.
   WinMenuSelectItem, Classic,, 4&, 10&, 16&
   return
}

; End


UPDATE:  Only issue is you cannot use Win+e from Development module; you must be in Grid or Loupe view. Ctrl+e works just fine from all.
« Last Edit: July 10, 2022, 09:34:25 am by David Eckels »
Logged

leuallen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 447
Re: Open as Smart Object as default
« Reply #11 on: July 10, 2022, 10:27:52 am »

The SendInput G line sends you to the Library module in grid. Remove that and see what happens. It is there because some commands only work in the Library module.

Now that you have your first macro can you think of anything else that you would like a macro for. I have tons of them and they make LR easier to use and faster workflow.

For example when you have stacked images and they are collapsed and you reject one, the file underneath is not rejected. Most of the time you want that rejected too. There is a plug in which transfers this info (and much more if you like) to the files under the stack. I use it all the time. Have made a macro which call it up with a set of keystrokes. Have other plug ins that I use all the time and have given them macros.

You can make the the macro file auto load when you boot if you like. It must be compiled which is very easy to do.

Sometimes it is worth it to spend a couple of hours to automate something that you use frequently and is a pain to keep doing over and over.

Good luck
Larry
Logged

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Re: Open as Smart Object as default
« Reply #12 on: July 10, 2022, 09:09:14 pm »

Yes, the SendInput G goes to grid and stops. Win+e again, sends a SO version to PS. Removing it doesn't fix it. But I have been thinking about this, and I bet there's a way to set of an "if, then" branch point to accommodate the different menu structure of the Develop module. I'll have to research that. If anyone is following this thread with interest, I will post a more robust version.
Thanks a bunch, Larry.

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1790
    • Frank Disilvestro
Re: Open as Smart Object as default
« Reply #13 on: July 11, 2022, 12:07:10 am »

Thank you Larry and David for this interesting and useful information

If anyone is following this thread with interest, I will post a more robust version.

I am!

leuallen

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 447
Re: Open as Smart Object as default
« Reply #14 on: July 11, 2022, 03:51:31 am »

Dave, you are getting into it. Thinking like a programmer now.
Logged

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Re: Open as Smart Object as default
« Reply #15 on: July 11, 2022, 01:26:51 pm »

OK! I think I have worked it out. Below you can find the script that belongs in a .AHK file, which you can use in AutoHotKey; download here. I have also compiled a .exe version; PM me with your email if you would like to have it. It is easy to compile your own if you download AutoHotKey.

I have tested this script to see if I can open a Smart Object (SO) from either the Library (Grid and Loupe views) or the Develop modules in the current version of LR. After loading this script, it only works in Windows AFAIK by pressing Win+E. I have also tested to see that the hotkey script remains active following the first image when selecting a different image in LR. Please let us know if you have issues on this thread. THANKS TO LARRY!
Good luck.

LR to PS SO script below:

; Start
; LR to PS SO AHK script
; Opens Smart Object in Photoshop from either Library or Develop Lightroom modules
; The next 4 lines are required for .AHK files

#NoEnv  ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn  ; Enable warnings to assist with detecting common errors.
SendMode Input  ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir%  ; Ensures a consistent starting directory.

#Persistent ; Script remains active following exit

   #e:: ; open as Smart Object in Photoshop (press Win+E)
   SetTitleMatchMode, 2 ; Substring match. Set up the next command for desired use.
   If WinActive("Develop") ; check if Develop module active, if yes...
   Gosub Develop
   Else Gosub Library ; if active window is Library, Grid, or Loupe view
   Exit

   Library:
{
   WinMenuSelectItem, Classic,, 4&, 10&, 16&
   Return
}
   
   Develop:
{
   WinMenuSelectItem, Classic,, 4&, 6&, 16&
   Exit
}
; Finish

fdisilvestro

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1790
    • Frank Disilvestro
Re: Open as Smart Object as default
« Reply #16 on: July 11, 2022, 05:29:46 pm »

Awesome!

jrsforums

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1229
Re: Open as Smart Object as default
« Reply #17 on: July 11, 2022, 06:36:59 pm »

Congrats, Dave….nice programming job.  I am not much into programming….and am not a fan of hot keys….to many to remember and, I guess, I am more of a visual person.  So, I have always liked menus/dropdowns.  However, they are, obviously not as fast.

As I mentioned in early post, what you wanted to do could be very easily done using Loupedeck or any model of ‘Stream Deck’, by capturing the keystrokes and saving as a ‘multi action’.

I have both units (actually 2 SDs and 1 LD-CT).  In pix below, I show how you could easily do what you did (in about 5 min) on SD (would be similar on LD). Loupedeck also has a great interface to LRC macro to allow control of many items and sliders and masking, etc.
Logged
John

jrsforums

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 1229
Re: Open as Smart Object as default
« Reply #18 on: July 11, 2022, 06:40:49 pm »

Here is example of Stream Deck screen I use along with Loupedeck….mainly for ease of use and add’l keys open at same time.

Logged
John

David Eckels

  • Sr. Member
  • ****
  • Offline Offline
  • Posts: 3027
  • It's just a camera.
    • Website
Re: Open as Smart Object as default
« Reply #19 on: July 11, 2022, 08:12:11 pm »

John, I'm sure there are at least two ways to do what I did, and more... But then I wouldn't have had the fun of learning a new programming language! Aahhh, it takes me back to the good old days of Fortran and Basic, which I used to capture data off my lab instruments in the 70s and 80s!
I don't use many macros at all, indeed, only this one and maybe I'll write a variation to auto open in layers, as Larry has done. Most of my needs are quite easily met using LR presets. But if there are others following this thread, it is good to have alternatives, so thank you.
Pages: [1] 2   Go Up