- restored default one 'solid' light
- subsurd level '0' is possible again. however; it was changed to '1' because convert-to-mesh crashes. the subsurf code doesnt give a result when level is '0', causing the convert routines to either crash, or deliver empty mesh... I added a warning in the convert routine now, and dont do anything then. - changed all glFlush() in glFinish() in editobject.c, which seems to be the right magical call to show frontbuffer drawing.
This commit is contained in:
@@ -380,8 +380,8 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
|
||||
uiDefButS(block, TOG|BIT|7, B_MAKEDISP, "SubSurf", 10,124,130,17, &me->flag, 0, 0, 0, 0, "Treats the active object as a Catmull-Clark Subdivision Surface");
|
||||
uiBlockSetCol(block, TH_AUTO);
|
||||
|
||||
uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:", 10,104,100,18, &me->subdiv, 1, 6, 0, 0, "Defines the level of subdivision to display in real time interactively");
|
||||
uiDefButS(block, NUM, B_MAKEDISP, "", 110, 104, 30, 18, &me->subdivr, 1, 6, 0, 0, "Defines the level of subdivision to apply during rendering");
|
||||
uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:", 10,104,100,18, &me->subdiv, 0, 6, 0, 0, "Defines the level of subdivision to display in real time interactively");
|
||||
uiDefButS(block, NUM, B_MAKEDISP, "", 110, 104, 30, 18, &me->subdivr, 0, 6, 0, 0, "Defines the level of subdivision to apply during rendering");
|
||||
uiDefButS(block, TOG|BIT|8, B_MAKEDISP, "Optimal", 10,84,130,17, &me->flag, 0, 0, 0, 0, "Only draws optimal wireframe");
|
||||
|
||||
if(me->msticky) val= 1.0; else val= 0.0;
|
||||
|
||||
@@ -168,7 +168,7 @@ void default_gl_light(void)
|
||||
U.light[0].spec[0]= 0.5; U.light[0].spec[1]= 0.5; U.light[0].spec[2]= 0.5;
|
||||
U.light[0].spec[3]= 1.0;
|
||||
|
||||
U.light[1].flag= 1;
|
||||
U.light[1].flag= 0;
|
||||
U.light[1].vec[0]= 0.5; U.light[1].vec[1]= 0.5; U.light[1].vec[2]= 0.1;
|
||||
U.light[1].col[0]= 0.4; U.light[1].col[1]= 0.4; U.light[1].col[2]= 0.8;
|
||||
U.light[1].spec[0]= 0.3; U.light[1].spec[1]= 0.3; U.light[1].spec[2]= 0.5;
|
||||
|
||||
@@ -2053,7 +2053,7 @@ static void tekenvertices_special(int mode, EditVert *act) /* teken = draw */
|
||||
|
||||
myloadmatrix(G.vd->viewmat);
|
||||
|
||||
glFlush();
|
||||
glFinish();
|
||||
glDrawBuffer(GL_BACK);
|
||||
|
||||
}
|
||||
@@ -7238,7 +7238,7 @@ CutCurve *get_mouse_trail(int *len, char mode){
|
||||
|
||||
if (rubberband) { /* rubberband mode, undraw last rubberband */
|
||||
sdrawXORline(curve[i-1].x, curve[i-1].y,mval[0], mval[1]);
|
||||
glFlush();
|
||||
glFinish();
|
||||
rubberband=0;
|
||||
}
|
||||
|
||||
@@ -7261,7 +7261,7 @@ CutCurve *get_mouse_trail(int *len, char mode){
|
||||
if (restart) {
|
||||
for(j=1;j<i;j++) sdrawXORline(curve[j-1].x, curve[j-1].y, curve[j].x, curve[j].y);
|
||||
if (rubberband) sdrawXORline(curve[j].x, curve[j].y, mval[0], mval[1]);
|
||||
glFlush();
|
||||
glFinish();
|
||||
rubberband=0;
|
||||
lasti=i=0;
|
||||
restart=0;
|
||||
@@ -7283,12 +7283,12 @@ CutCurve *get_mouse_trail(int *len, char mode){
|
||||
|
||||
if ((i>1)&&(i!=lasti)) { /*Draw recorded part of curve */
|
||||
sdrawXORline(curve[i-2].x, curve[i-2].y, curve[i-1].x, curve[i-1].y);
|
||||
glFlush();
|
||||
glFinish();
|
||||
}
|
||||
|
||||
if ((i==lasti)&&(i>0)) { /*Draw rubberband */
|
||||
sdrawXORline(curve[i-1].x, curve[i-1].y,mval[0], mval[1]);
|
||||
glFlush();
|
||||
glFinish();
|
||||
rubberband=1;
|
||||
}
|
||||
lasti=i;
|
||||
@@ -7309,7 +7309,7 @@ CutCurve *get_mouse_trail(int *len, char mode){
|
||||
sdrawXORline(curve[j-1].x, curve[j-1].y, curve[j].x, curve[j].y );
|
||||
}
|
||||
|
||||
glFlush();
|
||||
glFinish();
|
||||
persp(PERSP_VIEW);
|
||||
|
||||
*len=i;
|
||||
|
||||
@@ -1689,7 +1689,10 @@ void convertmenu(void)
|
||||
else if(ob->type==OB_MESH) {
|
||||
Mesh *oldme= ob->data;
|
||||
|
||||
if (oldme->flag&ME_SUBSURF) {
|
||||
if( oldme->subdiv==0 ) {
|
||||
error("No subdivision Mesh to convert available");
|
||||
}
|
||||
else if (oldme->flag&ME_SUBSURF) {
|
||||
ob->flag |= OB_DONE;
|
||||
|
||||
ob1= copy_object(ob);
|
||||
|
||||
Reference in New Issue
Block a user