Page MenuHome

Fix T75234: Saving UDIM tiled texture as OpenEXR saves only the first tile
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Mar 31 2020, 9:56 PM.

Details

Summary

This happened when the UDIM tiled image needed to be colormanaged, so

  • when you set up the image as sRGB, then save as EXR/HDR/...
  • other way around as well: when you set up the images as Linear then save as PNG/JPG/...

Reason being that for UDIM tiled images, image_save_single is called
multiple times [once for each tile] and everytime image_save_post will
fire the IMA_SIGNAL_COLORMANAGE signal which clears the cache if any of
the above two is the case. Without the cache, the next tiles cannot be
saved.

Now determine if the colorspace changed from image_save_single/image_save_post and only fire IMA_SIGNAL_COLORMANAGE once from BKE_image_save in the end.

Diff Detail

Repository
rB Blender

Event Timeline

Brecht Van Lommel (brecht) requested changes to this revision.Mar 31 2020, 10:16 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/blenkernel/intern/image_save.c
228–234

It's not ideal to make assumptions about the calling function saving all UDIM tiles.

Instead I would add a bool *colorspace_changed parameter to image_save_single and image_save_post, which can then be used by BKE_image_save to determine if it should call BKE_image_signal.

This revision now requires changes to proceed.Mar 31 2020, 10:16 PM

determine if the colorspace changed from image_save_single/ image_save_post and only fire IMA_SIGNAL_COLORMANAGE once from BKE_image_save in the end (as suggested by brecht, thx!)

This revision is now accepted and ready to land.Mar 31 2020, 10:59 PM