Texture Paint: sync adding a new texture slot to the Image Editor

When changing the texture paint slot index or activating a Texture Node, the texture displayed in the Image Editor changes accordingly.
This patch syncs the Image Editor when a new texture paint slot was added, which currently is not the case.

Also deduplicates some code.
This commit is contained in:
Edward
2022-11-08 14:28:44 +01:00
committed by Philipp Oeser
parent 77c4d3154b
commit 1d71f82033
7 changed files with 31 additions and 70 deletions

View File

@@ -51,6 +51,7 @@ void ED_space_image_set(struct Main *bmain,
struct SpaceImage *sima,
struct Image *ima,
bool automatic);
void ED_space_image_sync(struct Main *bmain, Image *image, bool ignore_render_viewer);
void ED_space_image_auto_set(const struct bContext *C, struct SpaceImage *sima);
struct Mask *ED_space_image_get_mask(const struct SpaceImage *sima);
void ED_space_image_set_mask(struct bContext *C, struct SpaceImage *sima, struct Mask *mask);