[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [37253] branches/soc-2011-onion: Revision: 30173
Jason Wilkins
Jason.A.Wilkins at gmail.com
Mon Jun 6 18:11:15 CEST 2011
Revision: 37253
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=37253
Author: jwilkins
Date: 2011-06-06 16:11:14 +0000 (Mon, 06 Jun 2011)
Log Message:
-----------
Revision: 30173
Author: nicholasbishop
Date: 11:48:38 PM, Friday, July 09, 2010
Message:
* VPaint brush strength works again
* Finally fixed the mesh-turns-orange problem with glColorMaterial
**jwilkins:
**mesh doesn't turn orange, but it turns dark grey and smooth shaded.
**that seems even stranger to me
Modified Paths:
--------------
branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
Property Changed:
----------------
branches/soc-2011-onion/
Property changes on: branches/soc-2011-onion
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30162,30196,30694
/trunk/blender:36833-37206
+ /branches/soc-2010-jwilkins:28499-37009
/branches/soc-2010-nicolasbishop:28448-29913,30093,30096,30162,30173,30196,30694
/trunk/blender:36833-37206
Modified: branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c
===================================================================
--- branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c 2011-06-06 16:00:32 UTC (rev 37252)
+++ branches/soc-2011-onion/source/blender/blenkernel/intern/cdderivedmesh.c 2011-06-06 16:11:14 UTC (rev 37253)
@@ -494,11 +494,7 @@
if(mface->flag & ME_SMOOTH)
drawflags |= GPU_DRAW_SMOOTH;
- glEnable(GL_LIGHTING);
-
BLI_pbvh_draw(cddm->pbvh, partial_redraw_planes, face_nors, drawflags);
-
- glDisable(GL_LIGHTING);
}
return 1;
Modified: branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c 2011-06-06 16:00:32 UTC (rev 37252)
+++ branches/soc-2011-onion/source/blender/editors/sculpt_paint/paint_vertex.c 2011-06-06 16:11:14 UTC (rev 37253)
@@ -1948,8 +1948,9 @@
if(dist_squared < radius_squared) {
dist = sqrtf(dist_squared);
- str = brush_curve_strength(brush, dist,
- radius);
+ str = brush->alpha *
+ brush_curve_strength(brush, dist,
+ radius);
vpaint_blend(vp, col, orig_col,
vpd->paintcol,
@@ -1993,6 +1994,10 @@
if(nodes)
MEM_freeN(nodes);
+ /* was disabled because it is slow, but necessary for blur */
+ if(brush->vertexpaint_tool == VP_BLUR)
+ do_shared_vertexcol(ob->data);
+
ED_region_tag_redraw(vc->ar);
}
Modified: branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c
===================================================================
--- branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c 2011-06-06 16:00:32 UTC (rev 37252)
+++ branches/soc-2011-onion/source/blender/editors/space_view3d/drawobject.c 2011-06-06 16:11:14 UTC (rev 37253)
@@ -2746,8 +2746,17 @@
GPU_disable_material();
}
else if(ob->mode & (OB_MODE_VERTEX_PAINT|OB_MODE_TEXTURE_PAINT)) {
- if(me->mcol)
+ if(me->mcol) {
+ VPaint *vp = scene->toolsettings->vpaint;
+ /* XXX - temporary - set up nicer drawing for new vpaint */
+ if(!(vp->flag & VP_BACKBUF)) {
+ MFace *mface = get_mesh(ob)->mface;
+ GPU_enable_material(mface->mat_nr+1, NULL);
+ glEnable(GL_LIGHTING);
+ }
dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, NULL, 1, GPU_enable_material);
+ glDisable(GL_LIGHTING);
+ }
else {
glColor3f(1.0f, 1.0f, 1.0f);
dm->drawMappedFaces(dm, wpaint__setSolidDrawOptions, NULL, 0, GPU_enable_material);
Modified: branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c
===================================================================
--- branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c 2011-06-06 16:00:32 UTC (rev 37252)
+++ branches/soc-2011-onion/source/blender/gpu/intern/gpu_buffers.c 2011-06-06 16:11:14 UTC (rev 37253)
@@ -876,6 +876,7 @@
glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, buffers->index_buf);
if(buffers->color_buf) {
+ glColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);
glGetBooleanv(GL_COLOR_MATERIAL, &colmat);
glEnable(GL_COLOR_MATERIAL);
}
@@ -904,7 +905,7 @@
}
if(buffers->color_buf && !colmat)
- glDisable(GL_COLOR_MATERIAL);
+ glDisable(GL_COLOR_MATERIAL);
glShadeModel(GL_FLAT);
More information about the Bf-blender-cvs
mailing list