From f5dd3ff0b5423111e5481d79e2dd0e2c935b1e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 12 Jun 2025 15:32:47 +0200 Subject: [PATCH 1/2] 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 --- source/blender/editors/sculpt_paint/paint_image_proj.cc | 1 + source/blender/makesrna/intern/rna_nodetree.cc | 1 + 2 files changed, 2 insertions(+) diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.cc b/source/blender/editors/sculpt_paint/paint_image_proj.cc index acf033d3d11..5ac7403fb3a 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.cc +++ b/source/blender/editors/sculpt_paint/paint_image_proj.cc @@ -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); diff --git a/source/blender/makesrna/intern/rna_nodetree.cc b/source/blender/makesrna/intern/rna_nodetree.cc index 544ff3762f5..c123eaa1e69 100644 --- a/source/blender/makesrna/intern/rna_nodetree.cc +++ b/source/blender/makesrna/intern/rna_nodetree.cc @@ -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); } From 95e39f6ff5fb40a851808f1153b8880369a1c627 Mon Sep 17 00:00:00 2001 From: Christoph Lendenfeld Date: Thu, 12 Jun 2025 16:10:33 +0200 Subject: [PATCH 2/2] Revert "Fix: Autokeying properties does not deselect keys" This reverts commit 283ae193d9000094a0c34d8f01a3bacc86c462da. It causes issues because the deselection happens regardless of properties actually getting keyed, meaning i.e. setting interpolation modes was no longer possible --- source/blender/editors/interface/interface_anim.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/source/blender/editors/interface/interface_anim.cc b/source/blender/editors/interface/interface_anim.cc index 9b0cf8d2c0b..4bc2f9b9edb 100644 --- a/source/blender/editors/interface/interface_anim.cc +++ b/source/blender/editors/interface/interface_anim.cc @@ -27,7 +27,6 @@ #include "DEG_depsgraph_build.hh" -#include "ED_anim_api.hh" #include "ED_keyframing.hh" #include "ANIM_fcurve.hh" @@ -313,7 +312,6 @@ bool ui_but_anim_expression_create(uiBut *but, const char *str) void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) { - ANIM_deselect_keys_in_animation_editors(C); blender::animrig::autokeyframe_property( C, scene, &but->rnapoin, but->rnaprop, but->rnaindex, cfra, true); }