feature request : missing input files when running a script

Moderator: jsachs

Post Reply
pierrelabreche
Posts: 528
Joined: January 29th, 2019, 11:47 pm
What is the make/model of your primary camera?: Nikon Z8

feature request : missing input files when running a script

Post by pierrelabreche »

Scenario
  • an input image files and its associated script are initially collocated when the output image is saved with a script.
  • <Afterwards, user moves both files to another location.
  • When running the script from the new location, during file open, PWP detects that input file(s) are missing.
  • When a file in the input list is missing, PWP pops up a panel asking interactively a path to the input file folder.
Suggestion
  • A user preference would indicate that when input files are missing, PWP would automatically search in the same folder as the script.
  • Alternatively, a relative path to the script folder could be provided.
jsachs
Posts: 4344
Joined: January 22nd, 2009, 11:03 pm

Re: feature request : missing input files when running a script

Post by jsachs »

Normally, the input and output images are in different folders to help preserve the non-destructive editing features of PWP. The dialog box does let you specify another folder to search in and remembers you choice in case you have multiple input images. I have looked at a number of alternate solutions to this problem. Automatically selecting file from a different folder carries the risk that you get the wrong file if you have two files with the same name.
Jonathan Sachs
Digital Light & Color
pierrelabreche
Posts: 528
Joined: January 29th, 2019, 11:47 pm
What is the make/model of your primary camera?: Nikon Z8

Re: feature request : missing input files when running a script

Post by pierrelabreche »

Other editors including DxO Photolab, Nikon NX Studio can export processed image files in the same folder as the original image. Thus, collocating input and output images in the same folder is a common case. Nikon Studio, for example, saves the image adjustments sidecar files in a subfolder where input images are located. DxO Photolab simply saves DOP sidecar files in the same folder as the input images. The DOP files remain valid after moving the folder.

However, I also understand the benefits of separating input and output images in different folders.

The problem could be tackled by considering two cases:
  1. When a source image is in a folder reachable using a relative path name to the location of the script file : Using relative path names would allow tracing back input images from the script files even after moving both to new locations while maintaining the relative positions of script and input images.
  2. When a source image is in a folder not reachable using a relative path name to the location of the script file : The current behavior could be retained, that is to ask the user to identify the location of the folders.
jsachs
Posts: 4344
Joined: January 22nd, 2009, 11:03 pm

Re: feature request : missing input files when running a script

Post by jsachs »

This would break the case of moving just the final image and script to a new folder which currently works as long as the input images stay in the same place.

What Lightroom does for this problem is to provide a way to rename or move folders within the program so the internally recorded pathnames can be adjusted. Of course, if you rename or move outside of Lightroom then it cannot find the files and asks the user for where they are.
Jonathan Sachs
Digital Light & Color
pierrelabreche
Posts: 528
Joined: January 29th, 2019, 11:47 pm
What is the make/model of your primary camera?: Nikon Z8

Re: feature request : missing input files when running a script

Post by pierrelabreche »

This would break the case of moving just the final image and script to a new folder which currently works as long as the input images stay in the same place.
To avoid breaking the case of final image and script moved to a new folder, while the input images stay in the same place, PWP could have a path lookup strategy
  • use the original input file location ( as recorded at script creation time )
  • use an assumed file location, computed relative to the script file location ( use the "relative pathnames" strategy like sidecars ).
  • prompt the user for a user-provided location
When the input file can be found in both places, PWP could use a user preference to resolve : original path ; relative path ; ask the user.
Post Reply