Page MenuHome

Pixels and resolution not for multilayer EXR and Render Result
Open, NormalPublic

Description

System Information
CentOS - GTX 1070

Blender Version
2.79

Short description of error
Pixels and resolution are not available with multilayer EXR or Render Result images.

Exact steps for others to reproduce the error
import bpy
data = bpy.data
image = data.images['Render result or multilayer EXR']
print(image.pixels) # length is 0
print(image.resolution) # return always Vector((0.0, 0.0))

It is working with regular EXR file.

Details

Type
To Do

Event Timeline

true. dont know if you know this already, but a workaround for now could be this
can have a look (, but not sure how involved this task will end up being...)

Brecht Van Lommel (brecht) triaged this task as Confirmed priority.Jan 26 2018, 8:24 AM

@Philipp Oeser (lichtwerk), since you claimed this task, are you working on a solution?

This is indeed a gap in our Python API that would be good to fix, though not strictly a bug so up to you if you want to close it or fix it.

@Brecht Van Lommel (brecht): yep, I'm behind schedule here, but I will have a look later today

OK, had a first look, but there are remaining questions that I have to wrap my head around.

Getting pixels or size would require aquiring an ImBuf, however the way it is normally done involves an ImageUser (that in turn would have information regarding the corresponding scene, layer, pass, renderslot).
We dont have that from python and I am unsure on what to use as default here. (which scenes renderlayer? which pass, slot?)

And I am still looking at how this "Render Result" is stored in the main database "images". e.g. different scenes RenderResults can have different sizes, however other properties (e.g. display_aspect) are shared across scenes renderResults as it seems...

Long story short: needs a bit more time -- I know, I'm slow... :)

Unfortunately I'll only be able to look at this in April again, so let others take over....

Brecht Van Lommel (brecht) claimed this task.

This is really a known to do item and not a bug, so closing, feature requests are handled elsewhere.

Philipp Oeser (lichtwerk) lowered the priority of this task from Confirmed to Normal.

also added to TODO here: https://wiki.blender.org/index.php/Dev:Source/Development/Todo/Scripting
Will have look again if time permits

Philipp Oeser (lichtwerk) changed Type from Bug to To Do.Apr 19 2018, 1:08 PM