[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [47256] branches/soc-2011-tomato: svn merge -r47246:47245 .

Campbell Barton ideasman42 at gmail.com
Thu May 31 10:24:56 CEST 2012


Revision: 47256
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=47256
Author:   campbellbarton
Date:     2012-05-31 08:24:53 +0000 (Thu, 31 May 2012)
Log Message:
-----------
svn merge -r47246:47245 .   --- revert 47246, this needs more considersation and planning to do this well

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

Modified Paths:
--------------
    branches/soc-2011-tomato/intern/raskter/raskter.c
    branches/soc-2011-tomato/intern/raskter/raskter.h
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
    branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
    branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c

Modified: branches/soc-2011-tomato/intern/raskter/raskter.c
===================================================================
--- branches/soc-2011-tomato/intern/raskter/raskter.c	2012-05-31 08:16:33 UTC (rev 47255)
+++ branches/soc-2011-tomato/intern/raskter/raskter.c	2012-05-31 08:24:53 UTC (rev 47256)
@@ -171,7 +171,7 @@
  * for speed, but waiting on final design choices for curve-data before eliminating data the DEM code will need
  * if it ends up being coupled with this function.
  */
-int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int num_verts, float fill_color)
+int rast_scan_fill(struct r_fill_context *ctx, struct poly_vert *verts, int num_verts)
 {
 	int x_curr;                 /* current pixel position in X */
 	int y_curr;                 /* current scan line being drawn */
@@ -308,7 +308,11 @@
 			if((y_curr >= 0) && (y_curr < ctx->rb.sizey)){
 				/* draw the pixels. */
 				for (; cpxl <= mpxl; cpxl++){
-					*cpxl = fill_color;
+					if(*cpxl < 0.5f){
+						*cpxl = 1.0f;
+					}else{
+						*cpxl = 0.0f;
+					}
 				}
 			}
 		}
@@ -384,7 +388,7 @@
 	return 1;
 }
 
-int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y, float fill_color) {
+int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y) {
 	int i;                                       /* i: Loop counter. */
 	struct poly_vert *ply;                       /* ply: Pointer to a list of integer buffer-space vertex coordinates. */
 	struct r_fill_context ctx = {0};
@@ -417,7 +421,7 @@
 	ctx.rb.sizex = buf_x;                        /* Set the output buffer size in X. (width) */
 	ctx.rb.sizey = buf_y;                        /* Set the output buffer size in Y. (height) */
 
-	i = rast_scan_fill(&ctx, ply, num, fill_color);                /* Call our rasterizer, passing in the integer coords for each vert. */
+	i = rast_scan_fill(&ctx, ply, num);                /* Call our rasterizer, passing in the integer coords for each vert. */
 	free(ply);                                   /* Free the memory allocated for the integer coordinate table. */
 	return(i);                                   /* Return the value returned by the rasterizer. */
 }

Modified: branches/soc-2011-tomato/intern/raskter/raskter.h
===================================================================
--- branches/soc-2011-tomato/intern/raskter/raskter.h	2012-05-31 08:16:33 UTC (rev 47255)
+++ branches/soc-2011-tomato/intern/raskter/raskter.h	2012-05-31 08:24:53 UTC (rev 47256)
@@ -48,7 +48,7 @@
 extern "C" {
 #endif
 
-int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y, float fill_color);
+int PLX_raskterize(float *verts, int num, float *buf, int buf_x, int buf_y);
 
 #ifdef __cplusplus
 }

Modified: branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py
===================================================================
--- branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py	2012-05-31 08:16:33 UTC (rev 47255)
+++ branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_clip.py	2012-05-31 08:24:53 UTC (rev 47256)
@@ -618,7 +618,6 @@
         col = layout.column()
         col.prop(spline, "weight_interpolation")
         col.prop(spline, "use_cyclic")
-        col.prop(spline, "mask_negate")
 
 
 class CLIP_PT_active_mask_point(Panel):

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-05-31 08:16:33 UTC (rev 47255)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/mask.c	2012-05-31 08:24:53 UTC (rev 47256)
@@ -1754,7 +1754,7 @@
 			}
 
 			if (tot_diff_point) {
-				PLX_raskterize(diff_points, tot_diff_point, buffer, width, height, (spline->flag & MASK_SPLINE_NEGATE)?0.0f:1.0f);
+				PLX_raskterize(diff_points, tot_diff_point, buffer, width, height);
 
 				MEM_freeN(diff_points);
 			}

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c	2012-05-31 08:16:33 UTC (rev 47255)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/tracking.c	2012-05-31 08:24:53 UTC (rev 47256)
@@ -1322,9 +1322,9 @@
 					fp[0] = stroke_points[i].x * width / ibuf->x - marker->search_min[0];
 					fp[1] = stroke_points[i].y * height * aspy / ibuf->x - marker->search_min[1];
 				}
-				/* TODO: not sure best method to get spline->flag here... to tell if mask is negative color */
-				PLX_raskterize(mask_points, stroke->totpoints, mask, ibuf->x, ibuf->y, /* TODO: this is color */ 1.0f);
 
+				PLX_raskterize(mask_points, stroke->totpoints, mask, ibuf->x, ibuf->y);
+
 				MEM_freeN(mask_points);
 			}
 

Modified: branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h
===================================================================
--- branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h	2012-05-31 08:16:33 UTC (rev 47255)
+++ branches/soc-2011-tomato/source/blender/makesdna/DNA_mask_types.h	2012-05-31 08:24:53 UTC (rev 47256)
@@ -120,7 +120,6 @@
 /* MaskSpline->flag */
 /* reserve (1 << 0) for SELECT */
 #define MASK_SPLINE_CYCLIC  (1 << 1)
-#define MASK_SPLINE_NEGATE  (1 << 2)
 
 /* MaskSpline->weight_interp */
 #define MASK_SPLINE_INTERP_LINEAR   1

Modified: branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c
===================================================================
--- branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c	2012-05-31 08:16:33 UTC (rev 47255)
+++ branches/soc-2011-tomato/source/blender/makesrna/intern/rna_mask.c	2012-05-31 08:24:53 UTC (rev 47256)
@@ -506,13 +506,6 @@
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", MASK_SPLINE_CYCLIC);
 	RNA_def_property_ui_text(prop, "Cyclic", "Make this spline a closed loop");
 	RNA_def_property_update(prop, 0, "rna_Mask_update_data");
-
-	/* negative mask? */
-	prop = RNA_def_property(srna, "mask_negate", PROP_BOOLEAN, PROP_NONE);
-	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
-	RNA_def_property_boolean_sdna(prop, NULL, "flag", MASK_SPLINE_NEGATE);
-	RNA_def_property_ui_text(prop, "Negate", "Make this spline subtract from mask");
-	RNA_def_property_update(prop, 0, "rna_Mask_update_data");
 }
 
 static void rna_def_mask_object(BlenderRNA *brna)




More information about the Bf-blender-cvs mailing list