Page MenuHome

Fix T85395: Texture paint external edit wrong projection on reapply
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Feb 5 2021, 6:00 PM.

Details

Summary

Caused by rB5b34d11b55e0.

Above commit restored the view matrices in ED_view3d_draw_offscreen
_before_ they can be stored in the ImBuff (see ED_view3d_draw_offscreen
/ texture_paint_image_from_view_exec).

Now make restoring the view matrices optional and dont do this in case of reprojection, so the used matrices can still be saved in the ImBuff later.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Feb 5 2021, 6:00 PM

I'd rather avoid making this struct public, although I can see why this was done.

ED_view3d_draw_offscreen_imbuf and related functions are already hard to follow with their arguments, adding more arguments isn't so nice either.

We could optionally call this function with an option not to use backup/restore, which at least doesn't expose the struct.

  • review by campbellbarton (instead of exposing the original mats to the caller, make restoring them optional for the caller)

always restore mats, only case to not do this is for reprojection

With so many args we could move this into a struct, but that can be a separate commit, this LGTM.

This revision is now accepted and ready to land.Feb 10 2021, 10:34 AM