Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-07-23 22:52:31 +0400
committerTon Roosendaal <ton@blender.org>2005-07-23 22:52:31 +0400
commit948f27c0d888bbfe0f10c4350b4269166568b40d (patch)
tree2d582413b47bdddc8393c1815f8d7a1184bd4367 /source/blender/src/drawobject.c
parent6e98a38ea2268fdd96acd6c280286001bca949f6 (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/drawobject.c')
-rw-r--r--source/blender/src/drawobject.c44
1 files changed, 7 insertions, 37 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 391a1acb248..bb0fb52fa0f 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -289,38 +289,6 @@ static void draw_icon_centered(float *pos, unsigned int *rect, int rectsize)
glDrawPixels(rectsize, rectsize, GL_RGBA, GL_UNSIGNED_BYTE, rect);
}
-/* bad frontbuffer call... because it is used in transform after force_draw() */
-void helpline(float *vec)
-{
- float vecrot[3], cent[2];
- short mval[2];
-
- VECCOPY(vecrot, vec);
- if(G.obedit) Mat4MulVecfl(G.obedit->obmat, vecrot);
- else if(G.obpose) Mat4MulVecfl(G.obpose->obmat, vecrot);
-
- getmouseco_areawin(mval);
- project_float(vecrot, cent); // no overflow in extreme cases
- if(cent[0]!=3200.0f) {
- persp(PERSP_WIN);
-
- glDrawBuffer(GL_FRONT);
-
- BIF_ThemeColor(TH_WIRE);
-
- setlinestyle(3);
- glBegin(GL_LINE_STRIP);
- glVertex2sv(mval);
- glVertex2fv(cent);
- glEnd();
- setlinestyle(0);
-
- persp(PERSP_VIEW);
- glFlush(); // flush display for frontbuffer
- glDrawBuffer(GL_BACK);
- }
-}
-
void drawaxes(float size)
{
int axis;
@@ -3330,8 +3298,10 @@ static void drawtexspace(Object *ob)
}
/* draws wire outline */
-static void drawSolidSelect(Object *ob)
+static void drawSolidSelect(Base *base)
{
+ Object *ob= base->object;
+
glLineWidth(2.0);
glDepthMask(0);
@@ -3344,8 +3314,8 @@ static void drawSolidSelect(Object *ob)
drawDispListwire(&ob->disp);
}
else if(ob->type==OB_ARMATURE) {
- if(ob!=G.obpose) {
- draw_armature(ob, OB_WIRE);
+ if(!(ob->flag & OB_POSEMODE)) {
+ draw_armature(base, OB_WIRE);
}
}
@@ -3587,7 +3557,7 @@ void draw_object(Base *base)
if((G.vd->flag & V3D_SELECT_OUTLINE) && ob->type!=OB_MESH) {
if(dt>OB_WIRE && dt<OB_TEXTURE && ob!=G.obedit) {
if (!(ob->dtx&OB_DRAWWIRE) && (ob->flag&SELECT) && !(G.f&G_PICKSEL)) {
- drawSolidSelect(ob);
+ drawSolidSelect(base);
}
}
}
@@ -3723,7 +3693,7 @@ void draw_object(Base *base)
break;
case OB_ARMATURE:
if(dt>OB_WIRE) set_gl_material(0); // we use defmaterial
- draw_armature(ob, dt);
+ draw_armature(base, dt);
break;
default:
drawaxes(1.0);