[Bf-blender-cvs] [198abc6] soc-2013-sketch_mesh: Code Cleanup: includes and warnings

Campbell Barton noreply at git.blender.org
Thu Nov 21 23:19:04 CET 2013


Commit: 198abc6b4b0d18f3940cf6905681b7aac346f1c4
Author: Campbell Barton
Date:   Fri Nov 22 09:16:50 2013 +1100
http://developer.blender.org/rB198abc6b4b0d18f3940cf6905681b7aac346f1c4

Code Cleanup: includes and warnings

===================================================================

M	release/datafiles/locale
M	release/scripts/addons
M	release/scripts/addons_contrib
M	scons
M	source/blender/editors/mesh/editmesh_deform_laplacian.c
M	source/blender/editors/object/object_modifier.c
M	source/blender/modifiers/intern/MOD_laplaciandeform.c

===================================================================

diff --git a/release/datafiles/locale b/release/datafiles/locale
index cb1967c..d3e0405 160000
--- a/release/datafiles/locale
+++ b/release/datafiles/locale
@@ -1 +1 @@
-Subproject commit cb1967cc63a6d2d75d2b59cdf91c5f5645285aea
+Subproject commit d3e0405103f9ccabb8e567a8c69e9d4015aaa3bb
diff --git a/release/scripts/addons b/release/scripts/addons
index 48bdb7b..4d8cb6c 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 48bdb7b52fe827cbc21d50cce3079223243414bd
+Subproject commit 4d8cb6c294727ff10afeb548759f629b0c2169d6
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 31545d2..4fe6a9e 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 31545d25c9cb41d271a3f3ef84d327708572290e
+Subproject commit 4fe6a9e046f9578a0dadb1186269ac5e406a8c15
diff --git a/scons b/scons
index ccea0f0..2d6ebcb 160000
--- a/scons
+++ b/scons
@@ -1 +1 @@
-Subproject commit ccea0f01de1c3e9210086bd447df71bae353fa07
+Subproject commit 2d6ebcb23909058b846aa232ecb2fee497924cf8
diff --git a/source/blender/editors/mesh/editmesh_deform_laplacian.c b/source/blender/editors/mesh/editmesh_deform_laplacian.c
index d829de0..cec2740 100644
--- a/source/blender/editors/mesh/editmesh_deform_laplacian.c
+++ b/source/blender/editors/mesh/editmesh_deform_laplacian.c
@@ -123,7 +123,7 @@ static LaplacianSystem * init_laplacian_system(int numv, int nums, int numh);
 static float cotan_weight(float *v1, float *v2, float *v3);
 static int laplacian_deform_invoke(struct bContext *C, struct wmOperator *op, const struct wmEvent *evt);
 static int laplacian_deform_modal(bContext *C, wmOperator *op, const wmEvent *event);
-static int laplacian_deform_cancel(bContext *C, wmOperator *op);
+static void laplacian_deform_cancel(bContext *C, wmOperator *op);
 static void laplacian_deform_update_header(bContext *C);
 static void compute_implict_rotations(SystemCustomData * data);
 static void delete_void_pointer(void *data);
@@ -182,8 +182,7 @@ static LaplacianSystem * init_laplacian_system(int numv, int nums, int numh)
 	rows = (sys->numVerts + sys->numStatics + sys->numHandlers) * 3;
 	cols = sys->numVerts * 3;
 	sys->list_uverts = (int *)MEM_callocN(sizeof(BMVert *) * sys->numVerts, "LapUverts");
-	sys->delta = (float (*)[3])MEM_callocN(sizeof(float) * sys->numVerts * 3, "LapDelta");
-	memset(sys->delta, 0.0, sizeof(float) * sys->numVerts * 3);
+	sys->delta = (float (*)[3])MEM_callocN(sizeof(float) * cols, "LapDelta");
 	return sys;
 }
 
