[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30300] branches/soc-2010-jwilkins: * syntax error in space_view3d_toolbar.py

Jason Wilkins Jason.A.Wilkins at gmail.com
Wed Jul 14 10:29:16 CEST 2010


Revision: 30300
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30300
Author:   jwilkins
Date:     2010-07-14 10:29:16 +0200 (Wed, 14 Jul 2010)

Log Message:
-----------
* syntax error in space_view3d_toolbar.py
* removed wax brush

Modified Paths:
--------------
    branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
    branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
    branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
    branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c

Modified: branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py	2010-07-14 08:24:24 UTC (rev 30299)
+++ branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py	2010-07-14 08:29:16 UTC (rev 30300)
@@ -624,7 +624,7 @@
                 col.separator()
 
                 row = col.row(align=True)
-                row.prop(brush, "crease_pinch_factor", slider=True, "Pinch")
+                row.prop(brush, "crease_pinch_factor", slider=True, text="Pinch")
 
             if brush.sculpt_tool not in ('PINCH', 'INFLATE', 'SMOOTH'):
                 row = col.row(align=True)
@@ -638,7 +638,7 @@
 
                 row.prop(brush, "sculpt_plane", text="")
 
-            if brush.sculpt_tool in ('CLAY', 'CLAY_TUBES', 'WAX', 'FLATTEN', 'FILL', 'SCRAPE'):
+            if brush.sculpt_tool in ('CLAY', 'CLAY_TUBES', 'FLATTEN', 'FILL', 'SCRAPE'):
                 row = col.row(align=True)
                 row.prop(brush, "plane_offset", slider=True)
                 row.prop(brush, "use_offset_pressure", text="")
@@ -656,7 +656,7 @@
             row= col.row()
             row.prop(brush, "use_frontface", text="Front Faces Only")
 
-            if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'LAYER', 'CLAY', 'CLAY_TUBES', 'WAX'):
+            if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'LAYER', 'CLAY', 'CLAY_TUBES'):
                 col.separator()
                 col.row().prop(brush, "direction", expand=True)
             elif brush.sculpt_tool in ('FLATTEN'):
@@ -677,7 +677,7 @@
 
 
 
-            if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'INFLATE', 'LAYER', 'CLAY', 'CLAY_TUBES', 'WAX'):
+            if brush.sculpt_tool in ('DRAW', 'CREASE', 'BLOB', 'INFLATE', 'LAYER', 'CLAY', 'CLAY_TUBES'):
                 col.separator()
 
                 col.prop(brush, "use_accumulate")
@@ -1108,7 +1108,7 @@
         col = layout.column();
 
         if context.sculpt_object and context.tool_settings.sculpt:
-            if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'CLAY_TUBES', 'WAX', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN'):
+            if brush.sculpt_tool in ('DRAW', 'INFLATE', 'CLAY', 'CLAY_TUBES', 'PINCH', 'CREASE', 'BLOB', 'FLATTEN'):
                 col.prop(brush, "add_col", text="Add Color")
                 col.prop(brush, "sub_col", text="Substract Color")
             else:

Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-14 08:24:24 UTC (rev 30299)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-07-14 08:29:16 UTC (rev 30300)
@@ -596,7 +596,6 @@
 		case SCULPT_TOOL_CLAY:
 		case SCULPT_TOOL_CLAY_TUBES:
 		case SCULPT_TOOL_DRAW:
-		case SCULPT_TOOL_WAX:
 		case SCULPT_TOOL_LAYER:
 			return alpha * flip * pressure * overlap * feather;
 
