From 6247b8cc77131ec52501ec8585e9f3de6056a746 Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Wed, 17 Feb 2021 15:09:05 +0100 Subject: [PATCH] Fix T85722: missing updates adding modifiers via python Was reported for Geometry Nodes Editor "New" button, but was true for any modifier added via modifiers.new(). Now just add appropriate nofifier. Maniphest Tasks: T85722 Differential Revision: https://developer.blender.org/D10450 --- source/blender/makesrna/intern/rna_object.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index faa20e642cf..6e534868120 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -1600,7 +1600,12 @@ bool rna_Object_constraints_override_apply(Main *UNUSED(bmain), static ModifierData *rna_Object_modifier_new( Object *object, bContext *C, ReportList *reports, const char *name, int type) { - return ED_object_modifier_add(reports, CTX_data_main(C), CTX_data_scene(C), object, name, type); + ModifierData *md = ED_object_modifier_add( + reports, CTX_data_main(C), CTX_data_scene(C), object, name, type); + + WM_main_add_notifier(NC_OBJECT | ND_MODIFIER | NA_ADDED, object); + + return md; } static void rna_Object_modifier_remove(Object *object,