[Bf-blender-cvs] [4684375bd45] blender2.8: Fix: Motion Paths were still visible after clearing them

Joshua Leung noreply at git.blender.org
Tue Jul 31 16:20:09 CEST 2018


Commit: 4684375bd45f7c6bebcfd5006a8bc86e777f971e
Author: Joshua Leung
Date:   Wed Aug 1 01:27:47 2018 +1200
Branches: blender2.8
https://developer.blender.org/rB4684375bd45f7c6bebcfd5006a8bc86e777f971e

Fix: Motion Paths were still visible after clearing them

After clearing motion paths from objects, those objects needed to be
tagged for copy on write so that the copied data (i.e. viewport)
recieve the changes (i.e. removed paths)

Reported by Hjalti

===================================================================

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 3ae578279ca..1dfb9ec984a 100644
--- a/source/blender/editors/armature/pose_edit.c
+++ b/source/blender/editors/armature/pose_edit.c
@@ -365,6 +365,9 @@ static void ED_pose_clear_paths(Object *ob, bool only_selected)
 	/* if nothing was skipped, there should be no paths left! */
 	if (skipped == false)
 		ob->pose->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS;
+
+	/* tag armature object for copy on write - so removed paths don't still show */
+	DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
 }
 
 /* operator callback - wrapper for the backend function  */
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index 48048319cb7..a6dad906579 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -1378,6 +1378,9 @@ static void object_clear_mpath(Object *ob)
 		animviz_free_motionpath(ob->mpath);
 		ob->mpath = NULL;
 		ob->avs.path_bakeflag &= ~MOTIONPATH_BAKE_HAS_PATHS;
+
+		/* tag object for copy on write - so removed paths don't still show */
+		DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
 	}
 }



More information about the Bf-blender-cvs mailing list