forked from bartvdbraak/blender
Three cosmetic fixes;
- Mesh editmode, draw 'bleeding edges' works again for subsurf (not optimal) - New draw method (again!) for armature-add-bone loop. Should work now! Is also nice for cpu this version - Draw screen edges (black lines inbetween windows) should not draw leftmost
This commit is contained in:
parent
72fd0789a4
commit
0eb05b9d25
@ -2590,7 +2590,7 @@ static void drawmeshwire_wirextra(DispListMesh *dlm, int optimal, char alpha)
|
||||
|
||||
/* (bleeding edges) to illustrate selection is defined on vertex basis */
|
||||
/* but cannot do with subdivided edges... */
|
||||
if(dlm==NULL && (G.scene->selectmode & SCE_SELECT_VERTEX)) {
|
||||
if( (dlm==NULL || optimal==0) && (G.scene->selectmode & SCE_SELECT_VERTEX)) {
|
||||
glShadeModel(GL_SMOOTH);
|
||||
glBegin(GL_LINES);
|
||||
|
||||
|
@ -91,6 +91,8 @@
|
||||
#include "BSE_trans_types.h"
|
||||
#include "BSE_editaction.h"
|
||||
|
||||
#include "PIL_time.h"
|
||||
|
||||
#include "mydevice.h"
|
||||
#include "blendef.h"
|
||||
#include "nla.h"
|
||||
@ -1561,7 +1563,7 @@ static void add_bone_input (Object *ob)
|
||||
{
|
||||
float *cursLoc, cent[3], dx, dy;
|
||||
float mat[3][3], curs[3], cmat[3][3], imat[3][3], rmat[4][4], itmat[4][4];
|
||||
short xo, yo, mval[2], afbreek=0;
|
||||
short xo, yo, mval[2], mvalo[2], afbreek=0, drawall;
|
||||
short val;
|
||||
float restmat[4][4], tempVec[4];
|
||||
EditBone *bone;
|
||||
@ -1618,9 +1620,10 @@ static void add_bone_input (Object *ob)
|
||||
|
||||
/* Project cursor center to screenspace. */
|
||||
getmouseco_areawin(mval);
|
||||
xo= mval[0];
|
||||
yo= mval[1];
|
||||
xo= mvalo[0]= mval[0];
|
||||
yo= mvalo[1]= mval[1];
|
||||
window_to_3d(dvecp, xo, yo);
|
||||
drawall= 2;
|
||||
|
||||
while (1) {
|
||||
|
||||
@ -1687,7 +1690,17 @@ static void add_bone_input (Object *ob)
|
||||
Mat4One (bone->obmat);
|
||||
bone->size[0]=bone->size[1]=bone->size[2]=1.0F;
|
||||
|
||||
force_draw_plus(SPACE_BUTS, 1);
|
||||
/* only draw if... */
|
||||
if(drawall) {
|
||||
drawall--; // draw twice to have 2 identical buffers
|
||||
force_draw_all(1);
|
||||
}
|
||||
else if(mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
|
||||
mvalo[0]= mval[0];
|
||||
mvalo[1]= mval[1];
|
||||
force_draw(1);
|
||||
}
|
||||
else PIL_sleep_ms(10);
|
||||
|
||||
while(qtest()) {
|
||||
event= extern_qread(&val);
|
||||
|
@ -3023,10 +3023,11 @@ void drawscredge_area(ScrArea *sa)
|
||||
else sdrawline(x2, y1, x2, y2);
|
||||
|
||||
/* left border area */
|
||||
if(sa->headertype==HEADERTOP) sdrawline(x1, y1, x1, y2-SCR_ROUND+1);
|
||||
else if(sa->headertype==HEADERDOWN) sdrawline(x1, y1+SCR_ROUND-1, x1, y2);
|
||||
else sdrawline(x1, y1, x1, y2);
|
||||
|
||||
if(x1>0) { // otherwise it draws the emboss of window over
|
||||
if(sa->headertype==HEADERTOP) sdrawline(x1, y1, x1, y2-SCR_ROUND+1);
|
||||
else if(sa->headertype==HEADERDOWN) sdrawline(x1, y1+SCR_ROUND-1, x1, y2);
|
||||
else sdrawline(x1, y1, x1, y2);
|
||||
}
|
||||
/* top border area */
|
||||
if(sa->headertype==HEADERTOP) sdrawline(x1+SCR_ROUND, y2, x2-SCR_ROUND+1, y2);
|
||||
else sdrawline(x1, y2, x2, y2);
|
||||
|
Loading…
Reference in New Issue
Block a user