Refactor of modifiers' apply function: now use a single bit-flag parameter to pass options, instead of having one parameter per boolean flag (i.e. replaces current useRenderParams and isFinalCalc by a single ModifierApplyFlag flag. ModifierApplyFlag is an enum defined in BKE_modifier.h). This way we won't anymore have to edit all modifier files when e.g. adding a new control flag!
Should have no effect over modifier behavior.
This commit is contained in:
@@ -140,9 +140,8 @@ static DerivedMesh *edgesplitModifier_do(EdgeSplitModifierData *emd,
|
||||
return doEdgeSplit(dm, emd, ob);
|
||||
}
|
||||
|
||||
static DerivedMesh *applyModifier(
|
||||
ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *result;
|
||||
EdgeSplitModifierData *emd = (EdgeSplitModifierData *) md;
|
||||
@@ -159,7 +158,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
|
||||
struct BMEditMesh *UNUSED(editData),
|
||||
DerivedMesh *derivedData)
|
||||
{
|
||||
return applyModifier(md, ob, derivedData, 0, 1);
|
||||
return applyModifier(md, ob, derivedData, MOD_APPLY_USECACHE);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user