diff options
Diffstat (limited to 'source/blender')
22 files changed, 30 insertions, 58 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h index ded6e13e003..05167e29050 100644 --- a/source/blender/blenkernel/BKE_modifier.h +++ b/source/blender/blenkernel/BKE_modifier.h @@ -104,6 +104,7 @@ typedef enum { eModifierTypeFlag_UsesPreview = (1 << 9) } ModifierTypeFlag; +/* IMPORTANT! Keep ObjectWalkFunc and IDWalkFunc signatures compatible. */ typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object **obpoin); typedef void (*IDWalkFunc)(void *userData, struct Object *ob, struct ID **idpoin); typedef void (*TexWalkFunc)(void *userData, struct Object *ob, struct ModifierData *md, const char *propname); diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c index 9ce31cebb66..2ecbf276fc8 100644 --- a/source/blender/modifiers/intern/MOD_armature.c +++ b/source/blender/modifiers/intern/MOD_armature.c @@ -91,8 +91,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { ArmatureModifierData *amd = (ArmatureModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_array.c b/source/blender/modifiers/intern/MOD_array.c index efb77f73ec9..1cbbdaf3b23 100644 --- a/source/blender/modifiers/intern/MOD_array.c +++ b/source/blender/modifiers/intern/MOD_array.c @@ -90,8 +90,7 @@ static void copyData(ModifierData *md, ModifierData *target) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { ArrayModifierData *amd = (ArrayModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c index eb54a3c4e9c..b2b2a18bb26 100644 --- a/source/blender/modifiers/intern/MOD_boolean.c +++ b/source/blender/modifiers/intern/MOD_boolean.c @@ -65,8 +65,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { BooleanModifierData *bmd = (BooleanModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c index 7c3d65a5c9a..5c3b40b5d0e 100644 --- a/source/blender/modifiers/intern/MOD_cast.c +++ b/source/blender/modifiers/intern/MOD_cast.c @@ -97,8 +97,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { CastModifierData *cmd = (CastModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c index 7a6e471a012..15e81ef508e 100644 --- a/source/blender/modifiers/intern/MOD_curve.c +++ b/source/blender/modifiers/intern/MOD_curve.c @@ -84,8 +84,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(userRenderParams)) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { CurveModifierData *cmd = (CurveModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_datatransfer.c b/source/blender/modifiers/intern/MOD_datatransfer.c index 85e9b4ee185..0ce97760afb 100644 --- a/source/blender/modifiers/intern/MOD_datatransfer.c +++ b/source/blender/modifiers/intern/MOD_datatransfer.c @@ -118,19 +118,14 @@ static bool dependsOnNormals(ModifierData *md) return false; } -static void foreachObjectLink(ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) +static void foreachObjectLink( + ModifierData *md, Object *ob, + ObjectWalkFunc walk, void *userData) { DataTransferModifierData *dtmd = (DataTransferModifierData *) md; walk(userData, ob, &dtmd->ob_source); } -static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) -{ - foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); -} - static void updateDepgraph(ModifierData *md, DagForest *forest, struct Main *UNUSED(bmain), struct Scene *UNUSED(scene), @@ -260,6 +255,6 @@ ModifierTypeInfo modifierType_DataTransfer = { /* dependsOnTime */ NULL, /* dependsOnNormals */ dependsOnNormals, /* foreachObjectLink */ foreachObjectLink, - /* foreachIDLink */ foreachIDLink, + /* foreachIDLink */ NULL, /* foreachTexLink */ NULL, }; diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c index 3a10fabbb8e..b043fa8fc62 100644 --- a/source/blender/modifiers/intern/MOD_hook.c +++ b/source/blender/modifiers/intern/MOD_hook.c @@ -103,8 +103,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { HookModifierData *hmd = (HookModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c index 52a4f441b63..3c5406a8adb 100644 --- a/source/blender/modifiers/intern/MOD_lattice.c +++ b/source/blender/modifiers/intern/MOD_lattice.c @@ -83,8 +83,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(userRenderParams)) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { LatticeModifierData *lmd = (LatticeModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_mask.c b/source/blender/modifiers/intern/MOD_mask.c index 06fbab65d7b..33ded72aaeb 100644 --- a/source/blender/modifiers/intern/MOD_mask.c +++ b/source/blender/modifiers/intern/MOD_mask.c @@ -70,8 +70,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED( static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { MaskModifierData *mmd = (MaskModifierData *)md; walk(userData, ob, &mmd->ob_arm); diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c index 5bd33d2a49f..152b89e47a3 100644 --- a/source/blender/modifiers/intern/MOD_meshdeform.c +++ b/source/blender/modifiers/intern/MOD_meshdeform.c @@ -114,8 +114,7 @@ static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { MeshDeformModifierData *mmd = (MeshDeformModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_mirror.c b/source/blender/modifiers/intern/MOD_mirror.c index 3e10fa1d77d..af6a5db1f35 100644 --- a/source/blender/modifiers/intern/MOD_mirror.c +++ b/source/blender/modifiers/intern/MOD_mirror.c @@ -65,9 +65,9 @@ static void copyData(ModifierData *md, ModifierData *target) modifier_copyData_generic(md, target); } -static void foreachObjectLink(ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) +static void foreachObjectLink( + ModifierData *md, Object *ob, + ObjectWalkFunc walk, void *userData) { MirrorModifierData *mmd = (MirrorModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_normal_edit.c b/source/blender/modifiers/intern/MOD_normal_edit.c index 87d75c6f1a7..7c199c623ee 100644 --- a/source/blender/modifiers/intern/MOD_normal_edit.c +++ b/source/blender/modifiers/intern/MOD_normal_edit.c @@ -453,13 +453,6 @@ static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, walk(userData, ob, &smd->target); } -static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *userData) -{ - NormalEditModifierData *smd = (NormalEditModifierData *) md; - - walk(userData, ob, (ID **)&smd->target); -} - static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams)) { NormalEditModifierData *smd = (NormalEditModifierData *)md; @@ -524,6 +517,6 @@ ModifierTypeInfo modifierType_NormalEdit = { /* dependsOnTime */ NULL, /* dependsOnNormals */ dependsOnNormals, /* foreachObjectLink */ foreachObjectLink, - /* foreachIDLink */ foreachIDLink, + /* foreachIDLink */ NULL, /* foreachTexLink */ NULL, }; diff --git a/source/blender/modifiers/intern/MOD_ocean.c b/source/blender/modifiers/intern/MOD_ocean.c index 913c2f25c15..54a7278be72 100644 --- a/source/blender/modifiers/intern/MOD_ocean.c +++ b/source/blender/modifiers/intern/MOD_ocean.c @@ -585,4 +585,5 @@ ModifierTypeInfo modifierType_Ocean = { /* dependsOnNormals */ dependsOnNormals, /* foreachObjectLink */ NULL, /* foreachIDLink */ NULL, + /* foreachTexLink */ NULL, }; diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index db65f4431e4..386b2179c63 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -1090,8 +1090,7 @@ static void updateDepsgraph(ModifierData *md, static void foreachObjectLink( ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) + ObjectWalkFunc walk, void *userData) { ScrewModifierData *ltmd = (ScrewModifierData *) md; diff --git a/source/blender/modifiers/intern/MOD_simpledeform.c b/source/blender/modifiers/intern/MOD_simpledeform.c index 706a296f5a1..22a19cf77a8 100644 --- a/source/blender/modifiers/intern/MOD_simpledeform.c +++ b/source/blender/modifiers/intern/MOD_simpledeform.c @@ -279,8 +279,9 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md) return dataMask; } -static void foreachObjectLink(ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), void *userData) +static void foreachObjectLink( + ModifierData *md, Object *ob, + ObjectWalkFunc walk, void *userData) { SimpleDeformModifierData *smd = (SimpleDeformModifierData *)md; walk(userData, ob, &smd->origin); diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c index ff5e5f643a7..68987a1d28e 100644 --- a/source/blender/modifiers/intern/MOD_surface.c +++ b/source/blender/modifiers/intern/MOD_surface.c @@ -190,6 +190,6 @@ ModifierTypeInfo modifierType_Surface = { /* dependsOnTime */ dependsOnTime, /* dependsOnNormals */ NULL, /* foreachObjectLink */ NULL, - /* foreachIDLink */ NULL, - /* foreachTexLink */ NULL, + /* foreachIDLink */ NULL, + /* foreachTexLink */ NULL, }; diff --git a/source/blender/modifiers/intern/MOD_uvproject.c b/source/blender/modifiers/intern/MOD_uvproject.c index 1b1474ee666..035bda66f6e 100644 --- a/source/blender/modifiers/intern/MOD_uvproject.c +++ b/source/blender/modifiers/intern/MOD_uvproject.c @@ -101,8 +101,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, walk(userData, ob, (ID **)&umd->image); - foreachObjectLink(md, ob, (ObjectWalkFunc)walk, - userData); + foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); } static void updateDepgraph(ModifierData *md, DagForest *forest, diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c index ae2dbd4a37c..b364b7a9e38 100644 --- a/source/blender/modifiers/intern/MOD_warp.c +++ b/source/blender/modifiers/intern/MOD_warp.c @@ -126,9 +126,7 @@ static void foreachIDLink(ModifierData *md, Object *ob, IDWalkFunc walk, void *u walk(userData, ob, (ID **)&wmd->texture); - walk(userData, ob, (ID **)&wmd->object_from); - walk(userData, ob, (ID **)&wmd->object_to); - walk(userData, ob, (ID **)&wmd->map_object); + foreachObjectLink(md, ob, (ObjectWalkFunc)walk, userData); } static void foreachTexLink(ModifierData *md, Object *ob, TexWalkFunc walk, void *userData) diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c index cba077a2f8d..8e40b01e0f8 100644 --- a/source/blender/modifiers/intern/MOD_weightvgedit.c +++ b/source/blender/modifiers/intern/MOD_weightvgedit.c @@ -122,9 +122,7 @@ static bool dependsOnTime(ModifierData *md) return false; } -static void foreachObjectLink(ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) +static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) { WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md; walk(userData, ob, &wmd->mask_tex_map_obj); diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c index 0649998e42d..f4915cd0933 100644 --- a/source/blender/modifiers/intern/MOD_weightvgmix.c +++ b/source/blender/modifiers/intern/MOD_weightvgmix.c @@ -171,9 +171,7 @@ static bool dependsOnTime(ModifierData *md) return false; } -static void foreachObjectLink(ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) +static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) { WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md; walk(userData, ob, &wmd->mask_tex_map_obj); diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c index 08d7d77c74e..4affb13905a 100644 --- a/source/blender/modifiers/intern/MOD_weightvgproximity.c +++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c @@ -287,9 +287,7 @@ static bool dependsOnTime(ModifierData *md) return 0; } -static void foreachObjectLink(ModifierData *md, Object *ob, - void (*walk)(void *userData, Object *ob, Object **obpoin), - void *userData) +static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData) { WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md; walk(userData, ob, &wmd->proximity_ob_target); |