diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2021-02-17 17:09:05 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2021-02-17 17:57:29 +0300 |
commit | 6247b8cc77131ec52501ec8585e9f3de6056a746 (patch) | |
tree | 8423bedd55f1039f937b8246e89c46a5134046a8 /source/blender/makesrna/intern | |
parent | 2217719feb250458bef461d405985e79d3c72a14 (diff) |
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
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_object.c | 7 |
1 files changed, 6 insertions, 1 deletions
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, |