[Bf-blender-cvs] [a17123f6705] greasepencil-object: Cleanup: modifier arg wrapping

Campbell Barton noreply at git.blender.org
Sat May 12 08:29:11 CEST 2018


Commit: a17123f67052d2c54b982ae6974ec2c9800fdafd
Author: Campbell Barton
Date:   Sat May 12 08:28:36 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBa17123f67052d2c54b982ae6974ec2c9800fdafd

Cleanup: modifier arg wrapping

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

M	source/blender/modifiers/intern/MOD_gpencil_util.c
M	source/blender/modifiers/intern/MOD_gpencilbuild.c
M	source/blender/modifiers/intern/MOD_gpencilcolor.c
M	source/blender/modifiers/intern/MOD_gpencilhook.c
M	source/blender/modifiers/intern/MOD_gpencilinstance.c
M	source/blender/modifiers/intern/MOD_gpencillattice.c
M	source/blender/modifiers/intern/MOD_gpencilnoise.c
M	source/blender/modifiers/intern/MOD_gpenciloffset.c
M	source/blender/modifiers/intern/MOD_gpencilopacity.c
M	source/blender/modifiers/intern/MOD_gpencilsimplify.c
M	source/blender/modifiers/intern/MOD_gpencilsmooth.c
M	source/blender/modifiers/intern/MOD_gpencilsubdiv.c
M	source/blender/modifiers/intern/MOD_gpencilthick.c
M	source/blender/modifiers/intern/MOD_gpenciltint.c

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

