[Bf-blender-cvs] [f5bdacb9be4] PSketch-279: Push -> Easing: Third attempt - Incorporate pressure/falloff

Joshua Leung noreply at git.blender.org
Tue May 8 18:03:39 CEST 2018


Commit: f5bdacb9be45015fcc155a2a4cc93a6c04736495
Author: Joshua Leung
Date:   Tue Jan 2 15:07:13 2018 +1300
Branches: PSketch-279
https://developer.blender.org/rBf5bdacb9be45015fcc155a2a4cc93a6c04736495

Push -> Easing: Third attempt - Incorporate pressure/falloff

By incorporating pressure/falloff effects, the effect becomes a lot more
controllable (as it is damped down a lot)

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

M	source/blender/editors/armature/pose_sculpt.c

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

diff --git a/source/blender/editors/armature/pose_sculpt.c b/source/blender/editors/armature/pose_sculpt.c
index 1a47dec7ea3..03ecb29c914 100644
--- a/source/blender/editors/armature/pose_sculpt.c
+++ b/source/blender/editors/armature/pose_sculpt.c
@@ -1610,26 +1610,27 @@ static void psculpt_brush_push_apply(tPoseSculptingOp *pso, bPoseChannel *pchan,
 	
 	/* apply curve endpoint effects to the components directly
 	 * (since it should be in bone space):
-	 *   - delta.x = bone.x
-	 *   - delta.z = bone.y
+	 *   - delta.x = bone.bbone_x
+	 *   - delta.z = bone.bbone_y
+	 *
+	 *   - delta.y = easing
 	 *
 	 * Note: After some testing, it seems best to do this with
 	 * no influence scaling, or else the brush just feels
 	 * "mushy" to use...
 	 */
-	// TODO: Use pressure/fac to adjust ease in/out? Or perhaps the y-values?
 	// TODO: Clamp values to prevent overshooting the max bounds?
 	if (do_head) {
 		if (do_x) pchan->curveInX += delta[0];
 		if (do_z) pchan->curveInY += delta[2];
 		
-		if (do_ease) pchan->ease1 += delta[1]; // / (pchan->bone->length / 2.0f);
+		if (do_ease) pchan->ease1 += delta[1] * fac;
 	}
 	if (do_tail) {
 		if (do_x) pchan->curveOutX += delta[0];
 		if (do_z) pchan->curveOutY += delta[2];
 		
-		if (do_ease) pchan->ease2 -= delta[1]; // / (pchan->bone->length / 2.0f);
+		if (do_ease) pchan->ease2 -= delta[1] * fac;
 	}
 	
 	/* move the endpoints of the bone too? */



More information about the Bf-blender-cvs mailing list