[Bf-blender-cvs] [2a167da] master: Forgo one rect union function, partial rect is inferred from nodes that are tagged for update anyway. The important part of the fix was updating the previous rectangle in the draw function.

Antony Riakiotakis noreply at git.blender.org
Thu Mar 6 18:55:05 CET 2014


Commit: 2a167dafc2bf1582d6f56e0feab9f57ef9d48d5e
Author: Antony Riakiotakis
Date:   Thu Mar 6 19:54:44 2014 +0200
https://developer.blender.org/rB2a167dafc2bf1582d6f56e0feab9f57ef9d48d5e

Forgo one rect union function, partial rect is inferred from nodes that
are tagged for update anyway. The important part of the fix was updating
the previous rectangle in the draw function.

===================================================================

M	source/blender/editors/sculpt_paint/sculpt.c

===================================================================

diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index a60e3a8..e2df6a4 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -511,19 +511,6 @@ static void sculpt_extend_redraw_rect_previous(Object *ob, rcti *rect)
 	}
 }
 
-static void sculpt_extend_redraw_rect_current(Object *ob, rcti *rect)
-{
-	/* redraw rectangles do not get flushed immediately. There may be many update steps
-	 * before a redraw is issued. All those need to be accumulated this happens in the current_r
-	 * which is finally united with the previous rectangle to get the final rectangle */
-	SculptSession *ss = ob->sculpt;
-
-	if (ss->cache) {
-		if (!BLI_rcti_is_empty(&ss->cache->current_r))
-			BLI_rcti_union(rect, &ss->cache->current_r);
-	}
-}
-
 /* Get a screen-space rectangle of the modified area */
 static int sculpt_get_redraw_rect(ARegion *ar, RegionView3D *rv3d,
                                   Object *ob, rcti *rect)
@@ -567,7 +554,6 @@ void sculpt_get_redraw_planes(float planes[4][4], ARegion *ar,
 	 * the current. Thus we avoid the rectangle needlessly growing to include
 	 * all the stroke area */
 	ob->sculpt->cache->previous_r = ob->sculpt->cache->current_r;
-	BLI_rcti_init(&ob->sculpt->cache->current_r, 0, 0, 0, 0);
 
 	/* clear redraw flag from nodes */
 	if (pbvh)
@@ -4434,8 +4420,6 @@ static void sculpt_flush_update(bContext *C)
 		sculpt_update_object_bounding_box(ob);
 
 		if (sculpt_get_redraw_rect(ar, CTX_wm_region_view3d(C), ob, &r)) {
-			sculpt_extend_redraw_rect_current(ob, &r);
-
 			if (ss->cache) {
 				ss->cache->current_r = r;
 			}




More information about the Bf-blender-cvs mailing list