3
$\begingroup$

I would like to retrieve .blend file thumbnails without using Blender at all, just plain old python3.

Also if it would be possible to explain how the .blend file works and how the process of retrieving the thumbnail works?

$\endgroup$
1

1 Answer 1

6
$\begingroup$

Yes, this is possible and infact has been done already,
the script to do this comes bundled with Blender: see blender-thumbnailer.py.

This Python script runs without Blender, eg extracting a PNG image from my.blend:

blender-thumbnailer.py /input/my.blend /output/thumb.png

Details

To extract the thumbnail from a .blend file you have to use a basic .blend file parser, however - this is written in such a way that its quite simple to extract the data without having to understand the entire blend file format, instead - you only need to read one of the serialized BHead blocks. (See link above).

Using blender-thumbnailer.py as a reference: writing this in another programming language, or saving as a different image format should not be a very big task.

$\endgroup$

You must log in to answer this question.

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