[Bf-blender-cvs] [66eeb0c] PSketch: PSculpt: Brush strength can now be used to control the strength of the trackball brush

Joshua Leung noreply at git.blender.org
Sun Jan 31 14:29:03 CET 2016


Commit: 66eeb0c2bf3203f35c973bdf9aece612e07421d6
Author: Joshua Leung
Date:   Fri Jan 15 01:17:32 2016 +1300
Branches: PSketch
https://developer.blender.org/rB66eeb0c2bf3203f35c973bdf9aece612e07421d6

PSculpt: Brush strength can now be used to control the strength of the trackball brush

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

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 fc80dcb..07f2b95 100644
--- a/source/blender/editors/armature/pose_sculpt.c
+++ b/source/blender/editors/armature/pose_sculpt.c
@@ -1177,6 +1177,7 @@ static void psculpt_brush_apply(bContext *C, wmOperator *op, PointerRNA *itemptr
 				case PSCULPT_BRUSH_DRAW:
 				{
 					float smat[3][3], totmat[3][3];
+					float mat[3][3], refmat[3][3];
 					float axis1[3], axis2[3];
 					float angles[2];
 					
@@ -1198,8 +1199,11 @@ static void psculpt_brush_apply(bContext *C, wmOperator *op, PointerRNA *itemptr
 					axis_angle_normalized_to_mat3(smat, axis1, angles[0]);
 					axis_angle_normalized_to_mat3(totmat, axis2, angles[1]);
 					
-					mul_m3_m3m3(data.rmat, smat, totmat);
+					mul_m3_m3m3(mat, smat, totmat);
 					
+					/* Adjust strength of effect */
+					unit_m3(refmat);
+					interp_m3_m3m3(data.rmat, refmat, mat, brush->strength);
 					
 					/* Apply trackball transform to bones... */
 					// TODO: if no bones affected, fall back to the ones last affected (as we may have slipped off into space)




More information about the Bf-blender-cvs mailing list