[Bf-blender-cvs] [36f7d091d78] PSketch-279: Grab Brush: Skip bone completely if it cannot be moved
Joshua Leung
noreply at git.blender.org
Tue May 8 18:02:48 CEST 2018
Commit: 36f7d091d7859fe9dc4075cba7063a59326a89ea
Author: Joshua Leung
Date: Sun Dec 24 10:45:38 2017 +1300
Branches: PSketch-279
https://developer.blender.org/rB36f7d091d7859fe9dc4075cba7063a59326a89ea
Grab Brush: Skip bone completely if it cannot be moved
===================================================================
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 248d6ed0692..e154bc01f02 100644
--- a/source/blender/editors/armature/pose_sculpt.c
+++ b/source/blender/editors/armature/pose_sculpt.c
@@ -913,6 +913,11 @@ static void psculpt_brush_grab_apply(tPoseSculptingOp *pso, bPoseChannel *pchan,
float cvec[3];
float fac;
+ /* skip if bone can't be transformed at all */
+ // XXX: Should this bone be included in the "affected bones" stuff?
+ if ((pchan->parent) && (pchan->bone->flag & BONE_CONNECTED))
+ return;
+
/* strength of grab/push */
fac = psculpt_brush_calc_influence(pso, dist);
@@ -948,9 +953,6 @@ static void psculpt_brush_grab_apply(tPoseSculptingOp *pso, bPoseChannel *pchan,
mul_v3_fl(cvec, fac);
/* knock out invalid transforms */
- if ((pchan->parent) && (pchan->bone->flag & BONE_CONNECTED))
- return;
-
if (pchan->protectflag & OB_LOCK_LOCX)
cvec[0] = 0.0f;
if (pchan->protectflag & OB_LOCK_LOCY)
More information about the Bf-blender-cvs
mailing list