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:
-rw-r--r--source/blender/blenkernel/intern/mball.c4
-rw-r--r--source/blender/src/drawobject.c5
-rw-r--r--source/blender/src/drawview.c4
-rw-r--r--source/blender/src/header_view3d.c12
-rw-r--r--source/blender/src/vpaint.c4
5 files changed, 17 insertions, 12 deletions
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index d3fb9ceac7a..e2b78affd59 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -241,8 +241,6 @@ float *make_orco_mball(Object *ob)
float loc[3], size[3];
int a;
- orcodata= MEM_mallocN(sizeof(float)*3*dl->nr, "MballOrco");
-
/* restore size and loc */
bb= ob->bb;
loc[0]= (bb->vec[0][0]+bb->vec[4][0])/2.0f;
@@ -253,6 +251,8 @@ float *make_orco_mball(Object *ob)
size[2]= bb->vec[1][2]-loc[2];
dl= ob->disp.first;
+ orcodata= MEM_mallocN(sizeof(float)*3*dl->nr, "MballOrco");
+
data= dl->verts;
orco= orcodata;
a= dl->nr;
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index 37c0f87aec6..b71ef3331db 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -4941,10 +4941,11 @@ void draw_object(Base *base, int flag)
if(ob==G.obedit);
else {
- dt= OB_SHADED;
+ if(dt<OB_SOLID)
+ zbufoff= 1;
+ dt= OB_SHADED;
glEnable(GL_DEPTH_TEST);
- if(dt<OB_SOLID) zbufoff= 1;
}
}
else {
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 344fda5eef9..cbabb79fc36 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -2942,7 +2942,7 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
BIF_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
}
- glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
}
@@ -2950,7 +2950,7 @@ void drawview3dspace(ScrArea *sa, void *spacedata)
float col[3];
BIF_GetThemeColor3fv(TH_BACK, col);
glClearColor(col[0], col[1], col[2], 0.0);
- glClear(GL_COLOR_BUFFER_BIT);
+ glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
}
myloadmatrix(v3d->viewmat);
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c
index 7f9a2d02d83..aaf34ad23cf 100644
--- a/source/blender/src/header_view3d.c
+++ b/source/blender/src/header_view3d.c
@@ -4370,8 +4370,8 @@ static uiBlock *view3d_pose_armaturemenu(void *arg_unused)
/* vertex paint menu */
static void do_view3d_vpaintmenu(void *arg, int event)
{
- /* events >= 2 are registered bpython scripts */
- if (event >= 2) BPY_menu_do_python(PYMENU_VERTEXPAINT, event - 2);
+ /* events >= 3 are registered bpython scripts */
+ if (event >= 3) BPY_menu_do_python(PYMENU_VERTEXPAINT, event - 3);
switch(event) {
case 0: /* undo vertex painting */
@@ -4383,6 +4383,9 @@ static void do_view3d_vpaintmenu(void *arg, int event)
else /* we know were in vertex paint mode */
clear_vpaint();
break;
+ case 2:
+ make_vertexcol(1);
+ break;
}
allqueue(REDRAWVIEW3D, 0);
}
@@ -4399,12 +4402,13 @@ static uiBlock *view3d_vpaintmenu(void *arg_unused)
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Vertex Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Vertex Colors|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Shaded Vertex Colors", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
- /* note that we account for the 2 previous entries with i+2:
+ /* note that we account for the 3 previous entries with i+3:
even if the last item isnt displayed, it dosent matter */
for (pym = BPyMenuTable[PYMENU_VERTEXPAINT]; pym; pym = pym->next, i++) {
uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20,
- menuwidth, 19, NULL, 0.0, 0.0, 1, i+2,
+ menuwidth, 19, NULL, 0.0, 0.0, 1, i+3,
pym->tooltip?pym->tooltip:pym->filename);
}
diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c
index 1559f9b650d..63ab0616162 100644
--- a/source/blender/src/vpaint.c
+++ b/source/blender/src/vpaint.c
@@ -1408,7 +1408,7 @@ void vertex_paint()
if(me==NULL || me->totface==0) return;
if(ob->lay & G.vd->lay); else error("Active object is not in this layer");
- if(me->mcol==NULL) make_vertexcol(1);
+ if(me->mcol==NULL) make_vertexcol(0);
if(me->mcol==NULL) return;
@@ -1629,7 +1629,7 @@ void set_vpaint(void) /* toggle */
return;
}
- if(me && me->mcol==NULL) make_vertexcol(1);
+ if(me && me->mcol==NULL) make_vertexcol(0);
if(G.f & G_VERTEXPAINT){
G.f &= ~G_VERTEXPAINT;