diff options
author | Ton Roosendaal <ton@blender.org> | 2005-07-23 22:52:31 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-07-23 22:52:31 +0400 |
commit | 948f27c0d888bbfe0f10c4350b4269166568b40d (patch) | |
tree | 2d582413b47bdddc8393c1815f8d7a1184bd4367 /source/blender/src/view.c | |
parent | 6e98a38ea2268fdd96acd6c280286001bca949f6 (diff) |
Killed silly modal PoseMode mode! :)
- PoseMode now is a state Armature Objects can be in. So, while in PoseMode
for an Armature, you can just select another Object or Armature.
- The old PoseMode options (transform, insert keys etc) are accessible
with making the Armature Object 'active' (and have object in PoseMode).
- At this moment no multiple Poses can be transformed/edited at the same
time.
- The old hotkey CTRL+TAB, and view3d header menu, still work to set an
Object's PoseMode
It was quite a lot recode, so tests & reports are welcome.
Oh, as a bonus I added Lasso Select for Bones in PoseMode! It selects using
only the line between root and tip of the Bone.
Diffstat (limited to 'source/blender/src/view.c')
-rw-r--r-- | source/blender/src/view.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/source/blender/src/view.c b/source/blender/src/view.c index ff7438dc840..3304f71c79b 100644 --- a/source/blender/src/view.c +++ b/source/blender/src/view.c @@ -458,7 +458,7 @@ void viewmove(int mode) /* cumultime(0); */ - if (G.obedit==0 && G.obpose==0 && U.uiflag & USER_ORBIT_SELECTION) { + if (G.obedit==NULL && ob && !(ob->flag & OB_POSEMODE) && U.uiflag & USER_ORBIT_SELECTION) { use_sel = 1; VECCOPY(ofs, G.vd->ofs); if (ob) { @@ -862,7 +862,6 @@ void setcameratoview3d(void) short view3d_opengl_select(unsigned int *buffer, unsigned int bufsize, short x1, short y1, short x2, short y2) { rctf rect; - Base *base; short mval[2], code, hits; G.f |= G_PICKSEL; @@ -899,23 +898,24 @@ short view3d_opengl_select(unsigned int *buffer, unsigned int bufsize, short x1 if(G.obedit && G.obedit->type==OB_MBALL) { draw_object(BASACT); } - else if ((G.obedit && G.obedit->type==OB_ARMATURE)||(G.obpose && G.obpose->type==OB_ARMATURE)) { + else if ((G.obedit && G.obedit->type==OB_ARMATURE)) { draw_object(BASACT); } else { + Base *base; + G.vd->xray= TRUE; // otherwise it postpones drawing - base= G.scene->base.first; - while(base) { + for(base= G.scene->base.first; base; base= base->next) { if(base->lay & G.vd->lay) { base->selcol= code; glLoadName(code); draw_object(base); code++; } - base= base->next; } G.vd->xray= FALSE; // restore } + glPopName(); /* see above (pushname) */ hits= glRenderMode(GL_RENDER); if(hits<0) error("Too many objects in select buffer"); @@ -1077,7 +1077,7 @@ void initlocalview() void centreview() /* like a localview without local! */ { - Base *base; + Object *ob= OBACT; float size, min[3], max[3], afm[3]; int ok=0; @@ -1088,18 +1088,18 @@ void centreview() /* like a localview without local! */ minmax_verts(min, max); // ony selected ok= 1; } - else if(G.obpose) { - if(G.obpose->pose) { + else if(ob && (ob->flag & OB_POSEMODE)) { + if(ob->pose) { bPoseChannel *pchan; float vec[3]; - for(pchan= G.obpose->pose->chanbase.first; pchan; pchan= pchan->next) { + for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) { if(pchan->bone->flag & BONE_SELECTED) { ok= 1; VECCOPY(vec, pchan->pose_head); - Mat4MulVecfl(G.obpose->obmat, vec); + Mat4MulVecfl(ob->obmat, vec); DO_MINMAX(vec, min, max); VECCOPY(vec, pchan->pose_tail); - Mat4MulVecfl(G.obpose->obmat, vec); + Mat4MulVecfl(ob->obmat, vec); DO_MINMAX(vec, min, max); } } @@ -1110,7 +1110,7 @@ void centreview() /* like a localview without local! */ ok= 1; } else { - base= FIRSTBASE; + Base *base= FIRSTBASE; while(base) { if TESTBASE(base) { minmax_object(base->object, min, max); |