diff --git a/source/blender/modifiers/intern/MOD_gpencil_util.c b/source/blender/modifiers/intern/MOD_gpencil_util.c
index 4ec38a3b912..197fb8c5aae 100644
--- a/source/blender/modifiers/intern/MOD_gpencil_util.c
+++ b/source/blender/modifiers/intern/MOD_gpencil_util.c
@@ -63,7 +63,7 @@ void gp_mod_fill_random_array(float *ar, int count)
 
 /* verify if valid layer and pass index */
 bool is_stroke_affected_by_modifier(
-		Object *ob, char *mlayername, int mpassindex, int minpoints,
+        Object *ob, char *mlayername, int mpassindex, int minpoints,
         bGPDlayer *gpl, bGPDstroke *gps, bool inv1, bool inv2)
 {
 	MaterialGPencilStyle *gp_style = BKE_material_gpencil_settings_get(ob, gps->mat_nr + 1);
diff --git a/source/blender/modifiers/intern/MOD_gpencilbuild.c b/source/blender/modifiers/intern/MOD_gpencilbuild.c
index b342d251379..0e49e4061d8 100644
--- a/source/blender/modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/modifiers/intern/MOD_gpencilbuild.c
@@ -394,8 +394,9 @@ static void build_concurrent(BuildGpencilModifierData *mmd, bGPDframe *gpf, floa
 /* --------------------------------------------- */
 
 /* Entry-point for Build Modifier */
-static void gp_generateStrokes(ModifierData *md, Depsgraph *depsgraph,
-	                        Object *UNUSED(ob), bGPDlayer *gpl, bGPDframe *gpf)
+static void gp_generateStrokes(
+        ModifierData *md, Depsgraph *depsgraph,
+        Object *UNUSED(ob), bGPDlayer *gpl, bGPDframe *gpf)
 {
 	BuildGpencilModifierData *mmd = (BuildGpencilModifierData *)md;
 	const bool reverse = (mmd->transition != GP_BUILD_TRANSITION_GROW);
@@ -509,8 +510,9 @@ static void gp_generateStrokes(ModifierData *md, Depsgraph *depsgraph,
  * which would in turn break how the modifier functions.
  */
 #if 0
-static void gp_bakeModifier(const bContext *C, const Depsgraph *UNUSED(depsgraph),
-                           ModifierData *md, Object *ob)
+static void gp_bakeModifier(
+        const bContext *C, const Depsgraph *UNUSED(depsgraph),
+        ModifierData *md, Object *ob)
 {
 	bGPdata *gpd = ob->data;
 
diff --git a/source/blender/modifiers/intern/MOD_gpencilcolor.c b/source/blender/modifiers/intern/MOD_gpencilcolor.c
index c6f425e717c..b1faaa358ba 100644
--- a/source/blender/modifiers/intern/MOD_gpencilcolor.c
+++ b/source/blender/modifiers/intern/MOD_gpencilcolor.c
@@ -66,8 +66,9 @@ static void copyData(const ModifierData *md, ModifierData *target)
 }
 
 /* color correction strokes */
-static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
-                         Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
+static void gp_deformStroke(
+        ModifierData *md, Depsgraph *UNUSED(depsgraph),
+        Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
 {
 
 	ColorGpencilModifierData *mmd = (ColorGpencilModifierData *)md;
@@ -94,8 +95,9 @@ static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
 	hsv_to_rgb_v(hsv, gps->tmp_fill);
 }
 
-static void gp_bakeModifier(const bContext *C, Depsgraph *depsgraph,
-                           ModifierData *md, Object *ob)
+static void gp_bakeModifier(
+        const bContext *C, Depsgraph *depsgraph,
+        ModifierData *md, Object *ob)
 {
 	ColorGpencilModifierData *mmd = (ColorGpencilModifierData *)md;
 	Main *bmain = CTX_data_main(C);
diff --git a/source/blender/modifiers/intern/MOD_gpencilhook.c b/source/blender/modifiers/intern/MOD_gpencilhook.c
index c395917757a..9047a3ae4f3 100644
--- a/source/blender/modifiers/intern/MOD_gpencilhook.c
+++ b/source/blender/modifiers/intern/MOD_gpencilhook.c
@@ -188,8 +188,9 @@ static void gp_hook_co_apply(struct GPHookData_cb *tData, float weight, bGPDspoi
 }
 
 /* deform stroke */
-static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
-                         Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
+static void gp_deformStroke(
+        ModifierData *md, Depsgraph *UNUSED(depsgraph),
+        Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
 {
 	HookGpencilModifierData *mmd = (HookGpencilModifierData *)md;
 	if (!mmd->object) {
@@ -255,8 +256,9 @@ static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
 /* FIXME: Ideally we be doing this on a copy of the main depsgraph
  * (i.e. one where we don't have to worry about restoring state)
  */
-static void gp_bakeModifier(const bContext *C, Depsgraph *depsgraph,
-                           ModifierData *md, Object *ob)
+static void gp_bakeModifier(
+        const bContext *C, Depsgraph *depsgraph,
+        ModifierData *md, Object *ob)
 {
 	HookGpencilModifierData *mmd = (HookGpencilModifierData *)md;
 	Main *bmain = CTX_data_main(C);
@@ -314,8 +316,8 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
 }
 
 static void foreachObjectLink(
-	ModifierData *md, Object *ob,
-	ObjectWalkFunc walk, void *userData)
+        ModifierData *md, Object *ob,
+        ObjectWalkFunc walk, void *userData)
 {
 	HookGpencilModifierData *mmd = (HookGpencilModifierData *)md;
 
diff --git a/source/blender/modifiers/intern/MOD_gpencilinstance.c b/source/blender/modifiers/intern/MOD_gpencilinstance.c
index 431a8094355..e916c9f9583 100644
--- a/source/blender/modifiers/intern/MOD_gpencilinstance.c
+++ b/source/blender/modifiers/intern/MOD_gpencilinstance.c
@@ -132,8 +132,9 @@ void BKE_gpencil_instance_modifier_instance_tfm(InstanceGpencilModifierData *mmd
 
 /* array modifier - generate geometry callback (for viewport/rendering) */
 /* TODO: How to skip this for the simplify options?   -->  !GP_SIMPLIFY_MODIF(ts, playing) */
-static void generate_geometry(ModifierData *md, Depsgraph *UNUSED(depsgraph),
-	                          Object *ob, bGPDlayer *gpl, bGPDframe *gpf)
+static void generate_geometry(
+        ModifierData *md, Depsgraph *UNUSED(depsgraph),
+        Object *ob, bGPDlayer *gpl, bGPDframe *gpf)
 {
 	InstanceGpencilModifierData *mmd = (InstanceGpencilModifierData *)md;
 	ListBase stroke_cache = {NULL, NULL};
@@ -235,8 +236,9 @@ static void generate_geometry(ModifierData *md, Depsgraph *UNUSED(depsgraph),
 }
 
 /* gp_bakeModifier - "Bake to Data" Mode */
-static void bakeModifierGP_strokes(const bContext *UNUSED(C), Depsgraph *depsgraph,
-                                      ModifierData *md, Object *ob)
+static void bakeModifierGP_strokes(
+        const bContext *UNUSED(C), Depsgraph *depsgraph,
+        ModifierData *md, Object *ob)
 {
 	bGPdata *gpd = ob->data;
 	
@@ -337,8 +339,9 @@ static void bakeModifierGP_objects(const bContext *C, ModifierData *md, Object *
 /* -------------------------------- */
 
 /* Generic "gp_generateStrokes" callback */
-static void gp_generateStrokes(ModifierData *md, Depsgraph *depsgraph,
-	                        Object *ob, bGPDlayer *gpl, bGPDframe *gpf)
+static void gp_generateStrokes(
+        ModifierData *md, Depsgraph *depsgraph,
+        Object *ob, bGPDlayer *gpl, bGPDframe *gpf)
 {
 	InstanceGpencilModifierData *mmd = (InstanceGpencilModifierData *)md;
 	
@@ -356,8 +359,9 @@ static void gp_generateStrokes(ModifierData *md, Depsgraph *depsgraph,
 }
 
 /* Generic "gp_bakeModifier" callback */
-static void gp_bakeModifier(const bContext *C, Depsgraph *depsgraph,
-                           ModifierData *md, Object *ob)
+static void gp_bakeModifier(
+        const bContext *C, Depsgraph *depsgraph,
+        ModifierData *md, Object *ob)
 {
 	InstanceGpencilModifierData *mmd = (InstanceGpencilModifierData *)md;
 	
diff --git a/source/blender/modifiers/intern/MOD_gpencillattice.c b/source/blender/modifiers/intern/MOD_gpencillattice.c
index cfa4a745f21..4f579006a8a 100644
--- a/source/blender/modifiers/intern/MOD_gpencillattice.c
+++ b/source/blender/modifiers/intern/MOD_gpencillattice.c
@@ -69,8 +69,9 @@ static void copyData(const ModifierData *md, ModifierData *target)
 	modifier_copyData_generic(md, target);
 }
 
-static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
-                         Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
+static void gp_deformStroke(
+        ModifierData *md, Depsgraph *UNUSED(depsgraph),
+        Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
 {
 	LatticeGpencilModifierData *mmd = (LatticeGpencilModifierData *)md;
 	int vindex = defgroup_name_index(ob, mmd->vgname);
@@ -102,8 +103,9 @@ static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
 /* FIXME: Ideally we be doing this on a copy of the main depsgraph
  * (i.e. one where we don't have to worry about restoring state)
  */
-static void gp_bakeModifier(const bContext *C, Depsgraph *depsgraph,
-                           ModifierData *md, Object *ob)
+static void gp_bakeModifier(
+        const bContext *C, Depsgraph *depsgraph,
+        ModifierData *md, Object *ob)
 {
 	LatticeGpencilModifierData *mmd = (LatticeGpencilModifierData *)md;
 	Main *bmain = CTX_data_main(C);
@@ -173,8 +175,8 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
 }
 
 static void foreachObjectLink(
-	ModifierData *md, Object *ob,
-	ObjectWalkFunc walk, void *userData)
+        ModifierData *md, Object *ob,
+        ObjectWalkFunc walk, void *userData)
 {
 	LatticeGpencilModifierData *mmd = (LatticeGpencilModifierData *)md;
 
diff --git a/source/blender/modifiers/intern/MOD_gpencilnoise.c b/source/blender/modifiers/intern/MOD_gpencilnoise.c
index e9b052ab2dd..250d1e353b1 100644
--- a/source/blender/modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/modifiers/intern/MOD_gpencilnoise.c
@@ -81,8 +81,9 @@ static bool dependsOnTime(ModifierData *md)
 }
 
 /* aply noise effect based on stroke direction */
-static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
-                         Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
+static void gp_deformStroke(
+        ModifierData *md, Depsgraph *UNUSED(depsgraph),
+        Object *ob, bGPDlayer *gpl, bGPDstroke *gps)
 {
 	NoiseGpencilModifierData *mmd = (NoiseGpencilModifierData *)md;
 	bGPDspoint *pt0, *pt1;
@@ -219,8 +220,9 @@ static void gp_deformStroke(ModifierData *md, Depsgraph *UNUSED(depsgraph),
 	}
 }
 
-static void gp_bakeModifier(const bContext *UNUSED(C), Depsgraph *depsgraph,
-                           ModifierDa

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list