[Bf-blender-cvs] [5605c26fcda] blender2.8: Fix function declaration of some modifiers

Sergey Sharybin noreply at git.blender.org
Fri Jul 21 16:00:41 CEST 2017


Commit: 5605c26fcdae0426510aaa2a87da1fe372b2d9c0
Author: Sergey Sharybin
Date:   Fri Jul 21 15:54:42 2017 +0200
Branches: blender2.8
https://developer.blender.org/rB5605c26fcdae0426510aaa2a87da1fe372b2d9c0

Fix function declaration of some modifiers

Those functions did not use evaluation context.

Also fixed lots of unused variables warnings caused by commented out code which
needs to be ported away from DerivedMesh and to evaluation context.

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

M	source/blender/blenkernel/intern/armature_update.c
M	source/blender/makesrna/intern/rna_object.c
M	source/blender/modifiers/intern/MOD_remesh.c
M	source/blender/modifiers/intern/MOD_weightvgedit.c
M	source/blender/python/bmesh/bmesh_py_types.c
M	source/blender/python/intern/gpu_offscreen.c
M	source/blender/python/mathutils/mathutils_bvhtree.c

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

diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c
index f60476c2168..5d579b97619 100644
--- a/source/blender/blenkernel/intern/armature_update.c
+++ b/source/blender/blenkernel/intern/armature_update.c
@@ -125,6 +125,8 @@ static void splineik_init_tree_from_pchan(Scene *scene, Object *UNUSED(ob), bPos
 				return;
 			}
 		}
+#else
+		(void) scene;
 #endif
 	}
 
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 79403b3253e..de07785081e 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -862,6 +862,9 @@ static void rna_Object_particle_update(Main *UNUSED(bmain), Scene *scene, Pointe
 #if 0
 	Object *ob = (Object *)ptr->id.data;
 	PE_current_changed(NULL, scene, ob);
+#else
+	(void) scene;
+	(void) ptr;
 #endif
 }
 
diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c
index 88f1f72a663..f5fa6abe37b 100644
--- a/source/blender/modifiers/intern/MOD_remesh.c
+++ b/source/blender/modifiers/intern/MOD_remesh.c
@@ -204,7 +204,9 @@ static DerivedMesh *applyModifier(ModifierData *md,
 
 #else /* !WITH_MOD_REMESH */
 
-static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
+static DerivedMesh *applyModifier(ModifierData *UNUSED(md),
+                                  struct EvaluationContext *UNUSED(eval_ctx),
+                                  Object *UNUSED(ob),
                                   DerivedMesh *derivedData,
                                   ModifierApplyFlag UNUSED(flag))
 {
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index e6603b81bfd..8758524e6e4 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -164,7 +164,10 @@ static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
 	return (wmd->defgrp_name[0] == '\0');
 }
 
-static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
+static DerivedMesh *applyModifier(ModifierData *md,
+                                  struct EvaluationContext *UNUSED(eval_ctx),
+                                  Object *ob,
+                                  DerivedMesh *derivedData,
                                   ModifierApplyFlag UNUSED(flag))
 {
 	WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
diff --git a/source/blender/python/bmesh/bmesh_py_types.c b/source/blender/python/bmesh/bmesh_py_types.c
index c58ee1af66f..bfd0898f064 100644
--- a/source/blender/python/bmesh/bmesh_py_types.c
+++ b/source/blender/python/bmesh/bmesh_py_types.c
@@ -1035,6 +1035,8 @@ static PyObject *bpy_bmesh_from_object(BPy_BMesh *self, PyObject *args, PyObject
 	dm->release(dm);
 
 	Py_RETURN_NONE;
+#else
+	UNUSED_VARS(self, args, kw);
 #endif
 	return NULL;
 }
diff --git a/source/blender/python/intern/gpu_offscreen.c b/source/blender/python/intern/gpu_offscreen.c
index aa27c288293..1fb866b70b7 100644
--- a/source/blender/python/intern/gpu_offscreen.c
+++ b/source/blender/python/intern/gpu_offscreen.c
@@ -147,7 +147,7 @@ static PyObject *pygpu_offscreen_unbind(BPy_GPUOffScreen *self, PyObject *args,
 /**
  * Use with PyArg_ParseTuple's "O&" formatting.
  */
-static int pygpu_offscreen_check_matrix(PyObject *o, void *p)
+static int UNUSED_FUNCTION(pygpu_offscreen_check_matrix)(PyObject *o, void *p)
 {
 	MatrixObject **pymat_p = p;
 	MatrixObject  *pymat = (MatrixObject *)o;
@@ -246,6 +246,8 @@ static PyObject *pygpu_offscreen_draw_view3d(BPy_GPUOffScreen *self, PyObject *a
 	MEM_freeN(rv3d_mats);
 
 	Py_RETURN_NONE;
+#else
+	UNUSED_VARS(self, args, kwds);
 #endif
 	return NULL;
 }
diff --git a/source/blender/python/mathutils/mathutils_bvhtree.c b/source/blender/python/mathutils/mathutils_bvhtree.c
index 8210a9fb918..2963951838b 100644
--- a/source/blender/python/mathutils/mathutils_bvhtree.c
+++ b/source/blender/python/mathutils/mathutils_bvhtree.c
@@ -1098,6 +1098,8 @@ static DerivedMesh *bvh_get_derived_mesh(
 			}
 		}
 	}
+#else
+	UNUSED_VARS(funcname, scene, ob, use_deform, use_render, use_cage);
 #endif
 
 	return NULL;




More information about the Bf-blender-cvs mailing list