@@ -2034,74 +2033,8 @@
 
 		BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
 			if (sculpt_brush_test_sq(&test, vd.co)) {
-			//if (sculpt_brush_test_cyl(&test, vd.co, ss->cache->location, p)) {
-				float intr[3];
-
-				point_plane_project(intr, vd.co, an, fc);
-
-				sub_v3_v3v3(proxy[vd.i], intr, vd.co);
-
-				if (plane_trim(ss->cache, brush, proxy[vd.i])) {
-					const float fade = bstrength*tex_strength(ss, brush, vd.co, sqrt(test.dist))*frontface(brush, an, vd.no, vd.fno);
-
-					mul_v3_fl(proxy[vd.i], fade);
-
-					if(vd.mvert)
-						vd.mvert->flag |= ME_VERT_PBVH_UPDATE;
-				}
-			}
-		}
-		BLI_pbvh_vertex_iter_end;
-	}
-}
-
-static void do_wax_brush(Sculpt *sd, SculptSession *ss, PBVHNode **nodes, int totnode)
-{
-	Brush *brush = paint_brush(&sd->paint);
-
-	float bstrength = ss->cache->bstrength;
-	float radius    = ss->cache->radius;
-	float offset    = get_offset(sd, ss);
-	
-	float displace;
-
-	float an[3]; // area normal
-	float fc[3]; // flatten center
-
-	int n;
-
-	float temp[3];
-
-	int flip;
-
-	calc_sculpt_plane(sd, ss, nodes, totnode, an, fc);
-
-	flip = bstrength < 0;
-
-	if (flip) {
-		bstrength = -bstrength;
-		radius    = -radius;
-	}
-
-	displace = radius * (0.25f+offset);
-
-	mul_v3_v3v3(temp, an, ss->cache->scale);
-	mul_v3_fl(temp, displace);
-	add_v3_v3(fc, temp);
-
-	#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
-	for (n = 0; n < totnode; n++) {
-		PBVHVertexIter vd;
-		SculptBrushTest test;
-		float (*proxy)[3];
-
-		proxy= BLI_pbvh_node_add_proxy(ss->pbvh, nodes[n])->co;
-
-		sculpt_brush_test_init(ss, &test);
-
-		BLI_pbvh_vertex_iter_begin(ss->pbvh, nodes[n], vd, PBVH_ITER_UNIQUE) {
-			if (sculpt_brush_test_sq(&test, vd.co)) {
 				if (plane_point_side_flip(vd.co, an, fc, flip)) {
+				//if (sculpt_brush_test_cyl(&test, vd.co, ss->cache->location, p)) {
 					float intr[3];
 					float val[3];
 
@@ -2470,9 +2403,6 @@
 		case SCULPT_TOOL_SCRAPE:
 			do_scrape_brush(sd, ss, nodes, totnode);
 			break;
-		case SCULPT_TOOL_WAX:
-			do_wax_brush(sd, ss, nodes, totnode);
-			break;
 		}
 
 		if (brush->sculpt_tool != SCULPT_TOOL_SMOOTH && brush->autosmooth_factor > 0) {
@@ -2551,7 +2481,6 @@
 		case SCULPT_TOOL_PINCH:
 		case SCULPT_TOOL_SCRAPE:
 		case SCULPT_TOOL_SNAKE_HOOK:
-		case SCULPT_TOOL_WAX:
 			#pragma omp parallel for schedule(guided) if (sd->flags & SCULPT_USE_OPENMP)
 			for (n= 0; n < totnode; n++) {
 				PBVHVertexIter vd;
@@ -2789,8 +2718,6 @@
 		return "Clay Brush"; break;
 	case SCULPT_TOOL_CLAY_TUBES:
 		return "Clay Tubes Brush"; break;
-	case SCULPT_TOOL_WAX:
-		return "Wax Brush"; break;
 	case SCULPT_TOOL_FILL:
 		return "Fill Brush"; break;
 	case SCULPT_TOOL_SCRAPE:
@@ -3024,7 +2951,7 @@
 		cache->original = 1;
 	}
 
-	if(ELEM8(brush->sculpt_tool, SCULPT_TOOL_DRAW,  SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB, SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_TUBES, SCULPT_TOOL_WAX))
+	if(ELEM7(brush->sculpt_tool, SCULPT_TOOL_DRAW,  SCULPT_TOOL_CREASE, SCULPT_TOOL_BLOB, SCULPT_TOOL_LAYER, SCULPT_TOOL_INFLATE, SCULPT_TOOL_CLAY, SCULPT_TOOL_CLAY_TUBES))
 		if(!(brush->flag & BRUSH_ACCUMULATE))
 			cache->original = 1;
 

Modified: branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h	2010-07-14 08:24:24 UTC (rev 30299)
+++ branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h	2010-07-14 08:29:16 UTC (rev 30300)
@@ -137,7 +137,7 @@
 #define SCULPT_TOOL_THUMB      12
 #define SCULPT_TOOL_SNAKE_HOOK 13
 #define SCULPT_TOOL_ROTATE     14
-#define SCULPT_TOOL_WAX        15
+//#define SCULPT_TOOL_WAX        15 // XXX: reuse this slot later
 #define SCULPT_TOOL_CREASE     16
 #define SCULPT_TOOL_BLOB       17
 #define SCULPT_TOOL_CLAY_TUBES 18

Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c	2010-07-14 08:24:24 UTC (rev 30299)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c	2010-07-14 08:29:16 UTC (rev 30300)
@@ -166,11 +166,10 @@
 		{SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""},
 		{SCULPT_TOOL_CLAY, "CLAY", 0, "Clay", ""},
 		{SCULPT_TOOL_CLAY_TUBES, "CLAY_TUBES", 0, "Clay Tubes", ""},
-		{SCULPT_TOOL_WAX, "WAX", 0, "Wax", ""},
 		{SCULPT_TOOL_FILL, "FILL", 0, "Fill", ""},
 		{SCULPT_TOOL_SCRAPE, "SCRAPE", 0, "Scrape", ""},
 		{0, NULL, 0, NULL, NULL}};
-	
+
 	static EnumPropertyItem brush_stroke_method_items[] = {
 		{0, "DOTS", 0, "Dots", ""},
 		{BRUSH_RESTORE_MESH, "DRAG_DOT", 0, "Drag Dot", ""},





More information about the Bf-blender-cvs mailing list