Page MenuHome

OpenEXR (single layer) with Multi-View error when saving from Image Editor
Open, NormalPublic


System Information
Operating system and graphics card

Blender Version
Broken: Since ever (since rBd5f1b9c2)
Worked: Never

Short description of error
We can't save single layer multiview images from the image editor from a rendered scene.

Exact steps for others to reproduce the error

  • Turn on "Views"
  • Render
  • In the Image Editor "Save As Image" change format to "OpenEXR", set "Use Multi-View" and Views Format: "Multi-View"

In Blender 2.75 we get: OpenEXR-save: ERROR: Failed to write pixel data to image file "MYFILENAME". No frame buffer specified as pixel data source.

We now get: OpenEXR-save: ERROR: Missing data to write to MYFILENAME.exr

The error is the same, though. Basically image_get_buffer_cb is returning NULL because the required ibuf is not cached and image_get_render_result can't return a valid ibuf if we don't pass the scene and a locker.

@Sergey Sharybin (sergey) any suggestion here? I know how to populate the ImageUser with a valid scene in image_get_buffer_cb but that still misses a locker. Overall I feel that this is not the correct approach though. (see P279)



Event Timeline

Dalai Felinto (dfelinto) set Type to Bug.
Dalai Felinto (dfelinto) created this task.
Dalai Felinto (dfelinto) claimed this task.
Dalai Felinto (dfelinto) raised the priority of this task from to Needs Triage by Developer.

I'm not sure what do you mean by "pass a locker"?

I'm not sure what do you mean by "pass a locker"?

In image_get_buffer_cb(...) instead of calling image_acquire_ibuf(ima, &iuser, NULL); to call: image_acquire_ibuf(ima, &iuser, &locker); (and to store the locker in the EXRData struct

Usually you do something like:

void *lock;
ImBuf *ibuf = BKE_image_acquire_ibuf(image, NULL, &lock);
/* Do stuff */
BKE_image_release_ibuf(image, ibuf, lock);

You can store lock in the EXRData i think unless you're gonna to acquire more render results inbetween. ANd don't forget to release the lock. Does this make sense?

It does, but It hangs on BLI_lock_thread(LOCK_VIEWER); (inside image_get_render_result(...)) - P280

Guess it's because lock happens form inside a lock already? Also, is it specific to multiview (we had this all working nicely in pre-multiview, so not sure what's special about views here)?

I guess soo too. This is specific to multiview, yes. Even in master you don't get this issue if you don't render (or don't save) as multiview

Sergey Sharybin (sergey) triaged this task as Normal priority.Oct 29 2015, 7:12 PM

That's a bit weird, wouldn't expect any difference between multiview and singleview cases here. Did you check that already?