[Bf-blender-cvs] [bc4bfef2092] tmp-b28-motionpath-drawing: Motion Path Update: Tag objects for copy on write flushing after calculating
Joshua Leung
noreply at git.blender.org
Fri Jun 1 11:55:49 CEST 2018
Commit: bc4bfef20924d25441170430ebac47435d3ef356
Author: Joshua Leung
Date: Thu May 31 14:02:34 2018 +0200
Branches: tmp-b28-motionpath-drawing
https://developer.blender.org/rBbc4bfef20924d25441170430ebac47435d3ef356
Motion Path Update: Tag objects for copy on write flushing after calculating
===================================================================
M source/blender/editors/armature/pose_edit.c
M source/blender/editors/object/object_edit.c
===================================================================
diff --git a/source/blender/editors/armature/pose_edit.c b/source/blender/editors/armature/pose_edit.c
index 932919cb19d..aae8d4bc0a5 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -193,6 +193,9 @@ void ED_pose_recalculate_paths(bContext *C, Scene *scene, Object *ob)
/* recalculate paths, then free */
animviz_calc_motionpaths(depsgraph, bmain, scene, &targets);
BLI_freelistN(&targets);
+
+ /* tag armature object for copy on write - so paths will draw/redraw */
+ DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
}
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 364a85c4248..a9a765e1cb3 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1011,6 +1011,15 @@ void ED_objects_recalculate_paths(bContext *C, Scene *scene)
/* recalculate paths, then free */
animviz_calc_motionpaths(depsgraph, bmain, scene, &targets);
BLI_freelistN(&targets);
+
+ /* tag objects for copy on write - so paths will draw/redraw */
+ CTX_DATA_BEGIN(C, Object *, ob, selected_editable_objects)
+ {
+ if (ob->mpath) {
+ DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
+ }
+ }
+ CTX_DATA_END;
}
More information about the Bf-blender-cvs
mailing list