Default file locations for Add Images, Open Project File and Save Project dialog boxes

42 views
Skip to first unread message

Stan Tess

unread,
May 18, 2020, 7:09:52 PM5/18/20
to hugi...@googlegroups.com

Hi,

 

I am new to Hugin and I could use some help.  I’ve noticed that both the Add Images dialog box and the Open Project File dialog box open to the last used folder by default.  I have also notice the Save Project File opens to User\AppData\Local\Temp by default.  I would like to change these locations. Where are these default folder locations stored?  I open Hugin with a win batch file so I would probably change the default folder locations in the batch file as needed.  I found a couple of entries in the registry but changing these folder locations didn’t change the default locations when I opened any of the three dialog boxes so I assume the folder location is probably stored in a file somewhere.

 

Thanks and best regards,

Stan Tess

 

 

Abrimaal

unread,
May 19, 2020, 9:54:38 AM5/19/20
to hugin and other free panoramic software
The temporary folder is emptied at exit, you can change its location in Preferences -> Filenames -> Temporary dir

Saving projects in the same folder as the images is the best option ever. Believe me, if you had one folder for projects, after creating 5000 projects you would never find it.

T. Modes

unread,
May 19, 2020, 11:47:04 AM5/19/20
to hugin and other free panoramic software
Hi,


Am Dienstag, 19. Mai 2020 01:09:52 UTC+2 schrieb Stan Tess:
I’ve noticed that both the Add Images dialog box and the Open Project File dialog box open to the last used folder by default. 

yes, these both dialogs and many other are using the last used folder.
 
I have also notice the Save Project File opens to User\AppData\Local\Temp by default.  I would like to change these locations.

The save as dialog is using by default the folder of the first image. The default folder and default filename can be chosen in the preferences dialog, tab filename, default project filename.
Either your images are in the temp folder or you have changed this setting to the temp folder.

Thomas

Stan Tess

unread,
May 20, 2020, 6:27:45 AM5/20/20
to hugin and other free panoramic software
Thanks,  I agree that saving projects in the same folder as the images is what I want to do.  I have code in my batch script that finds the latest used folder so I can change the default folder for the Add Images dialog box and the Open Project File dialog box from the last folder used to the newest folder where the newest images will be.   I found that the default folders are actually stored and persisted in the registry.  You can change the values there but you have to do it before you instantiate HuginOnce Hugin is open it places the values in volatile memory and they aren't easily accessible to change.  

Stan Tess

unread,
May 20, 2020, 6:49:38 AM5/20/20
to hugin and other free panoramic software
Hi and thanks,

I'm not sure why  my save as dialogue was pointing to the temp folder except I never completed a full cycle  of stitching with Hugin but with more testing I see you were correct in that The save as dialog is using by default the folder of the first image.  That behavior is fine withe me but the Add images... dialogue points to the last used folder and that is what I want to change. Unfortunately the Open... and Add images... dialogue boxes point to the same folder. the last used folder.  If you use Open... to open the last project repeatedly you may want to keep the existing behavior but if you generally navigate to the most recent folder to add images and complete the project in one sitting you may want to change that behavior.  

Below is a batch script that will change the Add images default folder location to the most recent folder in my file structure and open Hugin. You may need to make changes to work with your particular file structure but this is a start.


@title = "StartHugin"

@echo off

:: A batch script to change the default folder location for  Load images... and Open... dialog boxes to the most recent sub folder in a folder and then open Hugin

:: set mydate=%date:~10,4%%date:~4,2%%date:~7,2%
set myYear=%date:~10,4%

:: Find the latest folder used
FOR /F " tokens=*" %%i IN ('dir "S:\Digital Photographs\%myYear%" /b /ad-h /o-d') DO (
SET a=%%i
GOTO :found
)  

echo No subfolder found
goto :eof


:found


:: Change reg value for actualPath to most resent folder in this Folder format:   "S:\Digital Photographs\(yyyy)\(yyyymmdd)\"  =  "S:\Digital Photographs\%myYear%\%a%\"   
::  We also need an extra \ at end to escape the \ character.
reg add "HKCU\Software\hugin" /v actualPath /t REG_SZ  /F  /d "S:\Digital Photographs\%myYear%\%a%\\"


:: Start Hugin
START "" "C:\Program Files\Hugin\bin\Hugin.exe"     



REM echo.
REM echo.
REM echo.ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
REM echo.
REM echo.   StartHugin has run
REM echo.
REM echo.ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ
REM echo.
REM echo.


REM pause
Reply all
Reply to author
Forward
0 new messages