[Bf-blender-cvs] [010b51b0a86] PSketch-279: Push Brush - 3rd attempt (ignore influence for bbone deforms)
Joshua Leung
noreply at git.blender.org
Tue May 8 18:03:19 CEST 2018
Commit: 010b51b0a86efd7051d89272eeed943c02cdabf6
Author: Joshua Leung
Date: Sun Dec 31 17:44:28 2017 +1300
Branches: PSketch-279
https://developer.blender.org/rB010b51b0a86efd7051d89272eeed943c02cdabf6
Push Brush - 3rd attempt (ignore influence for bbone deforms)
Now we're getting somewhere! By disabling the falloff/influence stuff,
the brush is now finally starting to feel more direct, and is behaving
pretty much how we'd like/expect it to work!
===================================================================
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 cffda94fe19..958080cf150 100644
--- a/source/blender/editors/armature/pose_sculpt.c
+++ b/source/blender/editors/armature/pose_sculpt.c
@@ -1591,20 +1591,28 @@ static void psculpt_brush_push_apply(tPoseSculptingOp *pso, bPoseChannel *pchan,
mul_v3_v3fl(vec, delta, fac);
- /* apply the components directly (since it should be in bone space):
- * - vec.x = bone.x
- * - vec.z = bone.y
+ /* apply curve endpoint effects to the components directly
+ * (since it should be in bone space):
+ * - delta.x = bone.x
+ * - delta.z = bone.y
*
- * - vec.y = ease in/out (proportional to bone length?)
+ * 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) {
- pchan->curveInX += vec[0];
- pchan->curveInY += vec[2];
+ pchan->curveInX += delta[0];
+ pchan->curveInY += delta[2];
}
if (do_tail) {
- pchan->curveOutX += vec[0];
- pchan->curveOutY += vec[2];
+ pchan->curveOutX += delta[0];
+ pchan->curveOutY += delta[2];
}
+
+ /* move the endpoints of the bone too? */
+ // TODO..
}
More information about the Bf-blender-cvs
mailing list