Page MenuHome

Texture Paint: changing paint slots and viewport could go out of sync
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Jun 4 2021, 10:12 AM.

Details

Summary

When changing to another texture paint slot, the texture displayed in
the viewport should change accordingly (as well as the image displayed
in the Image Editor).

The procedure to find the texture to display in the viewport
(BKE_texpaint_slot_material_find_node) could fail
though because it assumed iterating nodes would always happen in the
same order (it was index based). This is not the case though, nodes can
get sorted differently based on selection (see ED_node_sort).

Now check the actual image being referenced in the paint slot for
comparison.

ref T88788 (probably enough to call this a fix, the other issue(s)
mentioned in the report are more likely a feature request)

Diff Detail

Repository
rB Blender
Branch
T88788_a (branched from master)
Build Status
Buildable 14959
Build 14959: arc lint + arc unit

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Jun 4 2021, 10:12 AM
Philipp Oeser (lichtwerk) created this revision.

Sounds good, and more reliable than looking for an index that may have been changed.
(I'm not familiar with this area however).

This revision is now accepted and ready to land.Jun 4 2021, 1:00 PM

I totally forgot that patch! (I'm concerned about my mental health).
Since I was the one who messed with this, this is another reason to trust in the patch. +1