[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42081] branches/bmesh/blender: svn merge ^/trunk/blender -r42077:42080

Campbell Barton ideasman42 at gmail.com
Tue Nov 22 20:04:40 CET 2011


Revision: 42081
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42081
Author:   campbellbarton
Date:     2011-11-22 19:04:40 +0000 (Tue, 22 Nov 2011)
Log Message:
-----------
svn merge ^/trunk/blender -r42077:42080

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

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/makesrna/intern/rna_dynamicpaint.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/
    branches/bmesh/blender/source/blender/editors/space_outliner/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:39992-42076
   + /trunk/blender:39992-42080


Property changes on: branches/bmesh/blender/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release:31524-42076
   + /trunk/blender/release:31524-42080


Property changes on: branches/bmesh/blender/source/blender/editors/space_outliner
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:31524-42076
   + /branches/soc-2011-pepper/source/blender/editors/space_outliner:36831-38987
/trunk/blender/source/blender/editors/space_outliner:31524-42080

Modified: branches/bmesh/blender/source/blender/makesrna/intern/rna_dynamicpaint.c
===================================================================
--- branches/bmesh/blender/source/blender/makesrna/intern/rna_dynamicpaint.c	2011-11-22 19:01:52 UTC (rev 42080)
+++ branches/bmesh/blender/source/blender/makesrna/intern/rna_dynamicpaint.c	2011-11-22 19:04:40 UTC (rev 42081)
@@ -477,7 +477,7 @@
 	
 	prop= RNA_def_property(srna, "use_dry_log", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DRY_LOG);
-	RNA_def_property_ui_text(prop, "Slow", "Use logarithmic drying (makes high values to fade faster than low values)");
+	RNA_def_property_ui_text(prop, "Slow", "Use logarithmic drying (makes high values to dry faster than low values)");
 
 	prop= RNA_def_property(srna, "use_dissolve_log", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_DISSOLVE_LOG);
@@ -551,20 +551,20 @@
 	/* output for primary surface data */
 	prop= RNA_def_property(srna, "output_name_a", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "output_name");
-	RNA_def_property_ui_text(prop, "Output name", "");
+	RNA_def_property_ui_text(prop, "Output Name", "Name used to save output from this surface");
 
 	prop= RNA_def_property(srna, "use_output_a", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_OUT1);
-	RNA_def_property_ui_text(prop, "Save layer", "Output name");
+	RNA_def_property_ui_text(prop, "Use Output", "Save this output layer");
 
 	/* output for secondary sufrace data */
 	prop= RNA_def_property(srna, "output_name_b", PROP_STRING, PROP_NONE);
 	RNA_def_property_string_sdna(prop, NULL, "output_name2");
-	RNA_def_property_ui_text(prop, "Output name", "Output name");
+	RNA_def_property_ui_text(prop, "Output Name", "Name used to save output from this surface");
 
 	prop= RNA_def_property(srna, "use_output_b", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flags", MOD_DPAINT_OUT2);
-	RNA_def_property_ui_text(prop, "Save layer", "");
+	RNA_def_property_ui_text(prop, "Use Output", "Save this output layer");
 
 	prop= RNA_def_property(srna, "preview_id", PROP_ENUM, PROP_NONE);
 	RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c	2011-11-22 19:01:52 UTC (rev 42080)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_ocean.c	2011-11-22 19:04:40 UTC (rev 42081)
@@ -268,9 +268,8 @@
 {
 	DerivedMesh *result;
 
-	MVert *mv;
-	MFace *mf;
-	MTFace *tf;
+	MVert *mverts;
+	MFace *mfaces;
 	int *origindex;
 
 	int cdlayer;
@@ -298,8 +297,8 @@
 
 	result = CDDM_new(num_verts, num_edges, num_faces);
 
-	mv = CDDM_get_verts(result);
-	mf = CDDM_get_faces(result);
+	mverts = CDDM_get_verts(result);
+	mfaces = CDDM_get_faces(result);
 	origindex= result->getFaceDataArray(result, CD_ORIGINDEX);
 
 	/* create vertices */
@@ -307,9 +306,10 @@
 	for (y=0; y < res_y+1; y++) {
 		for (x=0; x < res_x+1; x++) {
 			const int i = y*(res_x+1) + x;
-			mv[i].co[0] = ox + (x * sx);
-			mv[i].co[1] = oy + (y * sy);
-			mv[i].co[2] = 0;
+			float *co= mverts[i].co;
+			co[0] = ox + (x * sx);
+			co[1] = oy + (y * sy);
+			co[2] = 0;
 		}
 	}
 
@@ -319,12 +319,13 @@
 		for (x=0; x < res_x; x++) {
 			const int fi = y*res_x + x;
 			const int vi = y*(res_x+1) + x;
-			mf[fi].v1 = vi;
-			mf[fi].v2 = vi + 1;
-			mf[fi].v3 = vi + 1 + res_x+1;
-			mf[fi].v4 = vi + res_x+1;
+			MFace *mf= &mfaces[fi];
+			mf->v1 = vi;
+			mf->v2 = vi + 1;
+			mf->v3 = vi + 1 + res_x+1;
+			mf->v4 = vi + res_x+1;
 
-			mf[fi].flag |= ME_SMOOTH;
+			mf->flag |= ME_SMOOTH;
 
 			/* generated geometry does not map to original faces */
 			origindex[fi] = ORIGINDEX_NONE;
@@ -335,28 +336,29 @@
 
 	/* add uvs */
 	cdlayer= CustomData_number_of_layers(&result->faceData, CD_MTFACE);
-	if(cdlayer >= MAX_MTFACE)
-		return result;
-	CustomData_add_layer(&result->faceData, CD_MTFACE, CD_CALLOC, NULL, num_faces);
-	tf = CustomData_get_layer(&result->faceData, CD_MTFACE);
+	if(cdlayer < MAX_MTFACE) {
+		MTFace *tfaces= CustomData_add_layer(&result->faceData, CD_MTFACE, CD_CALLOC, NULL, num_faces);
 
-	ix = 1.0 / rx;
-	iy = 1.0 / ry;
-	#pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES)
-	for (y=0; y < res_y; y++) {
-		for (x=0; x < res_x; x++) {
-			const int i = y*res_x + x;
-			tf[i].uv[0][0] = x * ix;
-			tf[i].uv[0][1] = y * iy;
+		if (tfaces) { /* unlikely to fail */
+			ix = 1.0 / rx;
+			iy = 1.0 / ry;
+			#pragma omp parallel for private(x, y) if (rx > OMP_MIN_RES)
+			for (y=0; y < res_y; y++) {
+				for (x=0; x < res_x; x++) {
+					const int i = y*res_x + x;
+					tfaces[i].uv[0][0] = x * ix;
+					tfaces[i].uv[0][1] = y * iy;
 
-			tf[i].uv[1][0] = (x+1) * ix;
-			tf[i].uv[1][1] = y * iy;
+					tfaces[i].uv[1][0] = (x+1) * ix;
+					tfaces[i].uv[1][1] = y * iy;
 
-			tf[i].uv[2][0] = (x+1) * ix;
-			tf[i].uv[2][1] = (y+1) * iy;
+					tfaces[i].uv[2][0] = (x+1) * ix;
+					tfaces[i].uv[2][1] = (y+1) * iy;
 
-			tf[i].uv[3][0] = x * ix;
-			tf[i].uv[3][1] = (y+1) * iy;
+					tfaces[i].uv[3][0] = x * ix;
+					tfaces[i].uv[3][1] = (y+1) * iy;
+				}
+			}
 		}
 	}
 
@@ -429,37 +431,37 @@
 		int cdlayer= CustomData_number_of_layers(&dm->faceData, CD_MCOL);
 
 		if(cdlayer < MAX_MCOL) {
-			MFace *mfaces= dm->getFaceArray(dm);
-			MFace *mf;
+			MCol *mcols= CustomData_add_layer_named(&dm->faceData, CD_MCOL, CD_CALLOC, NULL, num_faces, omd->foamlayername);
 
-			MCol *mcols, *mc;
-			float foam;
+			if (mcols) { /* unlikely to fail */
+				MCol *mc;
+				MFace *mfaces= dm->getFaceArray(dm);
+				MFace *mf;
 
-			CustomData_add_layer_named(&dm->faceData, CD_MCOL, CD_CALLOC, NULL, num_faces, omd->foamlayername);
+				float foam;
 
-			mcols = dm->getFaceDataArray(dm, CD_MCOL);
+				for (i = 0, mf= mfaces; i < num_faces; i++, mf++) {
+					j= mf->v4 ? 3 : 2;
+					do {
+						const float *co= mverts[*(&mf->v1 + j)].co;
+						const float u = OCEAN_CO(size_co_inv, co[0]);
+						const float v = OCEAN_CO(size_co_inv, co[1]);
 
-			for (i = 0, mf= mfaces; i < num_faces; i++, mf++) {
-				j= mf->v4 ? 3 : 2;
-				do {
-					const float *co= mverts[*(&mf->v1 + j)].co;
-					const float u = OCEAN_CO(size_co_inv, co[0]);
-					const float v = OCEAN_CO(size_co_inv, co[1]);
+						if (omd->oceancache && omd->cached==TRUE) {
+							BKE_ocean_cache_eval_uv(omd->oceancache, &ocr, cfra, u, v);
+							foam = ocr.foam;
+							CLAMP(foam, 0.0f, 1.0f);
+						}
+						else {
+							BKE_ocean_eval_uv(omd->ocean, &ocr, u, v);
+							foam = BKE_ocean_jminus_to_foam(ocr.Jminus, omd->foam_coverage);
+						}
 
-					if (omd->oceancache && omd->cached==TRUE) {
-						BKE_ocean_cache_eval_uv(omd->oceancache, &ocr, cfra, u, v);
-						foam = ocr.foam;
-						CLAMP(foam, 0.0f, 1.0f);
-					}
-					else {
-						BKE_ocean_eval_uv(omd->ocean, &ocr, u, v);
-						foam = BKE_ocean_jminus_to_foam(ocr.Jminus, omd->foam_coverage);
-					}
-
-					mc= &mcols[i*4 + j];
-					mc->r = mc->g = mc->b = (char)(foam * 255);
-					/* mc->a = 255; */ /* no need to set */
-				} while (j--);
+						mc= &mcols[i*4 + j];
+						mc->r = mc->g = mc->b = (char)(foam * 255);
+						/* mc->a = 255; */ /* no need to set */
+					} while (j--);
+				}
 			}
 		}
 	}




More information about the Bf-blender-cvs mailing list