10
$\begingroup$

When saving my projects the default directory sometimes opens to C:\ but I have my blender projects saved in my D:\Blender Projects directory. Is there a way to make this directory the default so that I don't have to manually type it in every time I want to save something?

This would apply when opening files as well. My reference files are saved in a similar location D:\Blender Projects\References but to access them I have to type the D drive in manually because it default opens the C:\ drive every time.

$\endgroup$
3
  • $\begingroup$ It should default the last directory you opened a .blend in.. $\endgroup$
    – gandalf3
    Apr 30, 2015 at 4:19
  • $\begingroup$ Hmm. but I'm opening reference .png's Do they not count? $\endgroup$
    – leigero
    Apr 30, 2015 at 4:36
  • $\begingroup$ The same should work for images, but separately from .blends. So when opening an image it will use the directory where the previously opened image resided. Unfortunately this seems to reset each session, so if you open a new file or restart blender it will go back to C:\ or /. The memory of previous .blend directories is not reset. $\endgroup$
    – gandalf3
    Apr 30, 2015 at 4:53

3 Answers 3

6
$\begingroup$

You can't as Blender doesn't give us a way to do this. As gandalf3 says above in the comments it should use the last directory you accessed a file from in your current session. If you find yourself going to the same place several times, you can add a bookmark under Bookmarks or see your last visited folders under Recent in the sidebar. There should also be system bookmarks for your drives so no need to type if you can help it.

-----

$\endgroup$
0
$\begingroup$

I tried to provide a workaround. The directory for saving/opening/import/export file will be the path where the blend file is.

So I make a bat script, this will copy startup.blend to target path and open the file. So the directory for saving/opening will be there. Then delete it.

Usage:
Change source to your startup.blend file path.
Change default_directory to your desired default directory.
Change default_filename to your desired default filename.
The default filename is untitled.blend.
It will auto add a suffix number if filename is already exist.

You might want to create a .lnk file point to this .bat file. Set the icon of the link to blender.exe. And set run as "minimized".

::copy file
@echo off
setlocal enabledelayedexpansion
set "source=%APPDATA%\Blender Foundation\Blender\3.6\config\startup.blend"
set "default_filename=untitled"
set "default_directory=%UserProfile%\Desktop"

set "target=%default_directory%\%default_filename%.blend"
set "max=0"
if not exist "%source%" (
    echo Blender startup file not found:
    echo %source%
    pause
    exit /b 1
)
for /f "tokens=1 delims=." %%a in ('dir /b "%default_directory%\%default_filename%*.blend"') do (
    set "num=%%a"
    set "num=!num:%default_filename%=!"
    if !num! gtr !max! (
        set max=!num!
    )
)
if exist "%target%" (
    set /a max+=1
    set "target=%default_directory%\%default_filename%!max!.blend"
)
echo n|copy /-y "%source%" "%target%"

::open file
%target%
::delete file
del %target%

It's not perfect, just a workaround. It's dangerous when you opened two processes and save the files. Because one will overwrite another without confirmation. To solve this, you can use date and time as the default filename. So the filename will not be the same, then everything is fine.
For example:

set "mydate=%date%"
set "mytime=%time%"
set "default_filename=%mydate% %mytime%"

Another way is to edit source code of Blender and compile it.
Not sure making an addon can do it or not.

$\endgroup$
-2
$\begingroup$

You can go to File -> User Preferences -> Files (tab).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .