0

On my Windows 7 system, I have associated the .blend extension with a specific bat file I wrote, which is shown below:

blender.bat:

set PYTHONPATH=""
"C:\Program Files\Blender Foundation\blender\blender.exe" "%1"

Here's the output of the command ftype blendfile:

blendfile="C:\Program Files\Blender Foundation\Blender\blender.bat" "%1"

When I double click a .blend file (e.g. model.blend), the application (Blender) starts up fine, but the file in question is not opened. That is, the application starts as if the file blender.bat was double clicked by itself.

The file is in the following folder:

F:\TRAINING_BLENDER\MY MODELS

(Note that the pathname contains spaces)

If I open up a command prompt at the above folder and run the following command:

model.blend

I see the following output:

Error: Cannot read file 'F:\TRAINING_BLENDER\MY': No such file or directory unknown argument, loading as file: -
...

I understand that the problem is due to the folder name having embedded spaces, but I have the argument specificer (%1) in double quotes to protect from that. What could be the problem?

Disclaimer: I have read this related question: Double clicking a file in explorer opens the associated application but not the file

0

This is a Python problem. Internally, Blender uses Python, and Python does not like pathnames with spaces. The only solution is to have .blend files in a folder hierarchy without any embedded spaces. I did this and was able to open files correctly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.