diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-14 23:49:40 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-09-14 23:49:40 +0400 |
commit | f302ebeb670f021d627388ab7f0e1fc682183250 (patch) | |
tree | d7a6735907224e34089be8e82ca793a5948ce4ad | |
parent | 725c30f6063354182628e4adbb563eadb4980222 (diff) |
2.5 Bugfixes
#19343: vertex paint blur was not working. shared vcol was disabled
for speed, but blurring still needs it. Also fixed brushes with
size > 64 not working correct.
#19314: non-zbuffer selection did not work with background image,
drawing it made the WM matrix go out of sync.
Forgot to mention these in previous commit:
* Manipulator type was not properly initialized, .B.blend update helps,
but still needed version patch & correct setting for new space.
* Added a utility function for the toggling region hide, instead of
duplicating the code.
* SSS preview render preprocessing pass now also uses multiple threads.
* Added version patch for unit scale, was still 0.0.
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 8 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 14 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 25ff57ca87f..2375e4e70ec 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -710,7 +710,9 @@ static int sample_backbuf_area(ViewContext *vc, int *indexar, int totface, int x if(totface+4>=MAXINDEX) return 0; - if(size>64.0) size= 64.0; + /* brecht: disabled this because it obviously failes for + brushes with size > 64, why is this here? */ + /*if(size>64.0) size= 64.0;*/ ibuf= view3d_read_backbuf(vc, x-size, y-size, x+size, y+size); if(ibuf) { @@ -1732,6 +1734,10 @@ static void vpaint_stroke_update_step(bContext *C, struct PaintStroke *stroke, P } Mat4SwapMat4(vc->rv3d->persmat, mat); + + /* was disabled because it is slow, but necessary for blur */ + if(vp->mode == VP_BLUR) + do_shared_vertexcol(me); ED_region_tag_redraw(vc->ar); diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 918aebda8e1..f8584b14e2b 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -1416,12 +1416,9 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - glMatrixMode(GL_PROJECTION); - glPushMatrix(); - glMatrixMode(GL_MODELVIEW); - glPushMatrix(); - -// glaDefine2DArea(&ar->winrct); + /* need to use wm push/pop matrix because ED_region_pixelspace + uses the wm functions too, otherwise gets out of sync */ + wmPushMatrix(); ED_region_pixelspace(ar); glEnable(GL_BLEND); @@ -1433,10 +1430,7 @@ static void draw_bgpic(Scene *scene, ARegion *ar, View3D *v3d) glPixelZoom(1.0, 1.0); glPixelTransferf(GL_ALPHA_SCALE, 1.0f); - glMatrixMode(GL_PROJECTION); - glPopMatrix(); - glMatrixMode(GL_MODELVIEW); - glPopMatrix(); + wmPopMatrix(); glDisable(GL_BLEND); if(v3d->zbuf) glEnable(GL_DEPTH_TEST); |