Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Craddock <nzcraddock@gmail.com>2020-09-20 01:27:56 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-09-20 01:33:45 +0300
commit94a63f75055024dbf0c9f9236b3cda5438fa2162 (patch)
tree3cca2bdf9c662dbc074d5a50595a8a00ff1e4e30 /source/blender/editors
parent4115229637c0acdcffbaceae282ccd854bfdb1c8 (diff)
Fix T80945: Build modifier not updating after outliner copy
Build modifiers linked or copied to objects from the outliner would not animate until the file was saved and reopened due to a missing depsgraph relations tag.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/include/ED_object.h3
-rw-r--r--source/blender/editors/object/object_modifier.c11
-rw-r--r--source/blender/editors/space_outliner/outliner_dragdrop.c2
3 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 45e23cadaaa..6fdd65fdcc9 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -430,7 +430,8 @@ int ED_object_modifier_copy(struct ReportList *reports,
struct Object *ob,
struct ModifierData *md);
void ED_object_modifier_link(struct bContext *C, struct Object *ob_dst, struct Object *ob_src);
-void ED_object_modifier_copy_to_object(struct Object *ob_dst,
+void ED_object_modifier_copy_to_object(struct bContext *C,
+ struct Object *ob_dst,
struct Object *ob_src,
struct ModifierData *md);
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 370667391c5..8f5fa6b7834 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -521,13 +521,22 @@ void ED_object_modifier_link(bContext *C, Object *ob_dst, Object *ob_src)
BKE_object_link_modifiers(ob_dst, ob_src);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob_dst);
DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
+
+ Main *bmain = CTX_data_main(C);
+ DEG_relations_tag_update(bmain);
}
-void ED_object_modifier_copy_to_object(Object *ob_dst, Object *ob_src, ModifierData *md)
+void ED_object_modifier_copy_to_object(bContext *C,
+ Object *ob_dst,
+ Object *ob_src,
+ ModifierData *md)
{
BKE_object_copy_modifier(ob_dst, ob_src, md);
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob_dst);
DEG_id_tag_update(&ob_dst->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
+
+ Main *bmain = CTX_data_main(C);
+ DEG_relations_tag_update(bmain);
}
bool ED_object_modifier_convert(ReportList *UNUSED(reports),
diff --git a/source/blender/editors/space_outliner/outliner_dragdrop.c b/source/blender/editors/space_outliner/outliner_dragdrop.c
index 58f6f82c80d..302d606e4c8 100644
--- a/source/blender/editors/space_outliner/outliner_dragdrop.c
+++ b/source/blender/editors/space_outliner/outliner_dragdrop.c
@@ -964,7 +964,7 @@ static void datastack_drop_copy(bContext *C, StackDropData *drop_data)
}
else if (drop_data->ob_parent->type != OB_GPENCIL && ob_dst->type != OB_GPENCIL) {
ED_object_modifier_copy_to_object(
- ob_dst, drop_data->ob_parent, drop_data->drag_directdata);
+ C, ob_dst, drop_data->ob_parent, drop_data->drag_directdata);
}
break;
case TSE_CONSTRAINT: