[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29205] branches/soc-2010-jwilkins: Merged Unlimited Clay 29142-29190

Jason Wilkins Jason.A.Wilkins at gmail.com
Fri Jun 4 04:12:57 CEST 2010


Revision: 29205
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29205
Author:   jwilkins
Date:     2010-06-04 04:12:52 +0200 (Fri, 04 Jun 2010)

Log Message:
-----------
Merged Unlimited Clay 29142-29190
Cleaned it up so that it compiles with MSVC.

Modified Paths:
--------------
    branches/soc-2010-jwilkins/config/win32-mingw-config.py
    branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
    branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c
    branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c
    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/config/win32-mingw-config.py
===================================================================
--- branches/soc-2010-jwilkins/config/win32-mingw-config.py	2010-06-04 01:43:07 UTC (rev 29204)
+++ branches/soc-2010-jwilkins/config/win32-mingw-config.py	2010-06-04 02:12:52 UTC (rev 29205)
@@ -84,7 +84,7 @@
 BF_ZLIB_INC = '${BF_ZLIB}/include'
 BF_ZLIB_LIBPATH = '${BF_ZLIB}/lib'
 
-WITH_BF_INTERNATIONAL = True
+WITH_BF_INTERNATIONAL = False
 
 BF_GETTEXT = LIBDIR + '/gcc/gettext'
 BF_GETTEXT_INC = '${BF_GETTEXT}/include'
@@ -143,7 +143,7 @@
              '${BF_OPENGL}/lib/libXmu.a', '${BF_OPENGL}/lib/libXext.a',
              '${BF_OPENGL}/lib/libX11.a', '${BF_OPENGL}/lib/libXi.a' ]
 
-WITH_BF_COLLADA = True
+WITH_BF_COLLADA = False
 BF_COLLADA = '#source/blender/collada'
 BF_COLLADA_INC = '${BF_COLLADA}'
 BF_COLLADA_LIB = 'bf_collada'

Modified: branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py
===================================================================
--- branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py	2010-06-04 01:43:07 UTC (rev 29204)
+++ branches/soc-2010-jwilkins/release/scripts/ui/space_view3d_toolbar.py	2010-06-04 02:12:52 UTC (rev 29205)
@@ -588,6 +588,7 @@
             col.prop(brush,"use_dynamic_subdiv")
             if brush.use_dynamic_subdiv ==True:
                 col.prop(brush,"detail",slider=True)
+                col.prop(brush,"smoothness",slider=True)
 
         # Texture Paint Mode #
 

Modified: branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c	2010-06-04 01:43:07 UTC (rev 29204)
+++ branches/soc-2010-jwilkins/source/blender/blenkernel/intern/brush.c	2010-06-04 02:12:52 UTC (rev 29205)
@@ -87,6 +87,7 @@
 	//brush->stroke_tool = STROKE_TOOL_FREEHAND;
 	brush->flag |= BRUSH_SPACE;
 	brush->detail = 0.25f;
+	brush->smoothness = 0.25f;
 
 	brush_curve_preset(brush, CURVE_PRESET_SMOOTH);
 	

Modified: branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c	2010-06-04 01:43:07 UTC (rev 29204)
+++ branches/soc-2010-jwilkins/source/blender/blenloader/intern/readfile.c	2010-06-04 02:12:52 UTC (rev 29205)
@@ -10915,6 +10915,11 @@
 			if(brush->detail == 0.0f)
 				brush->detail = 0.25f;
 	}
+		if (brush->smoothness == 0.0f)
+			brush->smoothness = 0.25f;
+	
+	}
+		
 	/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
 	/* WATCH IT 2!: Userdef struct init has to be in editors/interface/resources.c! */
 

Modified: branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-06-04 01:43:07 UTC (rev 29204)
+++ branches/soc-2010-jwilkins/source/blender/editors/sculpt_paint/sculpt.c	2010-06-04 02:12:52 UTC (rev 29205)
@@ -117,6 +117,7 @@
 	float clip_tolerance[3];
 	float initial_mouse[2];
 	float detail;
+	float smoothness;
 
 	/* Variants */
 	float radius;
@@ -662,10 +663,14 @@
 			Object *obedit;
 			Mesh *me;
 			EditEdge *eed;
