0
0
forked from blender/blender
blender/scripts
Philipp Oeser 3b3c4c4b3b Fix #115140: Crash undoing painting on linked image from 3DView
Related commit: 82aa300e1c / 5596f79821

82aa300e1c made it so that if only linked images are used, painting
would be prohibited. But since painting in Material mode actualy paints
across all materials it could happen that one particular image is linked
whereas another image isnt. In this case, painting on the linked image
would not be prohibited.

Two issues:

- [1] logic in above commit(s) seems slightly wrong, we could still pass
the check for linked images (also no image here should also not result
in a positive check I think).

- [2] code in `project_paint_prepare_all_faces` would still work with
linked images in slots, so
-- `ProjPaintState` -> `image_tot` was incremented
-- `ProjPaintImage` was created
-- this then ends up in the undo push - and crashes on undo

So now [1] is rectified and for [2] we skip faces with associated linked
images.

In addition, slots with linked images are now also greyed out in the UI
(`VIEW3D_PT_slots_projectpaint`) to give some sort of hint. For the
future it would probably also be good to dissallow selection of such
paint slots, but that is for another commit.

Pull Request: blender/blender#115263
2023-12-01 11:01:43 +01:00
..
freestyle Cleanup: spelling in comments 2023-09-05 11:04:27 +10:00
modules Release: Update manual references for 4.0. 2023-11-13 16:31:41 +01:00
presets Fix #115025: Transform operations not working in particle edit mode 2023-11-27 17:34:58 +01:00
site Cleanup: spelling in comments, update dictionary 2023-09-03 21:35:07 +10:00
startup Fix #115140: Crash undoing painting on linked image from 3DView 2023-12-01 11:01:43 +01:00
templates_osl License headers: remove GPL header from OSL template script 2023-08-04 13:24:15 +10:00
templates_py Asset shelf: Use asset representation for asset shelf BPY methods 2023-09-15 16:17:44 +02:00