[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [18427] branches/blender2.5/blender/source /blender/editors/sculpt/sculpt.c: Cleaned up some missing functions in sculpt.

Nicholas Bishop nicholasbishop at gmail.com
Fri Jan 9 06:24:17 CET 2009


Revision: 18427
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=18427
Author:   nicholasbishop
Date:     2009-01-09 06:24:11 +0100 (Fri, 09 Jan 2009)

Log Message:
-----------
Cleaned up some missing functions in sculpt.

Modified Paths:
--------------
    branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c

Modified: branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c	2009-01-09 00:38:48 UTC (rev 18426)
+++ branches/blender2.5/blender/source/blender/editors/sculpt/sculpt.c	2009-01-09 05:24:11 UTC (rev 18427)
@@ -319,7 +319,7 @@
 {
 	float size= b->size;
 	float pressure= 0; /* XXX: get_pressure(); */
-	short activedevice= get_activedevice();
+	short activedevice= 0; /* XXX: get_activedevice(); */
 	
 	if(b->sculpt_tool!=SCULPT_TOOL_GRAB) {
 		const float size_factor= sd->tablet_size / 10.0f;
@@ -340,7 +340,7 @@
 {
 	float dir= b->flag & BRUSH_DIR_IN ? -1 : 1;
 	float pressure= 1;
-	short activedevice= get_activedevice();
+	short activedevice= 0;/*XXX: get_activedevice(); */
 	float flip= a->flip ? -1:1;
 	float anchored = b->flag & BRUSH_ANCHORED ? 25 : 1;
 
@@ -431,7 +431,7 @@
 	
 	out[0]=out[1]=out[2] = out_flip[0]=out_flip[1]=out_flip[2] = 0;
 
-	if(sculptmode_brush()->flag & BRUSH_ANCHORED) {
+	if(sd->brush->flag & BRUSH_ANCHORED) {
 		for(; node; node = node->next)
 			add_norm_if(((BrushAction*)a)->symm.out, out, out_flip, a->orig_norms[node->Index]);
 	}
@@ -580,7 +580,7 @@
 {
 	float area_normal[3];
 	ActiveData *node= active_verts->first;
-	const float bstr= brush_strength(sd, sculptmode_brush(), a);
+	const float bstr= brush_strength(sd, sd->brush, a);
 
 	calc_area_normal(sd, area_normal, a, NULL, active_verts);
 
@@ -921,7 +921,7 @@
 	ActiveData *adata= 0;
 	float *vert;
 	Mesh *me= NULL; /*XXX: get_mesh(OBACT); */
-	const float bstrength= brush_strength(sd, sculptmode_brush(), a);
+	const float bstrength= brush_strength(sd, sd->brush, a);
 	KeyBlock *keyblock= NULL; /*XXX: ob_get_keyblock(OBACT); */
 	SculptSession *ss = sd->session;
 	Brush *b = sd->brush;
@@ -1169,7 +1169,7 @@
 	ModifierData *md;
 	int i;
 	const char flip = 0; /*XXX: (get_qual() == LR_SHIFTKEY); */
- 	const char anchored = sculptmode_brush()->flag & BRUSH_ANCHORED;
+ 	const int anchored = sd->brush->flag & BRUSH_ANCHORED;
  	short orig_mouse[2], dx=0, dy=0;
 	float size = brush_size(sd, b);
 
@@ -1629,7 +1629,7 @@
 		ss= sd->session;
 	}
 
-	anchored = sculptmode_brush()->flag & BRUSH_ANCHORED;
+	anchored = sd->brush->flag & BRUSH_ANCHORED;
 	smooth_stroke = (sd->flags & SCULPT_INPUT_SMOOTH) && (sd->brush->sculpt_tool != SCULPT_TOOL_GRAB) && !anchored;
 
 	if(smooth_stroke)
@@ -1710,7 +1710,7 @@
 		}
 		
 		if(firsttime || mouse[0]!=mvalo[0] || mouse[1]!=mvalo[1] ||
-		   sculptmode_brush()->flag & BRUSH_AIRBRUSH) {
+		   sd->brush->flag & BRUSH_AIRBRUSH) {
 			a->firsttime = firsttime;
 			firsttime= 0;
 
@@ -1778,7 +1778,7 @@
 				
 				/* Draw cursor */
 				if(sd->flags & SCULPT_TOOL_DRAW)
-					fdrawXORcirc((float)mouse[0],(float)mouse[1],sculptmode_brush()->size);
+					fdrawXORcirc((float)mouse[0],(float)mouse[1],sd->brush->size);
 				/* XXX: if(smooth_stroke)
 				   sculpt_stroke_draw(); */
 				
@@ -1836,9 +1836,6 @@
 {
 	G.f |= G_SCULPTMODE;
 
-	/* Called here to sanity-check the brush */
-	sculptmode_brush();
-
 	sculpt_init_session(NULL /*XXX*/);
 		
 	glEnableClientState(GL_VERTEX_ARRAY);





More information about the Bf-blender-cvs mailing list