forked from bartvdbraak/blender
Little issues, combined commit!
- Bug #2857: Spin didn't create nice consistant normals - removed unnecessary call to where_is_object() in init-render phase. - Added DAG_scene_sort() calls when objects were removed (join cases) - When using texture fonts, the file window header didn't display OK - Saving a file didn't set the 'wait cursor' anymore (oldie!)
This commit is contained in:
parent
1295ed872c
commit
26b2648a72
@ -2893,8 +2893,6 @@ void RE_rotateBlenderScene(void)
|
||||
}
|
||||
}
|
||||
else {
|
||||
where_is_object(ob); // too many? we got depgraph now... (ton)
|
||||
|
||||
if( (base->lay & lay) || (ob->type==OB_LAMP && (base->lay & G.scene->lay)) ) {
|
||||
|
||||
if(ob->transflag & OB_DUPLI) {
|
||||
|
@ -421,6 +421,8 @@ void join_armature(void)
|
||||
}
|
||||
}
|
||||
|
||||
DAG_scene_sort(G.scene); // because we removed object(s)
|
||||
|
||||
exit_editmode(1);
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWOOPS, 0);
|
||||
|
@ -3383,6 +3383,8 @@ void join_curve(int type)
|
||||
enter_editmode();
|
||||
exit_editmode(1);
|
||||
|
||||
DAG_scene_sort(G.scene); // because we removed object(s)
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
BIF_undo_push("Join");
|
||||
|
@ -878,7 +878,7 @@ short extrudeflag_vert(short flag, float *nor)
|
||||
EditVert *eve, *v1, *v2, *v3, *v4, *nextve;
|
||||
EditEdge *eed, *e1, *e2, *e3, *e4, *nexted;
|
||||
EditFace *efa, *efa2, *nextvl;
|
||||
short sel=0, del_old= 0;
|
||||
short sel=0, del_old= 0, is_face_sel=0;
|
||||
|
||||
if(G.obedit==0 || get_mesh(G.obedit)==0) return 0;
|
||||
|
||||
@ -923,6 +923,7 @@ short extrudeflag_vert(short flag, float *nor)
|
||||
if(e4 && e4->f2 < 3) e4->f2++;
|
||||
|
||||
efa->f1= 1;
|
||||
is_face_sel= 1; // for del_old
|
||||
}
|
||||
else if(faceselectedOR(efa, flag)) {
|
||||
e1= efa->e1;
|
||||
@ -992,11 +993,13 @@ short extrudeflag_vert(short flag, float *nor)
|
||||
*/
|
||||
|
||||
/* find if we delete old faces */
|
||||
for(eed= em->edges.first; eed; eed= eed->next) {
|
||||
if( (eed->f2==1 || eed->f2==2) ) {
|
||||
if(eed->f1==2) {
|
||||
del_old= 1;
|
||||
break;
|
||||
if(is_face_sel) {
|
||||
for(eed= em->edges.first; eed; eed= eed->next) {
|
||||
if( (eed->f2==1 || eed->f2==2) ) {
|
||||
if(eed->f1==2) {
|
||||
del_old= 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1009,7 +1012,7 @@ short extrudeflag_vert(short flag, float *nor)
|
||||
eed->v2->f |= 128;
|
||||
}
|
||||
if( (eed->f2==1 || eed->f2==2) ) {
|
||||
|
||||
|
||||
/* if del_old, the preferred normal direction is exact opposite as for keep old faces */
|
||||
if(eed->dir!=del_old) efa2= addfacelist(eed->v1, eed->v2, eed->v2->vn, eed->v1->vn, NULL, NULL);
|
||||
else efa2= addfacelist(eed->v2, eed->v1, eed->v1->vn, eed->v2->vn, NULL, NULL);
|
||||
@ -1292,7 +1295,7 @@ void delfaceflag(int flag)
|
||||
}
|
||||
|
||||
/* ********************* */
|
||||
|
||||
#if 0
|
||||
static int check_vnormal_flip(float *n, float *vnorm)
|
||||
{
|
||||
float inp;
|
||||
@ -1304,7 +1307,7 @@ static int check_vnormal_flip(float *n, float *vnorm)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void flipface(EditFace *efa)
|
||||
{
|
||||
|
@ -629,10 +629,9 @@ void split_mesh(void)
|
||||
void extrude_repeat_mesh(int steps, float offs)
|
||||
{
|
||||
float dvec[3], tmat[3][3], bmat[3][3], nor[3]= {0.0, 0.0, 0.0};
|
||||
short a,ok;
|
||||
short a;
|
||||
|
||||
TEST_EDITMESH
|
||||
waitcursor(1);
|
||||
|
||||
/* dvec */
|
||||
dvec[0]= G.vd->persinv[2][0];
|
||||
@ -648,22 +647,20 @@ void extrude_repeat_mesh(int steps, float offs)
|
||||
Mat3Inv(tmat, bmat);
|
||||
Mat3MulVecfl(tmat, dvec);
|
||||
|
||||
for(a=0;a<steps;a++) {
|
||||
ok= extrudeflag(SELECT, nor);
|
||||
if(ok==0) {
|
||||
error("No valid vertices are selected");
|
||||
break;
|
||||
}
|
||||
for(a=0; a<steps; a++) {
|
||||
extrudeflag(SELECT, nor);
|
||||
translateflag(SELECT, dvec);
|
||||
}
|
||||
|
||||
recalc_editnormals();
|
||||
|
||||
EM_fgon_flags();
|
||||
countall();
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
|
||||
waitcursor(0);
|
||||
|
||||
BIF_undo_push("Extrude Repeat");
|
||||
|
||||
}
|
||||
|
||||
void spin_mesh(int steps,int degr,float *dvec, int mode)
|
||||
@ -679,8 +676,6 @@ void spin_mesh(int steps,int degr,float *dvec, int mode)
|
||||
|
||||
TEST_EDITMESH
|
||||
|
||||
waitcursor(1);
|
||||
|
||||
/* imat and centre and size */
|
||||
Mat3CpyMat4(bmat, G.obedit->obmat);
|
||||
Mat3Inv(imat,bmat);
|
||||
@ -733,7 +728,6 @@ void spin_mesh(int steps,int degr,float *dvec, int mode)
|
||||
}
|
||||
}
|
||||
|
||||
waitcursor(0);
|
||||
if(ok==0) {
|
||||
/* no vertices or only loose ones selected, remove duplicates */
|
||||
eve= em->verts.first;
|
||||
@ -746,10 +740,10 @@ void spin_mesh(int steps,int degr,float *dvec, int mode)
|
||||
eve= nextve;
|
||||
}
|
||||
}
|
||||
|
||||
recalc_editnormals();
|
||||
|
||||
EM_fgon_flags();
|
||||
countall();
|
||||
recalc_editnormals();
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
DAG_object_flush_update(G.scene, G.obedit, OB_RECALC_DATA);
|
||||
|
||||
|
@ -121,8 +121,9 @@ void file_buttons(void)
|
||||
uiBlockEndAlign(block);
|
||||
|
||||
cpack(0x0);
|
||||
glRasterPos2i(xco+=XIC+10, 5);
|
||||
|
||||
xco+=XIC+10;
|
||||
glRasterPos2f((float)xco, 5.0);
|
||||
BIF_RasterPos((float)xco, 5.0); // stupid texture fonts
|
||||
BIF_DrawString(uiBlockGetCurFont(block), sfile->title, (U.transopts & USER_TR_BUTTONS));
|
||||
xco+= BIF_GetStringWidth(G.font, sfile->title, (U.transopts & USER_TR_BUTTONS));
|
||||
|
||||
@ -157,7 +158,7 @@ void file_buttons(void)
|
||||
|
||||
cpack(0x0);
|
||||
glRasterPos2f((float)xco, 5.0);
|
||||
BIF_RasterPos((float)xco, 5.0);
|
||||
BIF_RasterPos((float)xco, 5.0); // texture fonts
|
||||
|
||||
BIF_DrawString(G.font, naam, 0);
|
||||
}
|
||||
|
@ -438,7 +438,7 @@ void join_mesh(void)
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWBUTSSHADING, 0);
|
||||
DAG_scene_sort(G.scene);
|
||||
DAG_scene_sort(G.scene); // removed objects, need to rebuild dag
|
||||
DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA);
|
||||
|
||||
BIF_undo_push("Join Mesh");
|
||||
|
@ -499,14 +499,14 @@ void BIF_write_file(char *target)
|
||||
return;
|
||||
}
|
||||
|
||||
waitcursor(1);
|
||||
|
||||
if(G.obedit) {
|
||||
exit_editmode(0); /* 0 = no free data */
|
||||
}
|
||||
if (G.fileflags & G_AUTOPACK) {
|
||||
packAll();
|
||||
}
|
||||
|
||||
waitcursor(1); // exit_editmode sets cursor too
|
||||
|
||||
do_history(di);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user