@@ -711,7 +710,7 @@ static int laplacian_deform_modal(bContext *C, wmOperator *op, const wmEvent *ev
 
 }
 
-static int laplacian_deform_cancel(bContext *UNUSED(C), wmOperator *op)
+static void laplacian_deform_cancel(bContext *UNUSED(C), wmOperator *op)
 {
 	SystemCustomData * data;
 	data = op->customdata;
@@ -722,8 +721,6 @@ static int laplacian_deform_cancel(bContext *UNUSED(C), wmOperator *op)
 		data->ob = NULL;
 		delete_void_pointer(data);
 	}
-
-	return OPERATOR_CANCELLED;
 }
 
 wmKeyMap * laplacian_deform_modal_keymap(wmKeyConfig *keyconf)
diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c
index 1357eb0..80543d3 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -2218,7 +2218,6 @@ static int laplaciandeform_poll(bContext *C)
 
 static int laplaciandeform_bind_exec(bContext *C, wmOperator *op)
 {
-	Scene *scene = CTX_data_scene(C);
 	Object *ob = ED_object_active_context(C);
 	LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData *)edit_modifier_property_get(op, ob, eModifierType_LaplacianDeform);
 	
@@ -2258,4 +2257,4 @@ void OBJECT_OT_laplaciandeform_bind(wmOperatorType *ot)
 	/* flags */
 	ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL;
 	edit_modifier_properties(ot);
-}
\ No newline at end of file
+}
diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.c b/source/blender/modifiers/intern/MOD_laplaciandeform.c
index 196f8c0..cc779e3 100644
--- a/source/blender/modifiers/intern/MOD_laplaciandeform.c
+++ b/source/blender/modifiers/intern/MOD_laplaciandeform.c
@@ -27,24 +27,20 @@
 /** \file blender/modifiers/intern/MOD_laplaciandeform.c
  *  \ingroup modifiers
  */
- 
-#include "DNA_meshdata_types.h"
-#include "DNA_mesh_types.h"
+
 #include "BLI_math.h"
 #include "BLI_utildefines.h"
 #include "BLI_string.h"
+
 #include "MEM_guardedalloc.h"
+
 #include "BKE_mesh.h"
 #include "BKE_cdderivedmesh.h"
 #include "BKE_particle.h"
 #include "BKE_deform.h"
-#include "BKE_DerivedMesh.h"
-#include "BKE_context.h"
-#include "BKE_editmesh.h"
-#include "BKE_editmesh_bvh.h"
-#include "BKE_report.h"
-#include "MOD_modifiertypes.h"
+
 #include "MOD_util.h"
+
 #include "ONL_opennl.h"
 
 #define LAPDEFORM_SYSTEM_NOT_CHANGE 0
@@ -724,14 +720,14 @@ static void LaplacianDeformModifier_do(
 			}
 			else {
 				if (sysdif == LAPDEFORM_SYSTEM_CHANGE_VERTEXES) {
-					modifier_setError(lmd, "Verts changed from %d to %d", lmd->total_verts, numVerts);
+					modifier_setError(&lmd->modifier, "Verts changed from %d to %d", lmd->total_verts, numVerts);
 				} 
 				else if (sysdif == LAPDEFORM_SYSTEM_CHANGE_EDGES) {
-					modifier_setError(lmd, "Edges changed from %d to %d", sys->total_edges, dm->getNumEdges(dm));
+					modifier_setError(&lmd->modifier, "Edges changed from %d to %d", sys->total_edges, dm->getNumEdges(dm));
 				} 
 				else if (sysdif == LAPDEFORM_SYSTEM_CHANGE_NOT_VALID_GROUP) {
-					modifier_setError(lmd, "Vertex group  %s is not valid", sys->anchor_grp_name);
-				}				
+					modifier_setError(&lmd->modifier, "Vertex group  %s is not valid", sys->anchor_grp_name);
+				}
 			}
 		} 
 		else {




More information about the Bf-blender-cvs mailing list