diff options
Diffstat (limited to 'source')
55 files changed, 83 insertions, 361 deletions
diff --git a/source/blender/blenkernel/BKE_dynamicpaint.h b/source/blender/blenkernel/BKE_dynamicpaint.h index 8f795bc7535..a0814fc9183 100644 --- a/source/blender/blenkernel/BKE_dynamicpaint.h +++ b/source/blender/blenkernel/BKE_dynamicpaint.h @@ -65,7 +65,7 @@ typedef struct PaintWavePoint { struct DerivedMesh *dynamicPaint_Modifier_do(struct DynamicPaintModifierData *pmd, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob, struct DerivedMesh *dm); void dynamicPaint_Modifier_free(struct DynamicPaintModifierData *pmd); -void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tsmd); +void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tsmd); bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, struct Scene *scene); struct DynamicPaintSurface *dynamicPaint_createNewSurface(struct DynamicPaintCanvasSettings *canvas, struct Scene *scene); diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index 02337110289..a3c6b84f267 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -163,7 +163,7 @@ typedef struct ModifierTypeInfo { /* Copy instance data for this modifier type. Should copy all user * level settings to the target modifier. */ - void (*copyData)(struct ModifierData *md, struct ModifierData *target); + void (*copyData)(const struct ModifierData *md, struct ModifierData *target); /********************* Deform modifier functions *********************/ /* DEPRECATED */ diff --git a/source/blender/blenkernel/BKE_smoke.h b/source/blender/blenkernel/BKE_smoke.h index 82bfe56b0ab..70417b281d3 100644 --- a/source/blender/blenkernel/BKE_smoke.h +++ b/source/blender/blenkernel/BKE_smoke.h @@ -45,7 +45,7 @@ void smokeModifier_free(struct SmokeModifierData *smd); void smokeModifier_reset(struct SmokeModifierData *smd); void smokeModifier_reset_turbulence(struct SmokeModifierData *smd); void smokeModifier_createType(struct SmokeModifierData *smd); -void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData *tsmd); +void smokeModifier_copy(const SmokeModifierData *smd, struct SmokeModifierData *tsmd); float smoke_get_velocity_at(struct Object *ob, float position[3], float velocity[3]); int smoke_get_data_flags(struct SmokeDomainSettings *sds); diff --git a/source/blender/blenkernel/intern/dynamicpaint.c b/source/blender/blenkernel/intern/dynamicpaint.c index 0135abc7edb..848e5fbe5f8 100644 --- a/source/blender/blenkernel/intern/dynamicpaint.c +++ b/source/blender/blenkernel/intern/dynamicpaint.c @@ -1148,7 +1148,7 @@ bool dynamicPaint_createType(struct DynamicPaintModifierData *pmd, int type, str return true; } -void dynamicPaint_Modifier_copy(struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tpmd) +void dynamicPaint_Modifier_copy(const struct DynamicPaintModifierData *pmd, struct DynamicPaintModifierData *tpmd) { /* Init modifier */ tpmd->type = pmd->type; diff --git a/source/blender/blenkernel/intern/smoke.c b/source/blender/blenkernel/intern/smoke.c index 2c601e9429a..272af8341de 100644 --- a/source/blender/blenkernel/intern/smoke.c +++ b/source/blender/blenkernel/intern/smoke.c @@ -606,7 +606,7 @@ void smokeModifier_createType(struct SmokeModifierData *smd) } } -void smokeModifier_copy(struct SmokeModifierData *smd, struct SmokeModifierData *tsmd) +void smokeModifier_copy(const struct SmokeModifierData *smd, struct SmokeModifierData *tsmd) { tsmd->type = smd->type; tsmd->time = smd->time; diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c index dc255ff2f12..fc077a4ca61 100644 --- a/source/blender/modifiers/intern/MOD_armature.c +++ b/source/blender/modifiers/intern/MOD_armature.c @@ -64,10 +64,10 @@ static void initData(ModifierData *md) amd->deformflag = ARM_DEF_VGROUP; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { #if 0 - ArmatureModifierData *amd = (ArmatureModifierData *) md; + const ArmatureModifierData *amd = (const ArmatureModifierData *) md; #endif ArmatureModifierData *tamd = (ArmatureModifierData *) target; diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index 01414a3dfad..45678947df5 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -77,15 +77,6 @@ static void initData(ModifierData *md) amd->flags = 0; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - ArrayModifierData *amd = (ArrayModifierData *) md; - ArrayModifierData *tamd = (ArrayModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static void foreachObjectLink( ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) @@ -770,7 +761,7 @@ ModifierTypeInfo modifierType_Array = { eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_bevel.c b/source/blender/modifiers/intern/MOD_bevel.c index 7999a79bb08..81a4e94386f 100644 --- a/source/blender/modifiers/intern/MOD_bevel.c +++ b/source/blender/modifiers/intern/MOD_bevel.c @@ -65,15 +65,6 @@ static void initData(ModifierData *md) bmd->defgrp_name[0] = '\0'; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - BevelModifierData *bmd = (BevelModifierData *) md; - BevelModifierData *tbmd = (BevelModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { BevelModifierData *bmd = (BevelModifierData *)md; @@ -203,7 +194,7 @@ ModifierTypeInfo modifierType_Bevel = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index 5057f69bf23..0da38979bdd 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -70,15 +70,6 @@ static void initData(ModifierData *md) bmd->double_threshold = 1e-6f; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - BooleanModifierData *bmd = (BooleanModifierData *) md; - BooleanModifierData *tbmd = (BooleanModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { BooleanModifierData *bmd = (BooleanModifierData *) md; @@ -351,7 +342,7 @@ ModifierTypeInfo modifierType_Boolean = { /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_UsesPointCache, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c index 048e9ce33c0..f9cd57cc460 100644 --- a/source/blender/modifiers/intern/MOD_build.c +++ b/source/blender/modifiers/intern/MOD_build.c @@ -66,15 +66,6 @@ static void initData(ModifierData *md) bmd->length = 100.0; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - BuildModifierData *bmd = (BuildModifierData *) md; - BuildModifierData *tbmd = (BuildModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static bool dependsOnTime(ModifierData *UNUSED(md)) { return true; @@ -313,7 +304,8 @@ ModifierTypeInfo modifierType_Build = { /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, - /* copyData */ copyData, + + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 11c8ba4a9cd..18c64a24392 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -60,16 +60,6 @@ static void initData(ModifierData *md) cmd->object = NULL; } - -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - CastModifierData *cmd = (CastModifierData *) md; - CastModifierData *tcmd = (CastModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { CastModifierData *cmd = (CastModifierData *) md; @@ -479,7 +469,7 @@ ModifierTypeInfo modifierType_Cast = { eModifierTypeFlag_AcceptsLattice | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ deformVerts, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c index 315ea73d086..cadb9e5dc96 100644 --- a/source/blender/modifiers/intern/MOD_cloth.c +++ b/source/blender/modifiers/intern/MOD_cloth.c @@ -140,9 +140,9 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) return dataMask; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - ClothModifierData *clmd = (ClothModifierData *) md; + const ClothModifierData *clmd = (const ClothModifierData *) md; ClothModifierData *tclmd = (ClothModifierData *) target; if (tclmd->sim_parms) { diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c index d80a2121db6..6ec1f4d8e5c 100644 --- a/source/blender/modifiers/intern/MOD_collision.c +++ b/source/blender/modifiers/intern/MOD_collision.c @@ -81,10 +81,7 @@ static void freeData(ModifierData *md) MEM_SAFE_FREE(collmd->current_xnew); MEM_SAFE_FREE(collmd->current_v); - if (collmd->tri) { - MEM_freeN((void *)collmd->tri); - collmd->tri = NULL; - } + MEM_SAFE_FREE(collmd->tri); collmd->time_x = collmd->time_xnew = -1000; collmd->mvert_num = 0; diff --git a/source/blender/modifiers/intern/MOD_correctivesmooth.c b/source/blender/modifiers/intern/MOD_correctivesmooth.c index 186f5a7cf89..aae58f4bbaf 100644 --- a/source/blender/modifiers/intern/MOD_correctivesmooth.c +++ b/source/blender/modifiers/intern/MOD_correctivesmooth.c @@ -80,9 +80,9 @@ static void initData(ModifierData *md) } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - CorrectiveSmoothModifierData *csmd = (CorrectiveSmoothModifierData *)md; + const CorrectiveSmoothModifierData *csmd = (const CorrectiveSmoothModifierData *)md; CorrectiveSmoothModifierData *tcsmd = (CorrectiveSmoothModifierData *)target; modifier_copyData_generic(md, target); diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c index e7f7bed2055..805d27de273 100644 --- a/source/blender/modifiers/intern/MOD_curve.c +++ b/source/blender/modifiers/intern/MOD_curve.c @@ -59,15 +59,6 @@ static void initData(ModifierData *md) cmd->defaxis = MOD_CURVE_POSX; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - CurveModifierData *cmd = (CurveModifierData *) md; - CurveModifierData *tcmd = (CurveModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { CurveModifierData *cmd = (CurveModifierData *)md; @@ -168,7 +159,7 @@ ModifierTypeInfo modifierType_Curve = { eModifierTypeFlag_AcceptsLattice | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index 863a6a3bb14..21d1a6a865d 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -201,15 +201,6 @@ static DerivedMesh *applyModifier(ModifierData *md, const ModifierEvalContext *c #undef HIGH_POLY_WARNING #undef DT_TYPES_AFFECT_MESH -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - DataTransferModifierData *dtmd = (DecimateModifierData *) md; - DataTransferModifierData *tdtmd = (DecimateModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - ModifierTypeInfo modifierType_DataTransfer = { /* name */ "DataTransfer", /* structName */ "DataTransferModifierData", @@ -220,7 +211,7 @@ ModifierTypeInfo modifierType_DataTransfer = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_UsesPreview, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_decimate.c b/source/blender/modifiers/intern/MOD_decimate.c index dfa76e53f84..3a7ccc44f74 100644 --- a/source/blender/modifiers/intern/MOD_decimate.c +++ b/source/blender/modifiers/intern/MOD_decimate.c @@ -64,15 +64,6 @@ static void initData(ModifierData *md) dmd->defgrp_factor = 1.0; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - DecimateModifierData *dmd = (DecimateModifierData *) md; - DecimateModifierData *tdmd = (DecimateModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { DecimateModifierData *dmd = (DecimateModifierData *) md; @@ -215,7 +206,8 @@ ModifierTypeInfo modifierType_Decimate = { /* type */ eModifierTypeType_Nonconstructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs, - /* copyData */ copyData, + + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c index ecb4da71699..c28bb41647f 100644 --- a/source/blender/modifiers/intern/MOD_displace.c +++ b/source/blender/modifiers/intern/MOD_displace.c @@ -72,16 +72,6 @@ static void initData(ModifierData *md) dmd->space = MOD_DISP_SPACE_LOCAL; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - DisplaceModifierData *dmd = (DisplaceModifierData *) md; - DisplaceModifierData *tdmd = (DisplaceModifierData *) target; -#endif - - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { DisplaceModifierData *dmd = (DisplaceModifierData *)md; @@ -417,7 +407,7 @@ ModifierTypeInfo modifierType_Displace = { /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c index ea8ebbc52e0..f951c96116d 100644 --- a/source/blender/modifiers/intern/MOD_dynamicpaint.c +++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c @@ -56,9 +56,9 @@ static void initData(ModifierData *md) pmd->type = MOD_DYNAMICPAINT_TYPE_CANVAS; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - DynamicPaintModifierData *pmd = (DynamicPaintModifierData *)md; + const DynamicPaintModifierData *pmd = (const DynamicPaintModifierData *)md; DynamicPaintModifierData *tpmd = (DynamicPaintModifierData *)target; dynamicPaint_Modifier_copy(pmd, tpmd); diff --git a/source/blender/modifiers/intern/MOD_edgesplit.c b/source/blender/modifiers/intern/MOD_edgesplit.c index 10e26a918be..d2e36c39816 100644 --- a/source/blender/modifiers/intern/MOD_edgesplit.c +++ b/source/blender/modifiers/intern/MOD_edgesplit.c @@ -124,15 +124,6 @@ static void initData(ModifierData *md) emd->flags = MOD_EDGESPLIT_FROMANGLE | MOD_EDGESPLIT_FROMFLAG; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - EdgeSplitModifierData *emd = (EdgeSplitModifierData *) md; - EdgeSplitModifierData *temd = (EdgeSplitModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, Mesh *mesh) @@ -160,7 +151,7 @@ ModifierTypeInfo modifierType_EdgeSplit = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c index 52139238502..4167d60a409 100644 --- a/source/blender/modifiers/intern/MOD_explode.c +++ b/source/blender/modifiers/intern/MOD_explode.c @@ -68,10 +68,10 @@ static void freeData(ModifierData *md) MEM_SAFE_FREE(emd->facepa); } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { #if 0 - ExplodeModifierData *emd = (ExplodeModifierData *) md; + const ExplodeModifierData *emd = (const ExplodeModifierData *) md; #endif ExplodeModifierData *temd = (ExplodeModifierData *) target; diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c index 90cd8a58cb1..bc01ca30203 100644 --- a/source/blender/modifiers/intern/MOD_fluidsim.c +++ b/source/blender/modifiers/intern/MOD_fluidsim.c @@ -65,9 +65,9 @@ static void freeData(ModifierData *md) fluidsim_free(fluidmd); } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - FluidsimModifierData *fluidmd = (FluidsimModifierData *) md; + const FluidsimModifierData *fluidmd = (const FluidsimModifierData *) md; FluidsimModifierData *tfluidmd = (FluidsimModifierData *) target; if (fluidmd->fss) { diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c index ff2ed7108f2..829546521a0 100644 --- a/source/blender/modifiers/intern/MOD_hook.c +++ b/source/blender/modifiers/intern/MOD_hook.c @@ -60,9 +60,9 @@ static void initData(ModifierData *md) hmd->flag = 0; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - HookModifierData *hmd = (HookModifierData *) md; + const HookModifierData *hmd = (const HookModifierData *) md; HookModifierData *thmd = (HookModifierData *) target; modifier_copyData_generic(md, target); diff --git a/source/blender/modifiers/intern/MOD_laplaciandeform.c b/source/blender/modifiers/intern/MOD_laplaciandeform.c index ac39f4696ea..2dbe2af763b 100644 --- a/source/blender/modifiers/intern/MOD_laplaciandeform.c +++ b/source/blender/modifiers/intern/MOD_laplaciandeform.c @@ -698,9 +698,9 @@ static void initData(ModifierData *md) lmd->flag = 0; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData *)md; + const LaplacianDeformModifierData *lmd = (const LaplacianDeformModifierData *)md; LaplacianDeformModifierData *tlmd = (LaplacianDeformModifierData *)target; modifier_copyData_generic(md, target); diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c index 3b63a3ef5f8..b683003baad 100644 --- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c +++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c @@ -81,7 +81,6 @@ static CustomDataMask required_data_mask(Object *ob, ModifierData *md); static bool is_disabled(ModifierData *md, int useRenderParams); static float compute_volume(const float center[3], float (*vertexCos)[3], const MPoly *mpoly, int numPolys, const MLoop *mloop); static LaplacianSystem *init_laplacian_system(int a_numEdges, int a_numPolys, int a_numLoops, int a_numVerts); -static void copy_data(ModifierData *md, ModifierData *target); static void delete_laplacian_system(LaplacianSystem *sys); static void fill_laplacian_matrix(LaplacianSystem *sys); static void init_data(ModifierData *md); @@ -472,16 +471,6 @@ static void init_data(ModifierData *md) smd->defgrp_name[0] = '\0'; } -static void copy_data(ModifierData *md, ModifierData *target) -{ -#if 0 - LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *) md; - LaplacianSmoothModifierData *tsmd = (LaplacianSmoothModifierData *) target; -#endif - - modifier_copyData_generic(md, target); -} - static bool is_disabled(ModifierData *md, int UNUSED(useRenderParams)) { LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *) md; @@ -550,7 +539,7 @@ ModifierTypeInfo modifierType_LaplacianSmooth = { /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, - /* copy_data */ copy_data, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ deformVerts, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 69c814279be..548480acdd8 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -56,16 +56,6 @@ static void initData(ModifierData *md) lmd->strength = 1.0f; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - LatticeModifierData *lmd = (LatticeModifierData *) md; - LatticeModifierData *tlmd = (LatticeModifierData *) target; -#endif - - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { LatticeModifierData *lmd = (LatticeModifierData *)md; @@ -143,7 +133,8 @@ ModifierTypeInfo modifierType_Lattice = { /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsLattice | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index a94f0ecff02..fdce2353684 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -56,15 +56,6 @@ #include "BLI_strict_flags.h" -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - MaskModifierData *mmd = (MaskModifierData *) md; - MaskModifierData *tmmd = (MaskModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(md)) { return CD_MASK_MDEFORMVERT; @@ -369,7 +360,7 @@ ModifierTypeInfo modifierType_Mask = { eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c index 4eb37a4953c..cc410f3cefb 100644 --- a/source/blender/modifiers/intern/MOD_meshcache.c +++ b/source/blender/modifiers/intern/MOD_meshcache.c @@ -64,15 +64,6 @@ static void initData(ModifierData *md) mcmd->up_axis = 2; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - MeshCacheModifierData *mcmd = (MeshCacheModifierData *)md; - MeshCacheModifierData *tmcmd = (MeshCacheModifierData *)target; -#endif - modifier_copyData_generic(md, target); -} - static bool dependsOnTime(ModifierData *md) { MeshCacheModifierData *mcmd = (MeshCacheModifierData *)md; @@ -301,7 +292,7 @@ ModifierTypeInfo modifierType_MeshCache = { eModifierTypeFlag_AcceptsLattice | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ deformVerts, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index de3c3d94ad0..e7db70f9f7c 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -80,9 +80,9 @@ static void freeData(ModifierData *md) if (mmd->bindcos) MEM_freeN(mmd->bindcos); /* deprecated */ } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; + const MeshDeformModifierData *mmd = (const MeshDeformModifierData *) md; MeshDeformModifierData *tmmd = (MeshDeformModifierData *) target; modifier_copyData_generic(md, target); diff --git a/source/blender/modifiers/intern/MOD_meshsequencecache.c b/source/blender/modifiers/intern/MOD_meshsequencecache.c index 8ca5873f85c..b908d6f4bda 100644 --- a/source/blender/modifiers/intern/MOD_meshsequencecache.c +++ b/source/blender/modifiers/intern/MOD_meshsequencecache.c @@ -55,10 +55,10 @@ static void initData(ModifierData *md) mcmd->read_flag = MOD_MESHSEQ_READ_ALL; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { #if 0 - MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)md; + const MeshSeqCacheModifierData *mcmd = (const MeshSeqCacheModifierData *)md; #endif MeshSeqCacheModifierData *tmcmd = (MeshSeqCacheModifierData *)target; @@ -66,8 +66,8 @@ static void copyData(ModifierData *md, ModifierData *target) if (tmcmd->cache_file) { id_us_plus(&tmcmd->cache_file->id); - tmcmd->reader = NULL; } + tmcmd->reader = NULL; } static void freeData(ModifierData *md) diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 4edfbd43d7a..53b6103de7f 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -60,15 +60,6 @@ static void initData(ModifierData *md) mmd->mirror_ob = NULL; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - MirrorModifierData *mmd = (MirrorModifierData *) md; - MirrorModifierData *tmmd = (MirrorModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static void foreachObjectLink( ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) @@ -357,7 +348,7 @@ ModifierTypeInfo modifierType_Mirror = { /* this is only the case when 'MOD_MIR_VGROUP' is used */ eModifierTypeFlag_UsesPreview, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 32b15f11116..17336c2a723 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -58,15 +58,6 @@ static void initData(ModifierData *md) mmd->totlvl = 0; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - MultiresModifierData *mmd = (MultiresModifierData *) md; - MultiresModifierData *tmmd = (MultiresModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static DerivedMesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, DerivedMesh *dm) { @@ -152,7 +143,7 @@ ModifierTypeInfo modifierType_Multires = { eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_RequiresOriginalData, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c index 7f080a0bd20..9d2a66e0a06 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.c +++ b/source/blender/modifiers/intern/MOD_normal_edit.c @@ -491,11 +491,6 @@ static void initData(ModifierData *md) enmd->mix_limit = M_PI; } -static void copyData(ModifierData *md, ModifierData *target) -{ - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { NormalEditModifierData *enmd = (NormalEditModifierData *)md; @@ -550,7 +545,8 @@ ModifierTypeInfo modifierType_NormalEdit = { eModifierTypeFlag_SupportsMapping | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index e589620b211..debd2fb6b46 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -159,11 +159,11 @@ static void freeData(ModifierData *md) #endif /* WITH_OCEANSIM */ } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { #ifdef WITH_OCEANSIM #if 0 - OceanModifierData *omd = (OceanModifierData *) md; + const OceanModifierData *omd = (const OceanModifierData *) md; #endif OceanModifierData *tomd = (OceanModifierData *) target; diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c index 651a5a96676..b87705adb6b 100644 --- a/source/blender/modifiers/intern/MOD_particleinstance.c +++ b/source/blender/modifiers/intern/MOD_particleinstance.c @@ -70,14 +70,6 @@ static void initData(ModifierData *md) STRNCPY(pimd->index_layer_name, ""); STRNCPY(pimd->value_layer_name, ""); } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *) md; - ParticleInstanceModifierData *tpimd = (ParticleInstanceModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { @@ -539,7 +531,7 @@ ModifierTypeInfo modifierType_ParticleInstance = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_particlesystem.c b/source/blender/modifiers/intern/MOD_particlesystem.c index 9ab3f9ae937..a2add591938 100644 --- a/source/blender/modifiers/intern/MOD_particlesystem.c +++ b/source/blender/modifiers/intern/MOD_particlesystem.c @@ -70,16 +70,18 @@ static void freeData(ModifierData *md) psmd->dm_deformed = NULL; } } + psmd->totdmvert = psmd->totdmedge = psmd->totdmface = 0; /* ED_object_modifier_remove may have freed this first before calling * modifier_free (which calls this function) */ if (psmd->psys) psmd->psys->flag |= PSYS_DELETE; } -static void copyData(ModifierData *md, ModifierData *target) + +static void copyData(const ModifierData *md, ModifierData *target) { #if 0 - ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md; + const ParticleSystemModifierData *psmd = (const ParticleSystemModifierData *) md; #endif ParticleSystemModifierData *tpsmd = (ParticleSystemModifierData *) target; diff --git a/source/blender/modifiers/intern/MOD_remesh.c b/source/blender/modifiers/intern/MOD_remesh.c index 254b82f3968..3ee69deb8b2 100644 --- a/source/blender/modifiers/intern/MOD_remesh.c +++ b/source/blender/modifiers/intern/MOD_remesh.c @@ -59,15 +59,6 @@ static void initData(ModifierData *md) rmd->threshold = 1; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - RemeshModifierData *rmd = (RemeshModifierData *) md; - RemeshModifierData *trmd = (RemeshModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - #ifdef WITH_MOD_REMESH static void init_dualcon_mesh(DualConInput *mesh, DerivedMesh *dm) @@ -219,7 +210,8 @@ ModifierTypeInfo modifierType_Remesh = { /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index 6335c453955..1eead48082d 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -175,15 +175,6 @@ static void initData(ModifierData *md) ltmd->merge_dist = 0.01f; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - ScrewModifierData *sltmd = (ScrewModifierData *) md; - ScrewModifierData *tltmd = (ScrewModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static DerivedMesh *applyModifier(ModifierData *md, const ModifierEvalContext *ctx, DerivedMesh *derivedData) { @@ -1144,7 +1135,7 @@ ModifierTypeInfo modifierType_Screw = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c index 1e5f78bdbce..b2077f62bf4 100644 --- a/source/blender/modifiers/intern/MOD_shrinkwrap.c +++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c @@ -61,15 +61,6 @@ static void initData(ModifierData *md) smd->auxTarget = NULL; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *)md; - ShrinkwrapModifierData *tsmd = (ShrinkwrapModifierData *)target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *)md; @@ -175,7 +166,7 @@ ModifierTypeInfo modifierType_Shrinkwrap = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ deformVerts, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index c1dbf1989ea..4e9b5b20871 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -350,15 +350,6 @@ static void initData(ModifierData *md) smd->limit[1] = 1.0f; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md; - SimpleDeformModifierData *tsmd = (SimpleDeformModifierData *)target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md; @@ -422,7 +413,7 @@ ModifierTypeInfo modifierType_SimpleDeform = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_skin.c b/source/blender/modifiers/intern/MOD_skin.c index 1e02ad40e12..ec7a9958109 100644 --- a/source/blender/modifiers/intern/MOD_skin.c +++ b/source/blender/modifiers/intern/MOD_skin.c @@ -1905,15 +1905,6 @@ static void initData(ModifierData *md) smd->symmetry_axes = MOD_SKIN_SYMM_X; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - SkinModifierData *smd = (SkinModifierData *) md; - SkinModifierData *tsmd = (SkinModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static Mesh *applyModifier(ModifierData *md, const ModifierEvalContext *UNUSED(ctx), Mesh *mesh) @@ -1938,7 +1929,7 @@ ModifierTypeInfo modifierType_Skin = { /* type */ eModifierTypeType_Constructive, /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c index d78d1277374..befa1e3d381 100644 --- a/source/blender/modifiers/intern/MOD_smoke.c +++ b/source/blender/modifiers/intern/MOD_smoke.c @@ -69,9 +69,9 @@ static void initData(ModifierData *md) smd->time = -1; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - SmokeModifierData *smd = (SmokeModifierData *)md; + const SmokeModifierData *smd = (const SmokeModifierData *)md; SmokeModifierData *tsmd = (SmokeModifierData *)target; smokeModifier_copy(smd, tsmd); diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c index b905e0f8118..ace5a95cd22 100644 --- a/source/blender/modifiers/intern/MOD_smooth.c +++ b/source/blender/modifiers/intern/MOD_smooth.c @@ -58,15 +58,6 @@ static void initData(ModifierData *md) smd->defgrp_name[0] = '\0'; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - SmoothModifierData *smd = (SmoothModifierData *) md; - SmoothModifierData *tsmd = (SmoothModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { SmoothModifierData *smd = (SmoothModifierData *) md; @@ -250,7 +241,7 @@ ModifierTypeInfo modifierType_Smooth = { eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ deformVerts, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_solidify.c b/source/blender/modifiers/intern/MOD_solidify.c index e37bcccacfd..6d830cabb27 100644 --- a/source/blender/modifiers/intern/MOD_solidify.c +++ b/source/blender/modifiers/intern/MOD_solidify.c @@ -176,15 +176,6 @@ static void initData(ModifierData *md) smd->flag = MOD_SOLIDIFY_RIM; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - SolidifyModifierData *smd = (SolidifyModifierData *) md; - SolidifyModifierData *tsmd = (SolidifyModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { SolidifyModifierData *smd = (SolidifyModifierData *) md; @@ -966,7 +957,7 @@ ModifierTypeInfo modifierType_Solidify = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c index c23030b6374..0d0d70ec33d 100644 --- a/source/blender/modifiers/intern/MOD_subsurf.c +++ b/source/blender/modifiers/intern/MOD_subsurf.c @@ -65,17 +65,16 @@ static void initData(ModifierData *md) smd->flags |= eSubsurfModifierFlag_SubsurfUv; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { #if 0 - SubsurfModifierData *smd = (SubsurfModifierData *) md; + const SubsurfModifierData *smd = (const SubsurfModifierData *) md; #endif SubsurfModifierData *tsmd = (SubsurfModifierData *) target; modifier_copyData_generic(md, target); tsmd->emCache = tsmd->mCache = NULL; - } static void freeData(ModifierData *md) diff --git a/source/blender/modifiers/intern/MOD_surfacedeform.c b/source/blender/modifiers/intern/MOD_surfacedeform.c index f262fa99db1..ae011986c47 100644 --- a/source/blender/modifiers/intern/MOD_surfacedeform.c +++ b/source/blender/modifiers/intern/MOD_surfacedeform.c @@ -132,9 +132,9 @@ static void freeData(ModifierData *md) } } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md; + const SurfaceDeformModifierData *smd = (const SurfaceDeformModifierData *)md; SurfaceDeformModifierData *tsmd = (SurfaceDeformModifierData *)target; modifier_copyData_generic(md, target); diff --git a/source/blender/modifiers/intern/MOD_triangulate.c b/source/blender/modifiers/intern/MOD_triangulate.c index 349897f2be6..575339be72c 100644 --- a/source/blender/modifiers/intern/MOD_triangulate.c +++ b/source/blender/modifiers/intern/MOD_triangulate.c @@ -74,16 +74,6 @@ static void initData(ModifierData *md) tmd->ngon_method = MOD_TRIANGULATE_NGON_BEAUTY; } - -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - TriangulateModifierData *smd = (TriangulateModifierData *) md; - TriangulateModifierData *tsmd = (TriangulateModifierData *) target; -#endif - modifier_copyData_generic(md, target); -} - static DerivedMesh *applyModifier(ModifierData *md, const ModifierEvalContext *UNUSED(ctx), DerivedMesh *dm) @@ -108,7 +98,7 @@ ModifierTypeInfo modifierType_Triangulate = { eModifierTypeFlag_EnableInEditmode | eModifierTypeFlag_AcceptsCVs, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index 620d3c34584..d3090f2caf3 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -67,10 +67,10 @@ static void initData(ModifierData *md) umd->scalex = umd->scaley = 1.0f; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { #if 0 - UVProjectModifierData *umd = (UVProjectModifierData *) md; + const UVProjectModifierData *umd = (const UVProjectModifierData *) md; UVProjectModifierData *tumd = (UVProjectModifierData *) target; #endif diff --git a/source/blender/modifiers/intern/MOD_uvwarp.c b/source/blender/modifiers/intern/MOD_uvwarp.c index 7ea2d6ad3b3..9ca117c4232 100644 --- a/source/blender/modifiers/intern/MOD_uvwarp.c +++ b/source/blender/modifiers/intern/MOD_uvwarp.c @@ -65,15 +65,6 @@ static void initData(ModifierData *md) copy_v2_fl(umd->center, 0.5f); } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - UVWarpModifierData *umd = (UVWarpModifierData *)md; - UVWarpModifierData *tumd = (UVWarpModifierData *)target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { UVWarpModifierData *umd = (UVWarpModifierData *)md; @@ -259,7 +250,8 @@ ModifierTypeInfo modifierType_UVWarp = { /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_EnableInEditmode, - /* copyData */ copyData, + + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index b991ab721d8..07babc5b12f 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -59,9 +59,9 @@ static void initData(ModifierData *md) wmd->flag = 0; } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - WarpModifierData *wmd = (WarpModifierData *) md; + const WarpModifierData *wmd = (const WarpModifierData *) md; WarpModifierData *twmd = (WarpModifierData *) target; modifier_copyData_generic(md, target); diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c index c5af7755578..f558d3fc5bd 100644 --- a/source/blender/modifiers/intern/MOD_wave.c +++ b/source/blender/modifiers/intern/MOD_wave.c @@ -79,16 +79,6 @@ static void initData(ModifierData *md) wmd->defgrp_name[0] = 0; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - WaveModifierData *wmd = (WaveModifierData *) md; - WaveModifierData *twmd = (WaveModifierData *) target; -#endif - - modifier_copyData_generic(md, target); -} - static bool dependsOnTime(ModifierData *UNUSED(md)) { return true; @@ -349,7 +339,8 @@ ModifierTypeInfo modifierType_Wave = { /* flags */ eModifierTypeFlag_AcceptsCVs | eModifierTypeFlag_AcceptsLattice | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ deformVerts, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index e2b1a491ced..f37afc58e20 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -80,9 +80,9 @@ static void freeData(ModifierData *md) curvemapping_free(wmd->cmap_curve); } -static void copyData(ModifierData *md, ModifierData *target) +static void copyData(const ModifierData *md, ModifierData *target) { - WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md; + const WeightVGEditModifierData *wmd = (const WeightVGEditModifierData *) md; WeightVGEditModifierData *twmd = (WeightVGEditModifierData *) target; modifier_copyData_generic(md, target); diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 0841bc9bfc0..be73ff96496 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -126,16 +126,6 @@ static void initData(ModifierData *md) wmd->mask_tex_mapping = MOD_DISP_MAP_LOCAL; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; - WeightVGMixModifierData *twmd = (WeightVGMixModifierData *) target; -#endif - - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; @@ -414,7 +404,7 @@ ModifierTypeInfo modifierType_WeightVGMix = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_UsesPreview, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 1b5ef23884d..7985f4d7647 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -296,16 +296,6 @@ static void initData(ModifierData *md) wmd->max_dist = 1.0f; /* vert arbitrary distance, but don't use 0 */ } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md; - WeightVGProximityModifierData *twmd = (WeightVGProximityModifierData *) target; -#endif - - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md; @@ -597,7 +587,7 @@ ModifierTypeInfo modifierType_WeightVGProximity = { eModifierTypeFlag_SupportsEditmode | eModifierTypeFlag_UsesPreview, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, diff --git a/source/blender/modifiers/intern/MOD_wireframe.c b/source/blender/modifiers/intern/MOD_wireframe.c index d3964b5c36f..9dfc23fbf5f 100644 --- a/source/blender/modifiers/intern/MOD_wireframe.c +++ b/source/blender/modifiers/intern/MOD_wireframe.c @@ -45,15 +45,6 @@ static void initData(ModifierData *md) wmd->crease_weight = 1.0f; } -static void copyData(ModifierData *md, ModifierData *target) -{ -#if 0 - WireframeModifierData *wmd = (WireframeModifierData *)md; - WireframeModifierData *twmd = (WireframeModifierData *)target; -#endif - modifier_copyData_generic(md, target); -} - static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) { WireframeModifierData *wmd = (WireframeModifierData *)md; @@ -129,7 +120,7 @@ ModifierTypeInfo modifierType_Wireframe = { /* flags */ eModifierTypeFlag_AcceptsMesh | eModifierTypeFlag_SupportsEditmode, - /* copyData */ copyData, + /* copyData */ modifier_copyData_generic, /* deformVerts_DM */ NULL, /* deformMatrices_DM */ NULL, |