This patch adds color attributes to TexPaintSlot. This allows an easier selection
when painting color attributes.
Previously when selecting a paint tool the user had to start a stroke, before the
UI reflected the correct TexPaintSlot. Now when switching the slot the active
tool is checked and immediate the UI is drawn correctly.
In the future the canvas selector will also be used to select an image or image texture node
to paint on. Basic implementation has already been done inside this patch.
A limitation of this patch is that is isn't possible anymore to rename images directly from
the selection panel. This is currently allowed in master. But as CustomDataLayers
aren't ID fields and not owned by the material supporting this wouldn't be easy.
Patch is ready for an initial review.
{F12953989}
In the future we should update the create slot operator to also include color attributes.
# TODO
* [ ] Hide the canvas selector fully behind a experimental feature. We want to commit, but not available in a release.
* [ ] Revert the removal of the color type force code at first brush interaction.
* [X] ~~Add support for byte colors. Currently only float colors are supported.~~
* [X] ~~Add support for Face corners color attributes. Currently only vertex color attributes are supported.~~
* [X] ~~Commit the experimental feature in master directly, so we can develop other parts simultaneously.~~
* [X] ~~Check where we want the canvas to appear on the screen (now it is the last item what isn't working for small screens.)~~
* [X] ~~When switching tools the change isn't directly visible, still needs a click in the 3d viewport. Idea would be to use the wm message bus and subscribe to the active tool property.~~
* [X] ~~Currently there is a sync issue as active node could be in an state where it could not draw on. Introduce NODE_ACTIVE_PAINT_CANVAS. similar to NODE_ACTIVE_TEXTURE. We cannot reuse NODE_ACTIVE_TEXTURE as this is also used when drawing in workbench.~~
* [X] ~~Use TexPaintSlot of material. Most stuff is already there.~~
* [X] ~~When loading starting blender the texslots should be regenerated. Now you first need to select the canvas source again. Assume this is done when entering texture paint mode.~~
* [X] ~~Show icon of TexPaintSlot.~~