[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [42963] branches/bmesh/blender/source/ blender/modifiers/intern: syncing modifiers with trunk - only small changes

Campbell Barton ideasman42 at gmail.com
Thu Dec 29 05:04:39 CET 2011


Revision: 42963
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=42963
Author:   campbellbarton
Date:     2011-12-29 04:04:27 +0000 (Thu, 29 Dec 2011)
Log Message:
-----------
syncing modifiers with trunk - only small changes

Modified Paths:
--------------
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_displace.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_weightvg_util.c

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_array.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -28,13 +28,18 @@
  *
  */
 
+/** \file blender/modifiers/intern/MOD_array.c
+ *  \ingroup modifiers
+ */
+
+
 /* Array modifier: duplicates the object multiple times along an axis */
 
 #include "MEM_guardedalloc.h"
 
+#include "BLI_math.h"
 #include "BLI_utildefines.h"
 #include "BLI_string.h"
-#include "BLI_math.h"
 #include "BLI_ghash.h"
 #include "BLI_edgehash.h"
 
@@ -106,8 +111,8 @@
 	walk(userData, ob, &amd->offset_ob);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
-					 Object *UNUSED(ob), DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+	struct Scene *UNUSED(scene), Object *UNUSED(ob), DagNode *obNode)
 {
 	ArrayModifierData *amd = (ArrayModifierData*) md;
 
@@ -365,10 +370,10 @@
 		if(cu) {
 			float tmp_mat[3][3];
 			float scale;
-
+			
 			object_to_mat3(amd->curve_ob, tmp_mat);
 			scale = mat3_to_scale(tmp_mat);
-
+				
 			if(!cu->path) {
 				cu->flag |= CU_PATH; // needed for path & bevlist
 				makeDispListCurveTypes(scene, amd->curve_ob, 0);
@@ -381,9 +386,8 @@
 	/* calculate the maximum number of copies which will fit within the
 	prescribed length */
 	if(amd->fit_type == MOD_ARR_FITLENGTH
-		  || amd->fit_type == MOD_ARR_FITCURVE)
-	{
-		float dist = sqrtf(dot_v3v3(offset[3], offset[3]));
+		  || amd->fit_type == MOD_ARR_FITCURVE) {
+		float dist = sqrt(dot_v3v3(offset[3], offset[3]));
 
 		if(dist > 1e-6f)
 			/* this gives length = first copy start to last copy end
@@ -506,26 +510,27 @@
 	return cddm;
 }
 
-static DerivedMesh *applyModifier(
-		ModifierData *md, Object *ob, DerivedMesh *derivedData,
-		int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
+						DerivedMesh *dm,
+						int UNUSED(useRenderParams),
+						int UNUSED(isFinalCalc))
 {
 	DerivedMesh *result;
 	ArrayModifierData *amd = (ArrayModifierData*) md;
 
-	result = arrayModifier_doArray(amd, md->scene, ob, derivedData, 0);
+	result = arrayModifier_doArray(amd, md->scene, ob, dm, 0);
 
-	//if(result != derivedData)
+	//if(result != dm)
 	//	CDDM_calc_normals(result);
 
 	return result;
 }
 
-static DerivedMesh *applyModifierEM(
-		ModifierData *md, Object *ob, struct BMEditMesh *UNUSED(editData),
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+						struct BMEditMesh *UNUSED(editData),
+						DerivedMesh *dm)
 {
-	return applyModifier(md, ob, derivedData, 0, 1);
+	return applyModifier(md, ob, dm, 0, 1);
 }
 
 

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_displace.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_displace.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_displace.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -188,8 +188,7 @@
 	tex_co = MEM_callocN(sizeof(*tex_co) * numVerts,
 				 "displaceModifier_do tex_co");
 	get_texture_coords((MappingInfoModifierData *)dmd, ob, dm, vertexCos, tex_co, numVerts);
-	
-	
+
 	for(i = 0; i < numVerts; ++i) {
 		TexResult texres;
 		float delta = 0, strength = dmd->strength;

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -159,7 +159,8 @@
 }
 
 static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
-									BMEditMesh *UNUSED(editData), DerivedMesh *derivedData)
+						struct BMEditMesh *UNUSED(editData),
+						DerivedMesh *derivedData)
 {
 	return applyModifier(md, ob, derivedData, 0, 1);
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_explode.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -36,11 +36,11 @@
 #include "DNA_meshdata_types.h"
 #include "DNA_scene_types.h"
 
-#include "BLI_utildefines.h"
 #include "BLI_kdtree.h"
 #include "BLI_rand.h"
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
+#include "BLI_utildefines.h"
 
 #include "BKE_cdderivedmesh.h"
 #include "BKE_deform.h"

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_mask.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -384,7 +384,6 @@
 	BLI_ghash_free(faceHash, NULL, NULL);
 	
 	/* return the new mesh */
-
 	return result;
 }
 

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_mirror.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -28,13 +28,15 @@
  *
  */
 
+/** \file blender/modifiers/intern/MOD_mirror.c
+ *  \ingroup modifiers
+ */
+
+
 #include "DNA_meshdata_types.h"
 #include "DNA_object_types.h"
 
-#include "MEM_guardedalloc.h"
-
 #include "BLI_math.h"
-#include "BLI_smallhash.h"
 #include "BLI_array.h"
 
 #include "BKE_cdderivedmesh.h"
@@ -44,6 +46,7 @@
 #include "BKE_utildefines.h"
 #include "BKE_tessmesh.h"
 
+#include "MEM_guardedalloc.h"
 #include "depsgraph_private.h"
 
 /*from MOD_array.c*/
@@ -74,13 +77,14 @@
 		 void *userData)
 {
 	MirrorModifierData *mmd = (MirrorModifierData*) md;
-	
-	if (mmd->mirror_ob)
-		walk(userData, ob, &mmd->mirror_ob);
+
+	walk(userData, ob, &mmd->mirror_ob);
 }
 
-static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UNUSED(scene),
-					  Object *UNUSED(ob), DagNode *obNode)
+static void updateDepgraph(ModifierData *md, DagForest *forest,
+						struct Scene *UNUSED(scene),
+						Object *UNUSED(ob),
+						DagNode *obNode)
 {
 	MirrorModifierData *mmd = (MirrorModifierData*) md;
 
@@ -96,7 +100,7 @@
 /* Mirror */
 #define VERT_NEW	1
 
-DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
+static DerivedMesh *doMirrorOnAxis(MirrorModifierData *mmd,
 		Object *ob,
 		DerivedMesh *dm,
 		int UNUSED(initFlags),
@@ -288,9 +292,10 @@
 	return result;
 }
 
-static DerivedMesh *applyModifier(
-		ModifierData *md, Object *ob, DerivedMesh *derivedData,
-  int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
+static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
+						DerivedMesh *derivedData,
+						int UNUSED(useRenderParams),
+						int UNUSED(isFinalCalc))
 {
 	DerivedMesh *result;
 	MirrorModifierData *mmd = (MirrorModifierData*) md;
@@ -303,9 +308,9 @@
 	return result;
 }
 
-static DerivedMesh *applyModifierEM(
-		ModifierData *md, Object *ob, struct BMEditMesh *UNUSED(editData),
-  DerivedMesh *derivedData)
+static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
+						struct BMEditMesh *UNUSED(editData),
+						DerivedMesh *derivedData)
 {
 	return applyModifier(md, ob, derivedData, 0, 1);
 }

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_ngoninterp.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -39,7 +39,6 @@
 #include "BLI_utildefines.h"
 #include "BLI_ghash.h"
 #include "BLI_array.h"
-#include "BLI_smallhash.h"
 #include "BLI_edgehash.h"
 #include "BLI_math.h"
 

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_solidify.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -41,7 +41,6 @@
 #include "BLI_math.h"
 #include "BLI_edgehash.h"
 #include "BLI_array.h"
-#include "BLI_smallhash.h"
 #include "BLI_string.h"
 
 #include "BKE_cdderivedmesh.h"

Modified: branches/bmesh/blender/source/blender/modifiers/intern/MOD_weightvg_util.c
===================================================================
--- branches/bmesh/blender/source/blender/modifiers/intern/MOD_weightvg_util.c	2011-12-29 03:39:59 UTC (rev 42962)
+++ branches/bmesh/blender/source/blender/modifiers/intern/MOD_weightvg_util.c	2011-12-29 04:04:27 UTC (rev 42963)
@@ -32,7 +32,6 @@
 #include "BLI_rand.h"
 #include "BLI_string.h"
 #include "BLI_utildefines.h"
-#include "BLI_cellalloc.h"
 
 #include "DNA_color_types.h"      /* CurveMapping. */
 #include "DNA_mesh_types.h"
@@ -223,6 +222,9 @@
 	}
 }
 
+
+
+
 /* Applies weights to given vgroup (defgroup), and optionnaly add/remove vertices from the group.
  * If dws is not NULL, it must be an array of MDeformWeight pointers of same length as weights (and
  * defgrp_idx can then have any value).




More information about the Bf-blender-cvs mailing list