+			float detail;
+			float smoothness;
 
 			create_EditMesh_sculpt(ss);
-	 		obedit= ob;
+			obedit= ob;
 			me= obedit->data;			
+			detail = ss->cache->detail * ss->cache->radius;
+			smoothness = ss->cache->smoothness;
 			 
 			for(eed = me->edit_mesh->edges.first; eed; eed = eed->next){
 				if (eed->f & SELECT)
@@ -680,18 +685,20 @@
 					if (edgeLength < detail)
 						EM_select_edge(eed, 0);	
 					else	
-						EM_select_edge(eed, 1);						
+						EM_select_edge(eed, 1);			
 				
 				}									
 					
 			}									
-			esubdivideflag(obedit, me->edit_mesh, SELECT,0.4,0,B_SMOOTH,1, SUBDIV_CORNER_PATH, SUBDIV_SELECT_INNER);			
+			esubdivideflag(obedit, me->edit_mesh, SELECT,smoothness,0,B_SMOOTH,1, SUBDIV_CORNER_PATH, SUBDIV_SELECT_INNER);			
 			
 			/* Clear selection */
 			for(eed = me->edit_mesh->edges.first; eed; eed = eed->next)
-				EM_select_edge(eed, 0);	
+				EM_select_edge(eed, 0);	 
 				
 			load_editMesh(ss->scene, ob);
+			
+			free_editMesh(me->edit_mesh);
 			DAG_id_flush_update(ob->data, OB_RECALC_DATA); //?					
 		} 	
 
@@ -2316,7 +2323,10 @@
 
 	cache->vc = vc;
 	cache->brush = brush;
-	if (brush->flag & BRUSH_SUBDIV) cache->detail = brush->detail;
+	if (brush->flag & BRUSH_SUBDIV){
+		cache->detail = brush->detail;
+		cache->smoothness = brush->smoothness;
+	} 
 
 	cache->mats = MEM_callocN(sizeof(bglMats), "sculpt bglMats");
 	view3d_get_transformation(vc->ar, vc->rv3d, vc->obact, cache->mats);

Modified: branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h	2010-06-04 01:43:07 UTC (rev 29204)
+++ branches/soc-2010-jwilkins/source/blender/makesdna/DNA_brush_types.h	2010-06-04 02:12:52 UTC (rev 29205)
@@ -54,10 +54,11 @@
 	struct CurveMapping *curve;	/* falloff curve */
 	struct MTex mtex;
 	
-	short blend, pad;			/* blend mode */
-	int size;					/* brush diameter */
-	int flag;					/* general purpose flag */
-	float detail;			/* dynamic subdivission detail */
+	short blend, pad;				/* blend mode */
+	int size;				/* brush diameter */
+	int flag, pad3;				/* general purpose flag */	
+	float detail;				/* dynamic subdivission detail */
+	float smoothness;			/* dynamic subdivission smoothness*/
 	float jitter;				/* jitter the position of the brush */
 	int spacing;				/* spacing of paint operations */
 	int smooth_stroke_radius;		/* turning radius (in pixels) for smooth stroke */

Modified: branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c
===================================================================
--- branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c	2010-06-04 01:43:07 UTC (rev 29204)
+++ branches/soc-2010-jwilkins/source/blender/makesrna/intern/rna_brush.c	2010-06-04 02:12:52 UTC (rev 29205)
@@ -202,6 +202,11 @@
 	RNA_def_property_ui_text(prop, "Detail", "Dynamic subdivission detail");
 	RNA_def_property_update(prop, 0, "rna_Brush_update");
 	
+	prop= RNA_def_property(srna, "smoothness", PROP_FLOAT, PROP_NONE);
+	RNA_def_property_range(prop, 0.0f, 1.0f);
+	RNA_def_property_ui_text(prop, "Smoothness", "Dynamic subdivission smoothness");
+	RNA_def_property_update(prop, 0, "rna_Brush_update");
+	
 	prop= RNA_def_property(srna, "jitter", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_sdna(prop, NULL, "jitter");
 	RNA_def_property_range(prop, 0.0f, 1.0f);





More information about the Bf-blender-cvs mailing list