0
$\begingroup$

I need to extract scene data without loading a blend file completely as some files might be in the upwards of 3GB and more.

Here is an example of the data I have managed to extract by loading everything in the blend via a python script.

{
    "scenes": [
        {
            "scene.cycles.samples": 250,
            "scene.frame_end": 250,
            "scene.frame_start": 1,
            "scene.frame_step": 1,
            "scene.name": "Scene",
            "scene.render.engine": "CYCLES",
            "scene.render.image_settings.file_format": "PNG",
            "scene.render.pixel_aspect_x": 1.0,
            "scene.render.pixel_aspect_y": 1.0,
            "scene.render.resolution_percentage": 100,
            "scene.render.resolution_x": 1920,
            "scene.render.resolution_y": 1080
        },
        {
            "scene.cycles.samples": 1111,
            "scene.frame_end": 250,
            "scene.frame_start": 1,
            "scene.frame_step": 1,
            "scene.name": "Scene.001",
            "scene.render.engine": "CYCLES",
            "scene.render.image_settings.file_format": "PNG",
            "scene.render.pixel_aspect_x": 1.0,
            "scene.render.pixel_aspect_y": 1.0,
            "scene.render.resolution_percentage": 100,
            "scene.render.resolution_x": 256,
            "scene.render.resolution_y": 256
        }
    ]
}
$\endgroup$

1 Answer 1

1
$\begingroup$

Note this is a very low level of access, not intended for general use.

So you could read this answer "no", unless you're willing to get into Blender's format internals.


This is possible but not trivial, especially for cycles settings which are stored in a generic IDProperty structure.

  • Blender comes with blendfile.py
  • This module can be used to load blend files and extract content without having to open them from Blender.
  • While we don't have docs for this, there is some example use.
  • It shouldn't take long to extract resolution, engine for e.g.
  • Cycles settings will be more work, if you have gotten this far you should be able to do it though.

This will work with files from both 2.7x and 2.8x

Edit: see this answer for a start on how to use blendfile.py.

$\endgroup$

You must log in to answer this question.

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