Related commit: 82aa300e1c / 5596f7982182aa300e1c 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: https://projects.blender.org/blender/blender/pulls/115263