Fix #139126: Paint: Undo in Texture Paint mode does not redraw object

This was a case of missing relation tagging update.
The update was functional only after something else
tagged relations.

The relation update needed to be added in both the
Image texture node RNA function (for manually changed
images) and in the add painting slot operator.

Pull Request: https://projects.blender.org/blender/blender/pulls/140270
This commit is contained in:
Clément Foucault
2025-06-12 15:32:47 +02:00
committed by Clément Foucault
parent 38a8512e47
commit f5dd3ff0b5
2 changed files with 2 additions and 0 deletions

View File

@@ -6809,6 +6809,7 @@ static bool proj_paint_add_slot(bContext *C, wmOperator *op)
DEG_id_tag_update(&ntree->id, 0);
DEG_id_tag_update(&ma->id, ID_RECALC_SHADING);
DEG_relations_tag_update(bmain);
ED_area_tag_redraw(CTX_wm_area(C));
ED_paint_proj_mesh_data_check(*scene, *ob, nullptr, nullptr, nullptr, nullptr);

View File

@@ -3126,6 +3126,7 @@ static void rna_Node_tex_image_update(Main *bmain, Scene * /*scene*/, PointerRNA
BKE_ntree_update_tag_node_property(ntree, node);
BKE_main_ensure_invariants(*bmain, ntree->id);
DEG_relations_tag_update(bmain);
WM_main_add_notifier(NC_IMAGE, nullptr);
}