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