[Bf-blender-cvs] [21d8ff3] BendyBones: Bendy Bones: Adding a bit of documentation to the code to show what's happening

Joshua Leung noreply at git.blender.org
Tue May 17 16:40:50 CEST 2016


Commit: 21d8ff32294c510d675f7ea60e73ffdd9a8ae3ef
Author: Joshua Leung
Date:   Mon May 16 16:24:29 2016 +1200
Branches: BendyBones
https://developer.blender.org/rB21d8ff32294c510d675f7ea60e73ffdd9a8ae3ef

Bendy Bones: Adding a bit of documentation to the code to show what's happening

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

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

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

diff --git a/source/blender/blenkernel/intern/armature.c b/source/blender/blenkernel/intern/armature.c
index 5e4bff6..592965f 100644
--- a/source/blender/blenkernel/intern/armature.c
+++ b/source/blender/blenkernel/intern/armature.c
@@ -601,11 +601,23 @@ void b_bone_spline_setup(bPoseChannel *pchan, int rest, Mat4 result_array[MAX_BB
 		roll2 = 0.0;
 	}
 
-	/* add extra effects (bbone properties)? */
+	/* Add effects from bbone properties over the top
+	 * - These properties allow users to hand-animate the
+	 *   bone curve/shape, without having to resort to using
+	 *   extra bones
+	 * - The "bone" level offsets are for defining the restpose
+	 *   shape of the bone (e.g. for curved eyebrows for example).
+	 *   -> In the viewport, it's needed to define what the rest pose
+	 *      looks like
+	 *   -> For "rest == 0", we also still need to have it present
+	 *      so that we can "cancel out" this restpose when it comes
+	 *      time to deform some geometry, it won't cause double transforms.
+	 * - The "pchan" level offsets are the ones that animators actually
+	 *   end up animating
+	 */
 	{
 		/* add extra rolls */
 		roll1 += bone->roll1 + (!rest ? pchan->roll1 : 0.0f);
-			
 		roll2 += bone->roll2 + (!rest ? pchan->roll2 : 0.0f);
 		
 		if (bone->flag & BONE_ADD_PARENT_END_ROLL) {




More information about the Bf-blender-cvs mailing list