[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54580] trunk/blender/source/blender: skip fix from r54579 when holes aren't used (keeps bmesh ngon filling fast )

Campbell Barton ideasman42 at gmail.com
Fri Feb 15 13:57:12 CET 2013


Revision: 54580
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54580
Author:   campbellbarton
Date:     2013-02-15 12:57:11 +0000 (Fri, 15 Feb 2013)
Log Message:
-----------
skip fix from r54579 when holes aren't used (keeps bmesh ngon filling fast)

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54579

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/scanfill.c
    trunk/blender/source/blender/nodes/shader/nodes/node_shader_brightness.c

Modified: trunk/blender/source/blender/blenlib/intern/scanfill.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/scanfill.c	2013-02-15 12:26:47 UTC (rev 54579)
+++ trunk/blender/source/blender/blenlib/intern/scanfill.c	2013-02-15 12:57:11 UTC (rev 54580)
@@ -682,7 +682,7 @@
 				ScanFillVertLink *best_sc = NULL;
 				float best_angle = 3.14f;
 				float miny;
-				int firsttime = 0;
+				bool firsttime = false;
 				
 				v1 = ed1->v2;
 				v2 = ed1->v1;
@@ -706,15 +706,20 @@
 									/* because multiple points can be inside triangle (concave holes) */
 									/* we continue searching and pick the one with sharpest corner */
 									
-									if (best_sc == NULL)
+									if (best_sc == NULL) {
 										best_sc = sc1;
+										/* only need to continue checking with holes */
+										if ((flag & BLI_SCANFILL_CALC_HOLES) == 0) {
+											break;
+										}
+									}
 									else {
 										float angle;
 										
 										/* prevent angle calc for the simple cases only 1 vertex is found */
-										if (firsttime == 0) {
+										if (firsttime == false) {
 											best_angle = angle_v2v2v2(v2->co, v1->co, best_sc->vert->co);
-											firsttime = 1;
+											firsttime = true;
 										}
 
 										angle = angle_v2v2v2(v2->co, v1->co, sc1->vert->co);

Modified: trunk/blender/source/blender/nodes/shader/nodes/node_shader_brightness.c
===================================================================
--- trunk/blender/source/blender/nodes/shader/nodes/node_shader_brightness.c	2013-02-15 12:26:47 UTC (rev 54579)
+++ trunk/blender/source/blender/nodes/shader/nodes/node_shader_brightness.c	2013-02-15 12:57:11 UTC (rev 54580)
@@ -43,7 +43,7 @@
 	{	-1, 0, ""	}
 };
 
-static int gpu_shader_brightcontrast(GPUMaterial *mat, bNode *node, GPUNodeStack *in, GPUNodeStack *out)
+static int gpu_shader_brightcontrast(GPUMaterial *mat, bNode *UNUSED(node), GPUNodeStack *in, GPUNodeStack *out)
 {
 	return GPU_stack_link(mat, "brightness_contrast", in, out);
 }




More information about the Bf-blender-cvs mailing list