From 1d71f82033f1ec3ad51195cfa64c59fcf0cd6ccc Mon Sep 17 00:00:00 2001 From: Edward Date: Tue, 8 Nov 2022 14:28:44 +0100 Subject: 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. --- source/blender/editors/sculpt_paint/paint_image_proj.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/sculpt_paint/paint_image_proj.c') diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index ea33449f0dd..c85044bf915 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -74,6 +74,7 @@ #include "DEG_depsgraph.h" #include "DEG_depsgraph_query.h" +#include "ED_image.h" #include "ED_node.h" #include "ED_object.h" #include "ED_paint.h" @@ -6704,6 +6705,7 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op) BKE_texpaint_slot_refresh_cache(scene, ma, ob); BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_USER_NEW_IMAGE); WM_event_add_notifier(C, NC_IMAGE | NA_ADDED, ima); + ED_space_image_sync(bmain, ima, false); } if (layer) { BKE_texpaint_slot_refresh_cache(scene, ma, ob); -- cgit v1.2.3