diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-01 01:18:21 +0300 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2007-01-01 01:18:21 +0300 |
commit | a8cb4a7860490e1a05b5f03d02b04ca73a7be79e (patch) | |
tree | 887ed6a55752f502c967c76b55272a8986352e41 /source/blender | |
parent | 0909fa71eaba661017d8d0902fd0d4d6e2163911 (diff) |
Fixed bug #5557, retopo - toggling fullscreen shifts painted lines
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/include/BIF_retopo.h | 1 | ||||
-rw-r--r-- | source/blender/src/editscreen.c | 7 | ||||
-rw-r--r-- | source/blender/src/retopo.c | 20 | ||||
-rw-r--r-- | source/blender/src/toets.c | 8 |
4 files changed, 29 insertions, 7 deletions
diff --git a/source/blender/include/BIF_retopo.h b/source/blender/include/BIF_retopo.h index f376caca90a..f304b554500 100644 --- a/source/blender/include/BIF_retopo.h +++ b/source/blender/include/BIF_retopo.h @@ -90,6 +90,7 @@ void retopo_free_paint(); char retopo_mesh_paint_check(); void retopo_paint_view_update(struct View3D *v3d); +void retopo_force_update(); void retopo_paint_toggle(void*,void*); char retopo_paint(const unsigned short event); void retopo_draw_paint_lines(); diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index ce6624fbdba..136a4a82273 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -92,6 +92,7 @@ #include "BIF_mywindow.h" #include "BIF_previewrender.h" #include "BIF_renderwin.h" +#include "BIF_retopo.h" #include "BIF_screen.h" #include "BIF_space.h" #include "BIF_toets.h" @@ -2377,6 +2378,9 @@ void area_fullscreen(void) /* with curarea */ setscreen(sc); wich_cursor(newa); } + + if(curarea->full) + retopo_force_update(); /* there's also events in queue for this, but we call fullscreen for render output now, and that doesn't go back to queue. Bad code, but doesn't hurt... (ton) */ @@ -2386,6 +2390,9 @@ void area_fullscreen(void) /* with curarea */ } /* bad code #2: setscreen() ends with first area active. fullscreen render assumes this too */ curarea= sc->areabase.first; + + if(!curarea->full) + retopo_force_update(); } static void area_autoplayscreen(void) diff --git a/source/blender/src/retopo.c b/source/blender/src/retopo.c index 9c23b86cbc8..5b613880fb5 100644 --- a/source/blender/src/retopo.c +++ b/source/blender/src/retopo.c @@ -60,6 +60,7 @@ #include "BLI_blenlib.h" #include "BLI_editVert.h" +#include "BSE_drawview.h" #include "BSE_edit.h" #include "BSE_view.h" @@ -430,6 +431,25 @@ void retopo_paint_view_update(struct View3D *v3d) } } +void retopo_force_update() +{ + RetopoPaintData *rpd= get_retopo_paint_data(); + + if(rpd) { + View3D *vd= rpd->paint_v3d; + + if(vd) { + if(vd->depths) vd->depths->damaged= 1; + retopo_queue_updates(vd); + if(retopo_mesh_paint_check() && vd->retopo_view_data) { + /* Force redraw */ + drawview3dspace(vd->area, vd); + retopo_paint_view_update(vd); + } + } + } +} + /* Returns 1 if event should be processed by caller, 0 otherwise */ char retopo_paint(const unsigned short event) { diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index ffa7fe218f5..45810d12745 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -337,13 +337,7 @@ void persptoetsen(unsigned short event) if(G.vd->persp<2) perspo= G.vd->persp; } - if(G.vd->depths) G.vd->depths->damaged= 1; - retopo_queue_updates(G.vd); - if(retopo_mesh_paint_check() && G.vd->retopo_view_data) { - /* Force redraw */ - drawview3dspace(G.vd->area, G.vd); - retopo_paint_view_update(G.vd); - } + retopo_force_update(); if(preview3d_event) BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT); |