Page MenuHome

Windows thumbnails and improved filetype registration
Closed, ArchivedPublicPATCH


This patch adds Windows Explorer thumbnails to Blender files (Vista/7 only), and improves the process of registering the .blend file extension.


- I haven't tested my changes to the NSI script. I'm assuming that extension registration happens after the main install is complete.
- I have changed the behaviour of -R (and -r, a silent equivalent) to exit Blender after registering.
- I have had to add a "WIN64" #define. This probably won't upset anything, but is worth noting.
- The thumb handler itself needs to be added to the windows and win64 lib trees. The build system can't generate it for reasons outlined in the .zip.

Event Timeline

Uploading thumbhandler2.patch as a changed file didn't make it into the diff for some reason. Fixed some warnings too.

Ext registration fails in MinGW builds, but MinGW debug don't currently run due to an outdated Python lib...

Fixed MinGW builds: the problem was down to not having as embedded manifest, which put Blender into compatibility mode when writing to system locations.

I've had to include the changes from my other Windows patch ( since the two are now overlapping quite a lot.

An extra file snuck in, uploading again.

Running "blender.exe -r" doesn't register the thumbnail handler, it only makes the associations the old way. I have the x86 and x64 thumbnail libs next in my install dir, it seems that it doesn't register them at all. Tested on a Win 7 x64 and x86 machine, same behaviour.

My bad, it does work! Thanks for this patch, I hope it gets committed soon. :)

The console handling code should recognize when it is started from a cmd.exe. Right now it closes that as well without the -con switch, and that's pretty annoying. If you could find a way to have it not close an already open cmd.exe, that'd be great.

The thumbnail handler I got to work when I register with Admin privileges. As a normal user I get ERROR_ACCESS_DENIED at the first attempts of writing to registry through blender -r and blender -R.

I'm going to split the two features, so that we can work on them separately to improve.

Attaching 26044_thumbnailer_01.patch and 26044_console_01.patch

Meh, need to apply both patches to have thumbnailer registration work properly from command-line too. Sorry about that!

The thumbnailer part and -r addition have been committed in r35871, r35872 and r35873.

Tom, if you manage to fix the annoyance this week, I think I can get it in still before release.

Did you fix ERROR_ACCESS_DENIED, Nathan? I found that was down to MinGW not embedding a Windows manifest, which should be handled.

Any detection of an existing console is going to be platform-specific (looks like sniffing the number of characters is the best plan), but I've only got a Windows environment here...

On closer inspection, toggling the console is actually Windows-only. Problem solved and update attached.

A note about uninstalling: it would be much better to call `regsvr32 /u /s <handler>` instead of deleting the thumb handler registry key manually.

source\creator\CMakeLists.txt (108): You've changed BLEN_VER_RC_STR to BLEN_VER_RC_STR_M. This breaks CMake Release compiles (not debug for some reason).

Aha, I must've accidently done that, I did compare my changes to your diff before committing, but I probably overlooked it.

The console patch has been committed and the typo has been fixed too. Thanks for your work!

Nathan Letwory (jesterking) changed the task status from Unknown Status to Unknown Status.Apr 8 2011, 5:02 PM