Modifiers: Use bool for boolean flag in isDisabled
This commit is contained in:
parent
25619443bb
commit
e4ce5fd8d2
|
@ -317,7 +317,7 @@ typedef struct ModifierTypeInfo {
|
|||
*
|
||||
* This function is optional (assumes never disabled if not present).
|
||||
*/
|
||||
bool (*isDisabled)(const struct Scene *scene, struct ModifierData *md, int userRenderParams);
|
||||
bool (*isDisabled)(const struct Scene *scene, struct ModifierData *md, bool userRenderParams);
|
||||
|
||||
/* Add the appropriate relations to the dependency graph.
|
||||
*
|
||||
|
|
|
@ -85,7 +85,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *UNUSED(
|
|||
return dataMask;
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ static void initData(ModifierData *md)
|
|||
bmd->double_threshold = 1e-6f;
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
BooleanModifierData *bmd = (BooleanModifierData *) md;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ static void initData(ModifierData *md)
|
|||
cmd->object = NULL;
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
CastModifierData *cmd = (CastModifierData *) md;
|
||||
short flag;
|
||||
|
|
|
@ -71,7 +71,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
|||
return dataMask;
|
||||
}
|
||||
|
||||
static bool isDisabled(const Scene *UNUSED(scene), ModifierData *md, int UNUSED(userRenderParams))
|
||||
static bool isDisabled(const Scene *UNUSED(scene), ModifierData *md, bool UNUSED(userRenderParams))
|
||||
{
|
||||
CurveModifierData *cmd = (CurveModifierData *) md;
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
|
|||
}
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
DataTransferModifierData *dtmd = (DataTransferModifierData *) md;
|
||||
/* If no source object, bypass. */
|
||||
|
|
|
@ -138,7 +138,7 @@ static void foreachTexLink(
|
|||
walk(userData, ob, md, "texture");
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
DisplaceModifierData *dmd = (DisplaceModifierData *) md;
|
||||
return ((!dmd->texture && dmd->direction == MOD_DISP_DIR_RGB_XYZ) || dmd->strength == 0.0f);
|
||||
|
|
|
@ -96,7 +96,7 @@ static void freeData(ModifierData *md)
|
|||
MEM_SAFE_FREE(hmd->indexar);
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
HookModifierData *hmd = (HookModifierData *) md;
|
||||
|
||||
|
|
|
@ -715,7 +715,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
|
|||
tlmd->cache_system = NULL;
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
LaplacianDeformModifierData *lmd = (LaplacianDeformModifierData *)md;
|
||||
if (lmd->anchor_grp_name[0]) return 0;
|
||||
|
|
|
@ -81,7 +81,7 @@ struct BLaplacianSystem {
|
|||
typedef struct BLaplacianSystem LaplacianSystem;
|
||||
|
||||
static CustomDataMask required_data_mask(Object *ob, ModifierData *md);
|
||||
static bool is_disabled(const struct Scene *UNUSED(scene), ModifierData *md, int useRenderParams);
|
||||
static bool is_disabled(const struct Scene *UNUSED(scene), ModifierData *md, bool 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 delete_laplacian_system(LaplacianSystem *sys);
|
||||
|
@ -474,7 +474,7 @@ static void init_data(ModifierData *md)
|
|||
smd->defgrp_name[0] = '\0';
|
||||
}
|
||||
|
||||
static bool is_disabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool is_disabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
LaplacianSmoothModifierData *smd = (LaplacianSmoothModifierData *) md;
|
||||
short flag;
|
||||
|
|
|
@ -67,7 +67,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
|||
return dataMask;
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(userRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(userRenderParams))
|
||||
{
|
||||
LatticeModifierData *lmd = (LatticeModifierData *) md;
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ static bool dependsOnTime(ModifierData *md)
|
|||
return (mcmd->play_mode == MOD_MESHCACHE_PLAY_CFEA);
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
MeshCacheModifierData *mcmd = (MeshCacheModifierData *) md;
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
|||
return dataMask;
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
MeshDeformModifierData *mmd = (MeshDeformModifierData *) md;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ static void freeData(ModifierData *md)
|
|||
}
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *) md;
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
* no other functions will be called
|
||||
*/
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *UNUSED(md), int UNUSED(userRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *UNUSED(md), bool UNUSED(userRenderParams))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -524,7 +524,7 @@ static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk,
|
|||
walk(userData, ob, &enmd->target, IDWALK_CB_NOP);
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
NormalEditModifierData *enmd = (NormalEditModifierData *)md;
|
||||
|
||||
|
|
|
@ -88,7 +88,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
|||
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *scene, ModifierData *md, int useRenderParams)
|
||||
static bool isDisabled(const struct Scene *scene, ModifierData *md, bool useRenderParams)
|
||||
{
|
||||
ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *)md;
|
||||
ParticleSystem *psys;
|
||||
|
|
|
@ -84,7 +84,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
|||
return dataMask;
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
ShrinkwrapModifierData *smd = (ShrinkwrapModifierData *) md;
|
||||
return !smd->target;
|
||||
|
|
|
@ -61,7 +61,7 @@ static void initData(ModifierData *md)
|
|||
smd->defgrp_name[0] = '\0';
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
SmoothModifierData *smd = (SmoothModifierData *) md;
|
||||
short flag;
|
||||
|
|
|
@ -91,7 +91,7 @@ static void freeData(ModifierData *md)
|
|||
}
|
||||
}
|
||||
|
||||
static bool isDisabled(const Scene *scene, ModifierData *md, int useRenderParams)
|
||||
static bool isDisabled(const Scene *scene, ModifierData *md, bool useRenderParams)
|
||||
{
|
||||
SubsurfModifierData *smd = (SubsurfModifierData *) md;
|
||||
int levels = (useRenderParams) ? smd->renderLevels : smd->levels;
|
||||
|
|
|
@ -1195,7 +1195,7 @@ static void deformVertsEM(
|
|||
surfacedeformModifier_do(md, ctx, vertexCos, numVerts, ctx->object);
|
||||
}
|
||||
|
||||
static bool isDisabled(const Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
SurfaceDeformModifierData *smd = (SurfaceDeformModifierData *)md;
|
||||
|
||||
|
|
|
@ -109,7 +109,7 @@ static void freeData(ModifierData *md)
|
|||
}
|
||||
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(userRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(userRenderParams))
|
||||
{
|
||||
WarpModifierData *wmd = (WarpModifierData *) md;
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
|
|||
}
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
|
||||
/* If no vertex group, bypass. */
|
||||
|
|
|
@ -185,7 +185,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
|
|||
}
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
|
||||
/* If no vertex group, bypass. */
|
||||
|
|
|
@ -358,7 +358,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
|
|||
}
|
||||
}
|
||||
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, int UNUSED(useRenderParams))
|
||||
static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool UNUSED(useRenderParams))
|
||||
{
|
||||
WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
|
||||
/* If no vertex group, bypass. */
|
||||
|
|
Loading…
Reference in New Issue