diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-05-18 21:36:48 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-05-19 20:54:47 +0300 |
commit | 6ba28ff8b1658d69e2f4c1c92a8eeec230f573ba (patch) | |
tree | 003c742d994f8a05d3dba96444d2aac0e7a9cdd5 /source/blender/editors/armature/pose_utils.c | |
parent | 06737a82584c6be60a25b5f289e3fcd5c26b7aac (diff) |
WIP COW Fix: Insert keyframe operators/api now queries depsgraph for evaluated data
When using copy on write, insert keyframe operators were reading from old
bmain data instead of COW data. This meant that inserting keyframes would
often read old/stale data, resulting in invalid keyframes getting created
(e.g. from last transform operation, instead of actual current state).
This commit makes it so that keyframing operators will ask depsgraph for
the evaluated copy of the data, so that it can read values from that. It
introduces a new function - `DEG_get_evaluated_rna_pointer()`, which when
working correctly/fully, should work just like the other `DEG_get_evaluated_*()`
functions, except it lets you pass in an RNA Pointer.
However, currently, this is only done for Pose Bones (as a dirty hack, since this
is an important/pivotal requirement for production) and/or datablock
properties directly (since we can just use the DEG_get_evaluated_id() directly).
on the datablock.
Committing to a branch for now as this all needs more testing. More work to come
later at a more sane time of day!
Diffstat (limited to 'source/blender/editors/armature/pose_utils.c')
-rw-r--r-- | source/blender/editors/armature/pose_utils.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/armature/pose_utils.c b/source/blender/editors/armature/pose_utils.c index 0dc89aa4716..6bc88dc5b0e 100644 --- a/source/blender/editors/armature/pose_utils.c +++ b/source/blender/editors/armature/pose_utils.c @@ -195,7 +195,7 @@ void poseAnim_mapping_refresh(bContext *C, Scene *scene, Object *ob) else BKE_pose_where_is(depsgraph, scene, ob); - /* note, notifier might evolve */ + DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE); /* otherwise animation doesn't get updated */ WM_event_add_notifier(C, NC_OBJECT | ND_POSE, ob); } |