Page MenuHome

Paint: prevent RenderResults and Viewers where unappropriate
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Sep 23 2021, 9:31 AM.

Details

Summary

Using a RenderResult (or a Viewer) was never really working (think you
cant get a real ImBuff from these) -- cannot use it as a clone, stencil
or canvas [Single Image paint texture slot].

In the case of using it as a 2D paint clone image this would also crash
[due to the Image Editor drawing refactor in 2.91].

Now [in the spirit of T73182 / D11179], prevent using these where
unappropriate by using rna pointer polling functions.

Also add a security check for the 2D paint clone image crash in case a
stencil ImBuff cannot be provided for some reason, but generally old files
are now patched in do_versions_after_linking_300 (thx @Brecht Van Lommel (brecht)!).

Fixes T91625.

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Sep 23 2021, 9:31 AM
Philipp Oeser (lichtwerk) created this revision.
Brecht Van Lommel (brecht) requested changes to this revision.Sep 23 2021, 4:27 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/blenloader/intern/versioning_300.c
1463–1464

This code should be in do_versions_after_linking_300, datablock pointers have not been resolved yet in blo_do_versions_300.

This revision now requires changes to proceed.Sep 23 2021, 4:27 PM
This revision is now accepted and ready to land.Sep 23 2021, 5:32 PM