Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-06-02 07:59:19 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-02 07:59:19 +0400
commite648ca8862a2cee3723450b67f556e222b8b0d6b (patch)
tree2750fcc166057bd65a72d86964d394a800562c4c /source
parent7ce0ea00a01a3d6d409c8d5182d068a480c6c7d4 (diff)
use booleans for modifiers and api callbacks.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_modifier.h36
-rw-r--r--source/blender/blenkernel/BKE_texture.h2
-rw-r--r--source/blender/blenkernel/intern/modifier.c48
-rw-r--r--source/blender/blenkernel/intern/texture.c4
-rw-r--r--source/blender/modifiers/intern/MOD_armature.c2
-rw-r--r--source/blender/modifiers/intern/MOD_boolean.c2
-rw-r--r--source/blender/modifiers/intern/MOD_build.c4
-rw-r--r--source/blender/modifiers/intern/MOD_cast.c6
-rw-r--r--source/blender/modifiers/intern/MOD_cloth.c4
-rw-r--r--source/blender/modifiers/intern/MOD_collision.c4
-rw-r--r--source/blender/modifiers/intern/MOD_curve.c2
-rw-r--r--source/blender/modifiers/intern/MOD_displace.c8
-rw-r--r--source/blender/modifiers/intern/MOD_dynamicpaint.c4
-rw-r--r--source/blender/modifiers/intern/MOD_explode.c4
-rw-r--r--source/blender/modifiers/intern/MOD_fluidsim.c4
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c2
-rw-r--r--source/blender/modifiers/intern/MOD_laplaciansmooth.c6
-rw-r--r--source/blender/modifiers/intern/MOD_lattice.c2
-rw-r--r--source/blender/modifiers/intern/MOD_meshcache.c4
-rw-r--r--source/blender/modifiers/intern/MOD_meshdeform.c2
-rw-r--r--source/blender/modifiers/intern/MOD_none.c4
-rw-r--r--source/blender/modifiers/intern/MOD_particleinstance.c9
-rw-r--r--source/blender/modifiers/intern/MOD_screw.c8
-rw-r--r--source/blender/modifiers/intern/MOD_shrinkwrap.c4
-rw-r--r--source/blender/modifiers/intern/MOD_smoke.c4
-rw-r--r--source/blender/modifiers/intern/MOD_smooth.c2
-rw-r--r--source/blender/modifiers/intern/MOD_softbody.c4
-rw-r--r--source/blender/modifiers/intern/MOD_subsurf.c2
-rw-r--r--source/blender/modifiers/intern/MOD_surface.c4
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c6
-rw-r--r--source/blender/modifiers/intern/MOD_wave.c4
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c6
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c6
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgproximity.c4
34 files changed, 103 insertions, 114 deletions
diff --git a/source/blender/blenkernel/BKE_modifier.h b/source/blender/blenkernel/BKE_modifier.h
index 955df65d00d..e466964c73f 100644
--- a/source/blender/blenkernel/BKE_modifier.h
+++ b/source/blender/blenkernel/BKE_modifier.h
@@ -248,7 +248,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional (assumes never disabled if not present).
*/
- int (*isDisabled)(struct ModifierData *md, int userRenderParams);
+ bool (*isDisabled)(struct ModifierData *md, int userRenderParams);
/* Add the appropriate relations to the DEP graph depending on the
* modifier data.
@@ -263,7 +263,7 @@ typedef struct ModifierTypeInfo {
*
* This function is optional (assumes false if not present).
*/
- int (*dependsOnTime)(struct ModifierData *md);
+ bool (*dependsOnTime)(struct ModifierData *md);
/* True when a deform modifier uses normals, the requiredDataMask
@@ -273,7 +273,7 @@ typedef struct ModifierTypeInfo {
* this is needed because applying 2 deform modifiers will give the
* second modifier bogus normals.
* */
- int (*dependsOnNormals)(struct ModifierData *md);
+ bool (*dependsOnNormals)(struct ModifierData *md);
/* Should call the given walk function on with a pointer to each Object
@@ -318,19 +318,19 @@ void modifier_free(struct ModifierData *md);
void modifier_unique_name(struct ListBase *modifiers, struct ModifierData *md);
void modifier_copyData(struct ModifierData *md, struct ModifierData *target);
-int modifier_dependsOnTime(struct ModifierData *md);
-int modifier_supportsMapping(struct ModifierData *md);
-int modifier_couldBeCage(struct Scene *scene, struct ModifierData *md);
-int modifier_isCorrectableDeformed(struct ModifierData *md);
-int modifier_isSameTopology(ModifierData *md);
-int modifier_isNonGeometrical(ModifierData *md);
-int modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode);
+bool modifier_dependsOnTime(struct ModifierData *md);
+bool modifier_supportsMapping(struct ModifierData *md);
+bool modifier_couldBeCage(struct Scene *scene, struct ModifierData *md);
+bool modifier_isCorrectableDeformed(struct ModifierData *md);
+bool modifier_isSameTopology(ModifierData *md);
+bool modifier_isNonGeometrical(ModifierData *md);
+bool modifier_isEnabled(struct Scene *scene, struct ModifierData *md, int required_mode);
void modifier_setError(struct ModifierData *md, const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format(printf, 2, 3)))
#endif
;
-int modifier_isPreview(struct ModifierData *md);
+bool modifier_isPreview(struct ModifierData *md);
void modifiers_foreachObjectLink(struct Object *ob,
ObjectWalkFunc walk,
@@ -348,18 +348,18 @@ void modifiers_clearErrors(struct Object *ob);
int modifiers_getCageIndex(struct Scene *scene, struct Object *ob,
int *lastPossibleCageIndex_r, int virtual_);
-int modifiers_isModifierEnabled(struct Object *ob, int modifierType);
-int modifiers_isSoftbodyEnabled(struct Object *ob);
-int modifiers_isClothEnabled(struct Object *ob);
-int modifiers_isParticleEnabled(struct Object *ob);
+bool modifiers_isModifierEnabled(struct Object *ob, int modifierType);
+bool modifiers_isSoftbodyEnabled(struct Object *ob);
+bool modifiers_isClothEnabled(struct Object *ob);
+bool modifiers_isParticleEnabled(struct Object *ob);
struct Object *modifiers_isDeformedByArmature(struct Object *ob);
struct Object *modifiers_isDeformedByLattice(struct Object *ob);
struct Object *modifiers_isDeformedByCurve(struct Object *ob);
-int modifiers_usesArmature(struct Object *ob, struct bArmature *arm);
-int modifiers_isCorrectableDeformed(struct Object *ob);
+bool modifiers_usesArmature(struct Object *ob, struct bArmature *arm);
+bool modifiers_isCorrectableDeformed(struct Object *ob);
void modifier_freeTemporaryData(struct ModifierData *md);
-int modifiers_isPreview(struct Object *ob);
+bool modifiers_isPreview(struct Object *ob);
typedef struct CDMaskLink {
struct CDMaskLink *next;
diff --git a/source/blender/blenkernel/BKE_texture.h b/source/blender/blenkernel/BKE_texture.h
index 23a6a96c75c..ac0d507003e 100644
--- a/source/blender/blenkernel/BKE_texture.h
+++ b/source/blender/blenkernel/BKE_texture.h
@@ -127,7 +127,7 @@ void BKE_free_oceantex(struct OceanTex *ot);
struct OceanTex *BKE_add_oceantex(void);
struct OceanTex *BKE_copy_oceantex(struct OceanTex *ot);
-int BKE_texture_dependsOnTime(const struct Tex *texture);
+bool BKE_texture_dependsOnTime(const struct Tex *texture);
#ifdef __cplusplus
}
diff --git a/source/blender/blenkernel/intern/modifier.c b/source/blender/blenkernel/intern/modifier.c
index dda243eed5c..1ebe99eb660 100644
--- a/source/blender/blenkernel/intern/modifier.c
+++ b/source/blender/blenkernel/intern/modifier.c
@@ -127,14 +127,14 @@ void modifier_unique_name(ListBase *modifiers, ModifierData *md)
}
}
-int modifier_dependsOnTime(ModifierData *md)
+bool modifier_dependsOnTime(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
return mti->dependsOnTime && mti->dependsOnTime(md);
}
-int modifier_supportsMapping(ModifierData *md)
+bool modifier_supportsMapping(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -142,7 +142,7 @@ int modifier_supportsMapping(ModifierData *md)
(mti->flags & eModifierTypeFlag_SupportsMapping));
}
-int modifier_isPreview(ModifierData *md)
+bool modifier_isPreview(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -237,7 +237,7 @@ void modifier_copyData(ModifierData *md, ModifierData *target)
mti->copyData(md, target);
}
-int modifier_couldBeCage(struct Scene *scene, ModifierData *md)
+bool modifier_couldBeCage(struct Scene *scene, ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -249,13 +249,13 @@ int modifier_couldBeCage(struct Scene *scene, ModifierData *md)
modifier_supportsMapping(md));
}
-int modifier_isSameTopology(ModifierData *md)
+bool modifier_isSameTopology(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
return ELEM(mti->type, eModifierTypeType_OnlyDeform, eModifierTypeType_NonGeometrical);
}
-int modifier_isNonGeometrical(ModifierData *md)
+bool modifier_isNonGeometrical(ModifierData *md)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
return (mti->type == eModifierTypeType_NonGeometrical);
@@ -320,35 +320,35 @@ int modifiers_getCageIndex(struct Scene *scene, Object *ob, int *lastPossibleCag
}
-int modifiers_isSoftbodyEnabled(Object *ob)
+bool modifiers_isSoftbodyEnabled(Object *ob)
{
ModifierData *md = modifiers_findByType(ob, eModifierType_Softbody);
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
}
-int modifiers_isClothEnabled(Object *ob)
+bool modifiers_isClothEnabled(Object *ob)
{
ModifierData *md = modifiers_findByType(ob, eModifierType_Cloth);
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
}
-int modifiers_isModifierEnabled(Object *ob, int modifierType)
+bool modifiers_isModifierEnabled(Object *ob, int modifierType)
{
ModifierData *md = modifiers_findByType(ob, modifierType);
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
}
-int modifiers_isParticleEnabled(Object *ob)
+bool modifiers_isParticleEnabled(Object *ob)
{
ModifierData *md = modifiers_findByType(ob, eModifierType_ParticleSystem);
return (md && md->mode & (eModifierMode_Realtime | eModifierMode_Render));
}
-int modifier_isEnabled(struct Scene *scene, ModifierData *md, int required_mode)
+bool modifier_isEnabled(struct Scene *scene, ModifierData *md, int required_mode)
{
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
@@ -569,7 +569,7 @@ Object *modifiers_isDeformedByCurve(Object *ob)
return NULL;
}
-int modifiers_usesArmature(Object *ob, bArmature *arm)
+bool modifiers_usesArmature(Object *ob, bArmature *arm)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
@@ -577,24 +577,24 @@ int modifiers_usesArmature(Object *ob, bArmature *arm)
if (md->type == eModifierType_Armature) {
ArmatureModifierData *amd = (ArmatureModifierData *) md;
if (amd->object && amd->object->data == arm)
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
-int modifier_isCorrectableDeformed(ModifierData *md)
+bool modifier_isCorrectableDeformed(ModifierData *md)
{
if (md->type == eModifierType_Armature)
- return 1;
+ return true;
if (md->type == eModifierType_ShapeKey)
- return 1;
+ return true;
- return 0;
+ return false;
}
-int modifiers_isCorrectableDeformed(Object *ob)
+bool modifiers_isCorrectableDeformed(Object *ob)
{
ModifierData *md = modifiers_getVirtualModifierList(ob);
@@ -603,24 +603,24 @@ int modifiers_isCorrectableDeformed(Object *ob)
/* pass */
}
else if (modifier_isCorrectableDeformed(md)) {
- return 1;
+ return true;
}
}
- return 0;
+ return false;
}
/* Check whether the given object has a modifier in its stack that uses WEIGHT_MCOL CD layer
* to preview something... Used by DynamicPaint and WeightVG currently. */
-int modifiers_isPreview(Object *ob)
+bool modifiers_isPreview(Object *ob)
{
ModifierData *md = ob->modifiers.first;
for (; md; md = md->next) {
if (modifier_isPreview(md))
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
void modifier_freeTemporaryData(ModifierData *md)
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 10b0e14d517..1d0b0deae7e 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -1420,10 +1420,10 @@ void BKE_free_oceantex(struct OceanTex *ot)
/* ------------------------------------------------------------------------- */
-int BKE_texture_dependsOnTime(const struct Tex *texture)
+bool BKE_texture_dependsOnTime(const struct Tex *texture)
{
if (texture->ima &&
- ELEM(texture->ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE))
+ ELEM(texture->ima->source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE))
{
return 1;
}
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index 7ab3a5df531..3ab7bff0e63 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -82,7 +82,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(
return dataMask;
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
ArmatureModifierData *amd = (ArmatureModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_boolean.c b/source/blender/modifiers/intern/MOD_boolean.c
index 2be2f350a73..03d40eb58f1 100644
--- a/source/blender/modifiers/intern/MOD_boolean.c
+++ b/source/blender/modifiers/intern/MOD_boolean.c
@@ -59,7 +59,7 @@ static void copyData(ModifierData *md, ModifierData *target)
tbmd->operation = bmd->operation;
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
BooleanModifierData *bmd = (BooleanModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index e614213d028..fe3a0641667 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -71,9 +71,9 @@ static void copyData(ModifierData *md, ModifierData *target)
tbmd->seed = bmd->seed;
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index 7c8f8bfc82f..05d00ca5375 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -78,16 +78,16 @@ static void copyData(ModifierData *md, ModifierData *target)
BLI_strncpy(tcmd->defgrp_name, cmd->defgrp_name, sizeof(tcmd->defgrp_name));
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
CastModifierData *cmd = (CastModifierData *) md;
short flag;
flag = cmd->flag & (MOD_CAST_X | MOD_CAST_Y | MOD_CAST_Z);
- if ((cmd->fac == 0.0f) || flag == 0) return 1;
+ if ((cmd->fac == 0.0f) || flag == 0) return true;
- return 0;
+ return false;
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
diff --git a/source/blender/modifiers/intern/MOD_cloth.c b/source/blender/modifiers/intern/MOD_cloth.c
index da0758a09d0..33e0456d492 100644
--- a/source/blender/modifiers/intern/MOD_cloth.c
+++ b/source/blender/modifiers/intern/MOD_cloth.c
@@ -159,9 +159,9 @@ static void copyData(ModifierData *md, ModifierData *target)
tclmd->clothObject = NULL;
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static void freeData(ModifierData *md)
diff --git a/source/blender/modifiers/intern/MOD_collision.c b/source/blender/modifiers/intern/MOD_collision.c
index ab141312932..9335d7577c7 100644
--- a/source/blender/modifiers/intern/MOD_collision.c
+++ b/source/blender/modifiers/intern/MOD_collision.c
@@ -99,9 +99,9 @@ static void freeData(ModifierData *md)
}
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static void deformVerts(ModifierData *md, Object *ob,
diff --git a/source/blender/modifiers/intern/MOD_curve.c b/source/blender/modifiers/intern/MOD_curve.c
index 3ef6b9bfcb8..28749d5ce90 100644
--- a/source/blender/modifiers/intern/MOD_curve.c
+++ b/source/blender/modifiers/intern/MOD_curve.c
@@ -78,7 +78,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(userRenderParams))
{
CurveModifierData *cmd = (CurveModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_displace.c b/source/blender/modifiers/intern/MOD_displace.c
index 988d15e8df4..d8e2647426c 100644
--- a/source/blender/modifiers/intern/MOD_displace.c
+++ b/source/blender/modifiers/intern/MOD_displace.c
@@ -95,7 +95,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int dependsOnTime(ModifierData *md)
+static bool dependsOnTime(ModifierData *md)
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
@@ -103,11 +103,11 @@ static int dependsOnTime(ModifierData *md)
return BKE_texture_dependsOnTime(dmd->texture);
}
else {
- return 0;
+ return false;
}
}
-static int dependsOnNormals(ModifierData *md)
+static bool dependsOnNormals(ModifierData *md)
{
DisplaceModifierData *dmd = (DisplaceModifierData *)md;
return (dmd->direction == MOD_DISP_DIR_NOR);
@@ -137,7 +137,7 @@ static void foreachTexLink(ModifierData *md, Object *ob,
walk(userData, ob, md, "texture");
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
DisplaceModifierData *dmd = (DisplaceModifierData *) md;
return ((!dmd->texture && dmd->direction == MOD_DISP_DIR_RGB_XYZ) || dmd->strength == 0.0f);
diff --git a/source/blender/modifiers/intern/MOD_dynamicpaint.c b/source/blender/modifiers/intern/MOD_dynamicpaint.c
index 60fb606ad8b..df72d31596c 100644
--- a/source/blender/modifiers/intern/MOD_dynamicpaint.c
+++ b/source/blender/modifiers/intern/MOD_dynamicpaint.c
@@ -139,9 +139,9 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
}
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static void foreachIDLink(ModifierData *md, Object *ob,
diff --git a/source/blender/modifiers/intern/MOD_explode.c b/source/blender/modifiers/intern/MOD_explode.c
index c8899bac450..fe680041197 100644
--- a/source/blender/modifiers/intern/MOD_explode.c
+++ b/source/blender/modifiers/intern/MOD_explode.c
@@ -80,9 +80,9 @@ static void copyData(ModifierData *md, ModifierData *target)
temd->protect = emd->protect;
temd->vgroup = emd->vgroup;
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
{
diff --git a/source/blender/modifiers/intern/MOD_fluidsim.c b/source/blender/modifiers/intern/MOD_fluidsim.c
index c9121010d5d..d3c56b8d7f7 100644
--- a/source/blender/modifiers/intern/MOD_fluidsim.c
+++ b/source/blender/modifiers/intern/MOD_fluidsim.c
@@ -123,9 +123,9 @@ static void updateDepgraph(
}
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index 9d18c81d5bc..b4193a0a369 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -94,7 +94,7 @@ static void freeData(ModifierData *md)
if (hmd->indexar) MEM_freeN(hmd->indexar);
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
HookModifierData *hmd = (HookModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_laplaciansmooth.c b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
index 8bec591ab55..29da4076acd 100644
--- a/source/blender/modifiers/intern/MOD_laplaciansmooth.c
+++ b/source/blender/modifiers/intern/MOD_laplaciansmooth.c
@@ -80,8 +80,8 @@ struct BLaplacianSystem {
};
typedef struct BLaplacianSystem LaplacianSystem;
-static CustomDataMask required_data_mask(Object *UNUSED(ob), ModifierData *md);
-static int is_disabled(ModifierData *md, int UNUSED(useRenderParams));
+static CustomDataMask required_data_mask(Object *ob, ModifierData *md);
+static bool is_disabled(ModifierData *md, int useRenderParams);
static float average_area_quad_v3(float *v1, float *v2, float *v3, float *v4);
static float compute_volume(float (*vertexCos)[3], MFace *mfaces, int numFaces);
static float cotan_weight(float *v1, float *v2, float *v3);
@@ -215,7 +215,7 @@ static void copy_data(ModifierData *md, ModifierData *target)
BLI_strncpy(tsmd->defgrp_name, smd->defgrp_name, sizeof(tsmd->defgrp_name));
}
-static int is_disabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool is_disabled(ModifierData *md, int UNUSED(useRenderParams))
{
LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *) md;
short flag;
diff --git a/source/blender/modifiers/intern/MOD_lattice.c b/source/blender/modifiers/intern/MOD_lattice.c
index a5c52c6c76a..b83323d9141 100644
--- a/source/blender/modifiers/intern/MOD_lattice.c
+++ b/source/blender/modifiers/intern/MOD_lattice.c
@@ -74,7 +74,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(userRenderParams))
{
LatticeModifierData *lmd = (LatticeModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_meshcache.c b/source/blender/modifiers/intern/MOD_meshcache.c
index be7bfae22fb..6d5caaa3ad1 100644
--- a/source/blender/modifiers/intern/MOD_meshcache.c
+++ b/source/blender/modifiers/intern/MOD_meshcache.c
@@ -96,13 +96,13 @@ static void copyData(ModifierData *md, ModifierData *target)
BLI_strncpy(tmcmd->filepath, mcmd->filepath, sizeof(tmcmd->filepath));
}
-static int dependsOnTime(ModifierData *md)
+static bool dependsOnTime(ModifierData *md)
{
MeshCacheModifierData *mcmd = (MeshCacheModifierData *)md;
return (mcmd->play_mode == MOD_MESHCACHE_PLAY_CFEA);
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
MeshCacheModifierData *mcmd = (MeshCacheModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_meshdeform.c b/source/blender/modifiers/intern/MOD_meshdeform.c
index f11ab3f0469..b6f8dede42f 100644
--- a/source/blender/modifiers/intern/MOD_meshdeform.c
+++ b/source/blender/modifiers/intern/MOD_meshdeform.c
@@ -96,7 +96,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_none.c b/source/blender/modifiers/intern/MOD_none.c
index 7bdff12b348..579f65a9c50 100644
--- a/source/blender/modifiers/intern/MOD_none.c
+++ b/source/blender/modifiers/intern/MOD_none.c
@@ -43,9 +43,9 @@
* no other functions will be called
*/
-static int isDisabled(ModifierData *UNUSED(md), int UNUSED(userRenderParams))
+static bool isDisabled(ModifierData *UNUSED(md), int UNUSED(userRenderParams))
{
- return 1;
+ return true;
}
ModifierTypeInfo modifierType_None = {
diff --git a/source/blender/modifiers/intern/MOD_particleinstance.c b/source/blender/modifiers/intern/MOD_particleinstance.c
index b0de27b7292..e846ce11262 100644
--- a/source/blender/modifiers/intern/MOD_particleinstance.c
+++ b/source/blender/modifiers/intern/MOD_particleinstance.c
@@ -77,12 +77,7 @@ static void copyData(ModifierData *md, ModifierData *target)
tpimd->random_position = pimd->random_position;
}
-static int dependsOnTime(ModifierData *UNUSED(md))
-{
- return 0;
-}
-
-static int isDisabled(ModifierData *md, int useRenderParams)
+static bool isDisabled(ModifierData *md, int useRenderParams)
{
ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md;
ParticleSystem *psys;
@@ -417,7 +412,7 @@ ModifierTypeInfo modifierType_ParticleInstance = {
/* freeData */ NULL,
/* isDisabled */ isDisabled,
/* updateDepgraph */ updateDepgraph,
- /* dependsOnTime */ dependsOnTime,
+ /* dependsOnTime */ NULL,
/* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
/* foreachIDLink */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c
index 475d294abd6..5faa1ecdaac 100644
--- a/source/blender/modifiers/intern/MOD_screw.c
+++ b/source/blender/modifiers/intern/MOD_screw.c
@@ -930,12 +930,6 @@ static void foreachObjectLink(
walk(userData, ob, &ltmd->ob_axis);
}
-static int dependsOnTime(ModifierData *UNUSED(md))
-{
- return 0;
-}
-
-
ModifierTypeInfo modifierType_Screw = {
/* name */ "Screw",
/* structName */ "ScrewModifierData",
@@ -959,7 +953,7 @@ ModifierTypeInfo modifierType_Screw = {
/* freeData */ NULL,
/* isDisabled */ NULL,
/* updateDepgraph */ updateDepgraph,
- /* dependsOnTime */ dependsOnTime,
+ /* dependsOnTime */ NULL,
/* dependsOnNormals */ NULL,
/* foreachObjectLink */ foreachObjectLink,
/* foreachIDLink */ NULL,
diff --git a/source/blender/modifiers/intern/MOD_shrinkwrap.c b/source/blender/modifiers/intern/MOD_shrinkwrap.c
index 7a55f9a5b48..9addcdc6ee1 100644
--- a/source/blender/modifiers/intern/MOD_shrinkwrap.c
+++ b/source/blender/modifiers/intern/MOD_shrinkwrap.c
@@ -95,7 +95,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *) md;
return !smd->target;
@@ -161,7 +161,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
DAG_RL_OB_DATA | DAG_RL_DATA_DATA, "Shrinkwrap Modifier");
}
-static int dependsOnNormals(ModifierData *md)
+static bool dependsOnNormals(ModifierData *md)
{
ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *)md;
diff --git a/source/blender/modifiers/intern/MOD_smoke.c b/source/blender/modifiers/intern/MOD_smoke.c
index 4b2ce47b8d9..3e107b7090c 100644
--- a/source/blender/modifiers/intern/MOD_smoke.c
+++ b/source/blender/modifiers/intern/MOD_smoke.c
@@ -108,9 +108,9 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
return smokeModifier_do(smd, md->scene, ob, dm);
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static void updateDepgraph(ModifierData *md, DagForest *forest,
diff --git a/source/blender/modifiers/intern/MOD_smooth.c b/source/blender/modifiers/intern/MOD_smooth.c
index 1d35d8f55bf..0da122b0d0f 100644
--- a/source/blender/modifiers/intern/MOD_smooth.c
+++ b/source/blender/modifiers/intern/MOD_smooth.c
@@ -70,7 +70,7 @@ static void copyData(ModifierData *md, ModifierData *target)
BLI_strncpy(tsmd->defgrp_name, smd->defgrp_name, sizeof(tsmd->defgrp_name));
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
SmoothModifierData *smd = (SmoothModifierData *) md;
short flag;
diff --git a/source/blender/modifiers/intern/MOD_softbody.c b/source/blender/modifiers/intern/MOD_softbody.c
index 75a98bc0746..5f5347a46b0 100644
--- a/source/blender/modifiers/intern/MOD_softbody.c
+++ b/source/blender/modifiers/intern/MOD_softbody.c
@@ -53,9 +53,9 @@ static void deformVerts(ModifierData *md, Object *ob,
sbObjectStep(md->scene, ob, (float)md->scene->r.cfra, vertexCos, numVerts);
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
diff --git a/source/blender/modifiers/intern/MOD_subsurf.c b/source/blender/modifiers/intern/MOD_subsurf.c
index 4b6f8ce69d4..98cea62a2ff 100644
--- a/source/blender/modifiers/intern/MOD_subsurf.c
+++ b/source/blender/modifiers/intern/MOD_subsurf.c
@@ -81,7 +81,7 @@ static void freeData(ModifierData *md)
}
}
-static int isDisabled(ModifierData *md, int useRenderParams)
+static bool isDisabled(ModifierData *md, int useRenderParams)
{
SubsurfModifierData *smd = (SubsurfModifierData *) md;
int levels = (useRenderParams) ? smd->renderLevels : smd->levels;
diff --git a/source/blender/modifiers/intern/MOD_surface.c b/source/blender/modifiers/intern/MOD_surface.c
index 4e7aaf9d0ba..78ac029d726 100644
--- a/source/blender/modifiers/intern/MOD_surface.c
+++ b/source/blender/modifiers/intern/MOD_surface.c
@@ -80,9 +80,9 @@ static void freeData(ModifierData *md)
}
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static void deformVerts(ModifierData *md, Object *ob,
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index b63e293aa80..cba1880491c 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -97,7 +97,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int dependsOnTime(ModifierData *md)
+static bool dependsOnTime(ModifierData *md)
{
WarpModifierData *wmd = (WarpModifierData *)md;
@@ -105,7 +105,7 @@ static int dependsOnTime(ModifierData *md)
return BKE_texture_dependsOnTime(wmd->texture);
}
else {
- return 0;
+ return false;
}
}
@@ -116,7 +116,7 @@ static void freeData(ModifierData *md)
}
-static int isDisabled(ModifierData *md, int UNUSED(userRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(userRenderParams))
{
WarpModifierData *wmd = (WarpModifierData *) md;
diff --git a/source/blender/modifiers/intern/MOD_wave.c b/source/blender/modifiers/intern/MOD_wave.c
index 89599a4e386..bf5f9fb6ae9 100644
--- a/source/blender/modifiers/intern/MOD_wave.c
+++ b/source/blender/modifiers/intern/MOD_wave.c
@@ -100,9 +100,9 @@ static void copyData(ModifierData *md, ModifierData *target)
BLI_strncpy(twmd->defgrp_name, wmd->defgrp_name, sizeof(twmd->defgrp_name));
}
-static int dependsOnTime(ModifierData *UNUSED(md))
+static bool dependsOnTime(ModifierData *UNUSED(md))
{
- return 1;
+ return true;
}
static void foreachObjectLink(
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index 2cb41cb6196..eee0856d69e 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -121,13 +121,13 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int dependsOnTime(ModifierData *md)
+static bool dependsOnTime(ModifierData *md)
{
WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
if (wmd->mask_texture)
return BKE_texture_dependsOnTime(wmd->mask_texture);
- return 0;
+ return false;
}
static void foreachObjectLink(ModifierData *md, Object *ob,
@@ -170,7 +170,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UN
"WeightVGEdit Modifier");
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
/* If no vertex group, bypass. */
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index 8273b6b09f6..a5843d04c24 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -161,13 +161,13 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int dependsOnTime(ModifierData *md)
+static bool dependsOnTime(ModifierData *md)
{
WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
if (wmd->mask_texture)
return BKE_texture_dependsOnTime(wmd->mask_texture);
- return 0;
+ return false;
}
static void foreachObjectLink(ModifierData *md, Object *ob,
@@ -210,7 +210,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UN
"WeightVGMix Modifier");
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
/* If no vertex group, bypass. */
diff --git a/source/blender/modifiers/intern/MOD_weightvgproximity.c b/source/blender/modifiers/intern/MOD_weightvgproximity.c
index 9241510f18a..7a9bb6b34d1 100644
--- a/source/blender/modifiers/intern/MOD_weightvgproximity.c
+++ b/source/blender/modifiers/intern/MOD_weightvgproximity.c
@@ -282,7 +282,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
return dataMask;
}
-static int dependsOnTime(ModifierData *md)
+static bool dependsOnTime(ModifierData *md)
{
WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
@@ -338,7 +338,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest, struct Scene *UN
"WeightVGProximity Modifier");
}
-static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
+static bool isDisabled(ModifierData *md, int UNUSED(useRenderParams))
{
WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
/* If no vertex group, bypass. */