[Bf-blender-cvs] [70b31c28b63] tmp-b28-motionpath-drawing: Fix: Motionpaths were not drawing for bones

Joshua Leung noreply at git.blender.org
Fri Jun 1 13:53:12 CEST 2018

Commit: 70b31c28b63a75c2e614b47e09a63646b4e34cd1
Author: Joshua Leung
Date:   Fri Jun 1 13:53:03 2018 +0200
Branches: tmp-b28-motionpath-drawing

Fix: Motionpaths were not drawing for bones

As with the objects case earlier, the problem was that when doing COW for the
viewport, the pchan->mpath pointer was just getting set to NULL in the copying
code. It's unclear for now whether this will cause any problems down the track
somewhere else - the comment there was non-specific about why we were explicitly
not copying/keeping the old link.


M	source/blender/blenkernel/intern/action.c


diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index 360d9c019ba..c12dd49b47e 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -582,7 +582,9 @@ void BKE_pose_copy_data_ex(bPose **dst, const bPose *src, const int flag, const
 		if (copy_constraints) {
 			BKE_constraints_copy_ex(&listb, &pchan->constraints, flag, true);  // BKE_constraints_copy NULLs listb
 			pchan->constraints = listb;
-			pchan->mpath = NULL; /* motion paths should not get copied yet... */
+			/* XXX: This is needed for motionpath drawing to work. Dunno why it was setting to null before... */
+			pchan->mpath = animviz_copy_motionpath(pchan->mpath);
 		if (pchan->prop) {

More information about the Bf-blender-cvs mailing list