Page MenuHome

Cleanup: Reduce duplication to prepare for UDIM packing
ClosedPublic

Authored by Jesse Yurkovich (deadpin) on Mar 14 2022, 3:24 AM.

Details

Summary

In preparation for supporting packing of UDIM tiled textures, this patch
refactors a small portion of image.cc. The refactor should lead to less
duplicate code now and when Tiled images are added in the near future.

This patch is based on the prior work done for D6492 where it was
requested this part be split and can be summarized as follows:

  • load_sequence_single is removed and merged with load_image_single
  • image_load_sequence_file is removed and merged with image_load_image_file

In addition to the standard suite of tests, I've manually verified that
images, image sequences, movies, tiled images, and multiview images all
load and cache themselves correctly (no extra loads).

There's a few things to be mindful of when reviewing:

  • There's a "dual" meaning for the term "entry". Sometimes it means "entry" and sometimes it's actually a synonym for "cfra"/"frame"
  • There's a variety of multiview bugs that makes full verification difficult[1]
  • As far as I can tell, the "stereo 3d" code inside the "multiview" codepaths is dead and unused? Nothing in the codebase seems to assign R_IMF_VIEWS_STEREO_3D to views_format.

[1] Multiview issues:

  • Multiview files do not get packed today (or as far back as 2.83). This patch does not fix that bug. It will most likely be addressed at the same time as Tiled images though.
  • Multiview files are not loading correctly in the Image editor: See T95298

Diff Detail

Repository
rB Blender

Event Timeline

Jesse Yurkovich (deadpin) requested review of this revision.Mar 14 2022, 3:24 AM
Jesse Yurkovich (deadpin) created this revision.
This revision is now accepted and ready to land.Mar 27 2022, 7:03 PM