diff options
author | Joshua Leung <aligorith@gmail.com> | 2008-06-03 14:00:09 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2008-06-03 14:00:09 +0400 |
commit | 29f839b4a58ace4c4a42e361341e3768c019f9de (patch) | |
tree | 1cafae18655a349243aaba74d6fb8cae9af4cf2d /source/blender/src/editaction.c | |
parent | 6eeef64370a2dfb752c220f9434407a68251e54f (diff) |
Bugfix #13603:
Action Editor Copy/Paste didn't trigger a depsgraph update for the active object (if the action was applied to it).
Diffstat (limited to 'source/blender/src/editaction.c')
-rw-r--r-- | source/blender/src/editaction.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index 12b9cb8919f..40b6b7ba6fe 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -1485,7 +1485,7 @@ void insertkey_action(void) data= get_action_context(&datatype); if (data == NULL) return; cfra = frame_to_float(CFRA); - + if (datatype == ACTCONT_ACTION) { ListBase act_data = {NULL, NULL}; bActListElem *ale; @@ -1941,6 +1941,7 @@ void paste_actdata () int filter; void *data; short datatype; + Object *ob= OBACT; short no_name= 0; float offset = CFRA - actcopy_firstframe; @@ -2017,7 +2018,7 @@ void paste_actdata () /* loop over curves, pasting keyframes */ for (ico= ipo_src->curve.first; ico; ico= ico->next) { - icu= verify_ipocurve((ID*)OBACT, ico->blocktype, actname, conname, "", ico->adrcode); + icu= verify_ipocurve((ID*)ob, ico->blocktype, actname, conname, "", ico->adrcode); if (icu) { /* just start pasting, with the the first keyframe on the current frame, and so on */ @@ -2045,6 +2046,14 @@ void paste_actdata () /* free temp memory */ BLI_freelistN(&act_data); + /* do depsgraph updates (for 3d-view)? */ + if ((ob) && (G.saction->pin==0)) { + if (ob->type == OB_ARMATURE) + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB|OB_RECALC_DATA); + else + DAG_object_flush_update(G.scene, ob, OB_RECALC_OB); + } + /* undo and redraw stuff */ allqueue(REDRAWVIEW3D, 0); allspace(REMAKEIPO, 0); |