diff options
author | Ton Roosendaal <ton@blender.org> | 2005-11-15 01:21:56 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-11-15 01:21:56 +0300 |
commit | 621d4a700d928c6104b2a8f6f5c30f08a5f57f02 (patch) | |
tree | aa6f83caad34f50617681bac8c38ecc093a63b59 /source/blender/src/edit.c | |
parent | 091602968388a9ce82519c43b451ade054cbf538 (diff) |
Small fixes;
- Bone Ghost drawing now skips axes and names
- "Snap to cursor" now works for parent-less bones in PoseMode
- Prevented assigning in buttons of negative zero (was confusing)
Diffstat (limited to 'source/blender/src/edit.c')
-rw-r--r-- | source/blender/src/edit.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c index bb694b189be..ec8c8d75ad2 100644 --- a/source/blender/src/edit.c +++ b/source/blender/src/edit.c @@ -1155,7 +1155,23 @@ void snap_sel_to_curs() if( ( ((base)->flag & SELECT) && ((base)->lay & G.vd->lay) && ((base)->object->id.lib==0))) { ob= base->object; if(ob->flag & OB_POSEMODE) { - ; // todo + bPoseChannel *pchan; + float cursp[3]; + + Mat4Invert(ob->imat, ob->obmat); + VECCOPY(cursp, curs); + Mat4MulVecfl(ob->imat, cursp); + + for (pchan = ob->pose->chanbase.first; pchan; pchan=pchan->next) { + if(pchan->bone->flag & BONE_SELECTED) { + if(pchan->parent==NULL) { + VECCOPY(pchan->loc, cursp); + } + /* else todo... */ + } + } + ob->pose->flag |= (POSE_LOCKED|POSE_DO_UNLOCK); + ob->recalc |= OB_RECALC_DATA; } else { ob->recalc |= OB_RECALC_OB; |