forked from bartvdbraak/blender
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:
parent
895e426e26
commit
318b44fe5d
@ -109,6 +109,12 @@ typedef void (*ObjectWalkFunc)(void *userData, struct Object *ob, struct Object
|
||||
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);
|
||||
|
||||
typedef enum ModifierApplyFlag {
|
||||
MOD_APPLY_RENDER = 1 << 0, /* Render time. */
|
||||
MOD_APPLY_USECACHE = 1 << 1, /* Last modifier in stack. */
|
||||
} ModifierApplyFlag;
|
||||
|
||||
|
||||
typedef struct ModifierTypeInfo {
|
||||
/* The user visible name for this modifier */
|
||||
char name[32];
|
||||
@ -142,7 +148,7 @@ typedef struct ModifierTypeInfo {
|
||||
void (*deformVerts)(struct ModifierData *md, struct Object *ob,
|
||||
struct DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3], int numVerts,
|
||||
int useRenderParams, int isFinalCalc);
|
||||
ModifierApplyFlag flag);
|
||||
|
||||
/* Like deformMatricesEM but called from object mode (for supporting modifiers in sculpt mode) */
|
||||
void (*deformMatrices)(
|
||||
@ -187,7 +193,7 @@ typedef struct ModifierTypeInfo {
|
||||
struct DerivedMesh *(*applyModifier)(
|
||||
struct ModifierData *md, struct Object *ob,
|
||||
struct DerivedMesh *derivedData,
|
||||
int useRenderParams, int isFinalCalc);
|
||||
ModifierApplyFlag flag);
|
||||
|
||||
/* Like applyModifier but called during editmode (for supporting
|
||||
* modifiers).
|
||||
|
@ -814,7 +814,7 @@ DerivedMesh *mesh_create_derived_for_modifier(Scene *scene, Object *ob,
|
||||
int numVerts;
|
||||
float (*deformedVerts)[3] = mesh_getVertexCos(me, &numVerts);
|
||||
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, 0, 0);
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, 0);
|
||||
dm = mesh_create_derived(me, ob, deformedVerts);
|
||||
|
||||
if (build_shapekey_layers)
|
||||
@ -828,7 +828,7 @@ DerivedMesh *mesh_create_derived_for_modifier(Scene *scene, Object *ob,
|
||||
if (build_shapekey_layers)
|
||||
add_shapekey_layers(tdm, me, ob);
|
||||
|
||||
dm = mti->applyModifier(md, ob, tdm, 0, 0);
|
||||
dm = mti->applyModifier(md, ob, tdm, 0);
|
||||
|
||||
if (tdm != dm) tdm->release(tdm);
|
||||
}
|
||||
@ -1383,6 +1383,13 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
/* XXX Same as above... For now, only weights preview in WPaint mode. */
|
||||
const int do_mod_wmcol = do_init_wmcol;
|
||||
|
||||
ModifierApplyFlag app_flags = useRenderParams ? MOD_APPLY_RENDER : 0;
|
||||
ModifierApplyFlag deform_app_flags = app_flags;
|
||||
if (useCache)
|
||||
app_flags |= MOD_APPLY_USECACHE;
|
||||
if (useDeform)
|
||||
deform_app_flags |= MOD_APPLY_USECACHE;
|
||||
|
||||
if (mmd && !mmd->sculptlvl)
|
||||
has_multires = 0;
|
||||
|
||||
@ -1434,7 +1441,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
if (!deformedVerts)
|
||||
deformedVerts = mesh_getVertexCos(me, &numVerts);
|
||||
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, useRenderParams, useDeform);
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, deform_app_flags);
|
||||
}
|
||||
else {
|
||||
break;
|
||||
@ -1547,7 +1554,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
}
|
||||
}
|
||||
|
||||
mti->deformVerts(md, ob, dm, deformedVerts, numVerts, useRenderParams, useDeform);
|
||||
mti->deformVerts(md, ob, dm, deformedVerts, numVerts, deform_app_flags);
|
||||
}
|
||||
else {
|
||||
DerivedMesh *ndm;
|
||||
@ -1622,7 +1629,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
}
|
||||
}
|
||||
|
||||
ndm = mti->applyModifier(md, ob, dm, useRenderParams, useCache);
|
||||
ndm = mti->applyModifier(md, ob, dm, app_flags);
|
||||
|
||||
if (ndm) {
|
||||
/* if the modifier returned a new dm, release the old one */
|
||||
@ -1645,7 +1652,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
|
||||
nextmask &= ~CD_MASK_ORCO;
|
||||
DM_set_only_copy(orcodm, nextmask | CD_MASK_ORIGINDEX);
|
||||
ndm = mti->applyModifier(md, ob, orcodm, useRenderParams, 0);
|
||||
ndm = mti->applyModifier(md, ob, orcodm, app_flags & ~MOD_APPLY_USECACHE);
|
||||
|
||||
if (ndm) {
|
||||
/* if the modifier returned a new dm, release the old one */
|
||||
@ -1661,7 +1668,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
|
||||
nextmask &= ~CD_MASK_CLOTH_ORCO;
|
||||
DM_set_only_copy(clothorcodm, nextmask | CD_MASK_ORIGINDEX);
|
||||
ndm = mti->applyModifier(md, ob, clothorcodm, useRenderParams, 0);
|
||||
ndm = mti->applyModifier(md, ob, clothorcodm, app_flags & ~MOD_APPLY_USECACHE);
|
||||
|
||||
if (ndm) {
|
||||
/* if the modifier returned a new dm, release the old one */
|
||||
@ -1928,7 +1935,8 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
|
||||
|
||||
if (mti->deformVertsEM)
|
||||
mti->deformVertsEM(md, ob, em, dm, deformedVerts, numVerts);
|
||||
else mti->deformVerts(md, ob, dm, deformedVerts, numVerts, 0, 0);
|
||||
else
|
||||
mti->deformVerts(md, ob, dm, deformedVerts, numVerts, 0);
|
||||
}
|
||||
else {
|
||||
DerivedMesh *ndm;
|
||||
@ -1971,7 +1979,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
|
||||
if (mti->applyModifierEM)
|
||||
ndm = mti->applyModifierEM(md, ob, em, orcodm);
|
||||
else
|
||||
ndm = mti->applyModifier(md, ob, orcodm, 0, 0);
|
||||
ndm = mti->applyModifier(md, ob, orcodm, 0);
|
||||
|
||||
if (ndm) {
|
||||
/* if the modifier returned a new dm, release the old one */
|
||||
@ -1995,7 +2003,7 @@ static void editbmesh_calc_modifiers(Scene *scene, Object *ob, BMEditMesh *em, D
|
||||
if (mti->applyModifierEM)
|
||||
ndm = mti->applyModifierEM(md, ob, em, dm);
|
||||
else
|
||||
ndm = mti->applyModifier(md, ob, dm, 0, 0);
|
||||
ndm = mti->applyModifier(md, ob, dm, 0);
|
||||
|
||||
if (ndm) {
|
||||
if (dm && dm != ndm)
|
||||
|
@ -752,14 +752,19 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, fl
|
||||
Curve *cu = ob->data;
|
||||
ListBase *nurb = BKE_curve_nurbs_get(cu);
|
||||
int numVerts = 0;
|
||||
int editmode = (!forRender && cu->editnurb);
|
||||
const int editmode = (!forRender && cu->editnurb);
|
||||
ModifierApplyFlag app_flag = 0;
|
||||
float (*originalVerts)[3] = NULL;
|
||||
float (*deformedVerts)[3] = NULL;
|
||||
float *keyVerts = NULL;
|
||||
int required_mode;
|
||||
|
||||
if (forRender)
|
||||
if (editmode)
|
||||
app_flag |= MOD_APPLY_USECACHE;
|
||||
if (forRender) {
|
||||
app_flag |= MOD_APPLY_RENDER;
|
||||
required_mode = eModifierMode_Render;
|
||||
}
|
||||
else
|
||||
required_mode = eModifierMode_Realtime;
|
||||
|
||||
@ -800,7 +805,7 @@ static void curve_calc_modifiers_pre(Scene *scene, Object *ob, int forRender, fl
|
||||
originalVerts = MEM_dupallocN(deformedVerts);
|
||||
}
|
||||
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, forRender, editmode);
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, numVerts, app_flag);
|
||||
|
||||
if (md == pretessellatePoint)
|
||||
break;
|
||||
@ -866,9 +871,12 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
|
||||
DerivedMesh *dm = NULL, *ndm;
|
||||
float (*vertCos)[3] = NULL;
|
||||
int useCache = !forRender;
|
||||
ModifierApplyFlag app_flag = 0;
|
||||
|
||||
if (forRender)
|
||||
if (forRender) {
|
||||
app_flag |= MOD_APPLY_RENDER;
|
||||
required_mode = eModifierMode_Render;
|
||||
}
|
||||
else
|
||||
required_mode = eModifierMode_Realtime;
|
||||
|
||||
@ -887,6 +895,7 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
|
||||
|
||||
for (; md; md = md->next) {
|
||||
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
|
||||
ModifierApplyFlag appf = app_flag;
|
||||
|
||||
md->scene = scene;
|
||||
|
||||
@ -897,6 +906,8 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
|
||||
|
||||
if (mti->type == eModifierTypeType_OnlyDeform ||
|
||||
(mti->type == eModifierTypeType_DeformOrConstruct && !dm)) {
|
||||
if (editmode)
|
||||
appf |= MOD_APPLY_USECACHE;
|
||||
if (dm) {
|
||||
if (!vertCos) {
|
||||
totvert = dm->getNumVerts(dm);
|
||||
@ -904,14 +915,14 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
|
||||
dm->getVertCos(dm, vertCos);
|
||||
}
|
||||
|
||||
mti->deformVerts(md, ob, dm, vertCos, totvert, forRender, editmode);
|
||||
mti->deformVerts(md, ob, dm, vertCos, totvert, appf);
|
||||
}
|
||||
else {
|
||||
if (!vertCos) {
|
||||
vertCos = displist_get_allverts(dispbase, &totvert);
|
||||
}
|
||||
|
||||
mti->deformVerts(md, ob, NULL, vertCos, totvert, forRender, editmode);
|
||||
mti->deformVerts(md, ob, NULL, vertCos, totvert, appf);
|
||||
}
|
||||
}
|
||||
else {
|
||||
@ -953,7 +964,9 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
|
||||
vertCos = NULL;
|
||||
}
|
||||
|
||||
ndm = mti->applyModifier(md, ob, dm, forRender, useCache);
|
||||
if (useCache)
|
||||
appf |= MOD_APPLY_USECACHE;
|
||||
ndm = mti->applyModifier(md, ob, dm, appf);
|
||||
|
||||
if (ndm) {
|
||||
/* Modifier returned a new derived mesh */
|
||||
@ -1084,6 +1097,7 @@ static void curve_calc_orcodm(Scene *scene, Object *ob, DerivedMesh *derivedFina
|
||||
int required_mode;
|
||||
int editmode = (!forRender && cu->editnurb);
|
||||
DerivedMesh *ndm, *orcodm = NULL;
|
||||
const ModifierApplyFlag app_flag = forRender ? MOD_APPLY_RENDER : 0;
|
||||
|
||||
if (forRender)
|
||||
required_mode = eModifierMode_Render;
|
||||
@ -1114,7 +1128,7 @@ static void curve_calc_orcodm(Scene *scene, Object *ob, DerivedMesh *derivedFina
|
||||
if (!orcodm)
|
||||
orcodm = create_orco_dm(scene, ob);
|
||||
|
||||
ndm = mti->applyModifier(md, ob, orcodm, forRender, 0);
|
||||
ndm = mti->applyModifier(md, ob, orcodm, app_flag);
|
||||
|
||||
if (ndm) {
|
||||
/* if the modifier returned a new dm, release the old one */
|
||||
|
@ -976,7 +976,7 @@ void BKE_lattice_modifiers_calc(Scene *scene, Object *ob)
|
||||
if (mti->type != eModifierTypeType_OnlyDeform) continue;
|
||||
|
||||
if (!vertexCos) vertexCos = BKE_lattice_vertexcos_get(ob, &numVerts);
|
||||
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0, 0);
|
||||
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0);
|
||||
}
|
||||
|
||||
/* always displist to make this work like derivedmesh */
|
||||
|
@ -279,7 +279,7 @@ DerivedMesh *get_multires_dm(Scene *scene, MultiresModifierData *mmd, Object *ob
|
||||
DerivedMesh *tdm = mesh_get_derived_deform(scene, ob, CD_MASK_BAREMESH);
|
||||
DerivedMesh *dm;
|
||||
|
||||
dm = mti->applyModifier(md, ob, tdm, 0, 1);
|
||||
dm = mti->applyModifier(md, ob, tdm, MOD_APPLY_USECACHE);
|
||||
if (dm == tdm) {
|
||||
dm = CDDM_copy(tdm);
|
||||
}
|
||||
@ -438,7 +438,7 @@ int multiresModifier_reshapeFromDeformMod(Scene *scene, MultiresModifierData *mm
|
||||
deformedVerts = MEM_callocN(sizeof(float) * numVerts * 3, "multiresReshape_deformVerts");
|
||||
|
||||
dm->getVertCos(dm, deformedVerts);
|
||||
mti->deformVerts(md, ob, dm, deformedVerts, numVerts, 0, 0);
|
||||
mti->deformVerts(md, ob, dm, deformedVerts, numVerts, 0);
|
||||
|
||||
ndm = CDDM_copy(dm);
|
||||
CDDM_apply_vert_coords(ndm, deformedVerts);
|
||||
|
@ -545,7 +545,7 @@ static int modifier_apply_obdata(ReportList *reports, Scene *scene, Object *ob,
|
||||
BKE_report(reports, RPT_INFO, "Applied modifier only changed CV points, not tessellated/bevel vertices");
|
||||
|
||||
vertexCos = BKE_curve_vertexCos_get(cu, &cu->nurb, &numVerts);
|
||||
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0, 0);
|
||||
mti->deformVerts(md, ob, NULL, vertexCos, numVerts, 0);
|
||||
BK_curve_vertexCos_apply(cu, &cu->nurb, vertexCos);
|
||||
|
||||
MEM_freeN(vertexCos);
|
||||
|
@ -388,7 +388,7 @@ void crazyspace_build_sculpt(Scene *scene, Object *ob, float (**deformmats)[3][3
|
||||
if (mti->deformMatrices && !deformed)
|
||||
continue;
|
||||
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, me->totvert, 0, 0);
|
||||
mti->deformVerts(md, ob, NULL, deformedVerts, me->totvert, 0);
|
||||
deformed = 1;
|
||||
}
|
||||
}
|
||||
|
@ -118,8 +118,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
ArmatureModifierData *amd = (ArmatureModifierData *) md;
|
||||
|
||||
|
@ -542,8 +542,7 @@ static DerivedMesh *arrayModifier_doArray(ArrayModifierData *amd,
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *dm,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *result;
|
||||
ArrayModifierData *amd = (ArrayModifierData *) md;
|
||||
@ -560,7 +559,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md, Object *ob,
|
||||
struct BMEditMesh *UNUSED(editData),
|
||||
DerivedMesh *dm)
|
||||
{
|
||||
return applyModifier(md, ob, dm, 0, 1);
|
||||
return applyModifier(md, ob, dm, MOD_APPLY_USECACHE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,8 +107,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
||||
*/
|
||||
static DerivedMesh *applyModifier(ModifierData *md, struct Object *UNUSED(ob),
|
||||
DerivedMesh *dm,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *result;
|
||||
BMesh *bm;
|
||||
@ -161,8 +160,7 @@ static DerivedMesh *applyModifier(ModifierData *md, struct Object *UNUSED(ob),
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *result;
|
||||
BMEditMesh *em;
|
||||
@ -202,7 +200,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -119,8 +119,7 @@ static DerivedMesh *get_quick_derivedMesh(DerivedMesh *derivedData, DerivedMesh
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
BooleanModifierData *bmd = (BooleanModifierData *) md;
|
||||
DerivedMesh *dm;
|
||||
@ -164,8 +163,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
#else // WITH_MOD_BOOLEAN
|
||||
static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
return derivedData;
|
||||
}
|
||||
|
@ -77,8 +77,7 @@ static int dependsOnTime(ModifierData *UNUSED(md))
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
DerivedMesh *result;
|
||||
|
@ -581,8 +581,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = NULL;
|
||||
CastModifierData *cmd = (CastModifierData *)md;
|
||||
|
@ -68,7 +68,7 @@ static void initData(ModifierData *md)
|
||||
}
|
||||
|
||||
static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData, float (*vertexCos)[3],
|
||||
int UNUSED(numVerts), int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
int UNUSED(numVerts), ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm;
|
||||
ClothModifierData *clmd = (ClothModifierData *) md;
|
||||
|
@ -108,8 +108,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int UNUSED(numVerts),
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
CollisionModifierData *collmd = (CollisionModifierData *) md;
|
||||
DerivedMesh *dm = NULL;
|
||||
|
@ -114,8 +114,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
CurveModifierData *cmd = (CurveModifierData *) md;
|
||||
|
||||
@ -133,7 +132,7 @@ static void deformVertsEM(
|
||||
|
||||
if (!derivedData) dm = CDDM_from_BMEditMesh(editData, ob->data, FALSE, FALSE);
|
||||
|
||||
deformVerts(md, ob, dm, vertexCos, numVerts, 0, 0);
|
||||
deformVerts(md, ob, dm, vertexCos, numVerts, 0);
|
||||
|
||||
if (!derivedData) dm->release(dm);
|
||||
}
|
||||
|
@ -72,8 +72,7 @@ static void copyData(ModifierData *md, ModifierData *target)
|
||||
#ifdef WITH_MOD_DECIMATE
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DecimateModifierData *dmd = (DecimateModifierData *) md;
|
||||
DerivedMesh *dm = derivedData, *result = NULL;
|
||||
@ -196,8 +195,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *UNUSED(ob),
|
||||
#else // WITH_MOD_DECIMATE
|
||||
static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
return derivedData;
|
||||
}
|
||||
|
@ -238,8 +238,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = get_cddm(ob, NULL, derivedData, vertexCos);
|
||||
|
||||
|
@ -103,8 +103,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *dm,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DynamicPaintModifierData *pmd = (DynamicPaintModifierData *) md;
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -991,8 +991,7 @@ static ParticleSystemModifierData *findPrecedingParticlesystem(Object *ob, Modif
|
||||
}
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
ExplodeModifierData *emd = (ExplodeModifierData *) md;
|
||||
|
@ -78,8 +78,7 @@ static void copyData(ModifierData *md, ModifierData *target)
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *dm,
|
||||
int useRenderParams,
|
||||
int isFinalCalc)
|
||||
ModifierApplyFlag flag)
|
||||
{
|
||||
FluidsimModifierData *fluidmd = (FluidsimModifierData *) md;
|
||||
DerivedMesh *result = NULL;
|
||||
@ -93,7 +92,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
}
|
||||
}
|
||||
|
||||
result = fluidsimModifier_do(fluidmd, md->scene, ob, dm, useRenderParams, isFinalCalc);
|
||||
result = fluidsimModifier_do(fluidmd, md->scene, ob, dm, flag & MOD_APPLY_RENDER, flag & MOD_APPLY_USECACHE);
|
||||
|
||||
return result ? result : dm;
|
||||
}
|
||||
|
@ -246,7 +246,7 @@ static void deformVerts_do(HookModifierData *hmd, Object *ob, DerivedMesh *dm,
|
||||
|
||||
static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3], int numVerts,
|
||||
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
HookModifierData *hmd = (HookModifierData *) md;
|
||||
DerivedMesh *dm = derivedData;
|
||||
|
@ -110,8 +110,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
LatticeModifierData *lmd = (LatticeModifierData *) md;
|
||||
|
||||
@ -130,7 +129,7 @@ static void deformVertsEM(
|
||||
|
||||
if (!derivedData) dm = CDDM_from_BMEditMesh(editData, ob->data, FALSE, FALSE);
|
||||
|
||||
deformVerts(md, ob, dm, vertexCos, numVerts, 0, 0);
|
||||
deformVerts(md, ob, dm, vertexCos, numVerts, 0);
|
||||
|
||||
if (!derivedData) dm->release(dm);
|
||||
}
|
||||
|
@ -94,8 +94,7 @@ static void updateDepgraph(ModifierData *md, DagForest *forest,
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
MaskModifierData *mmd = (MaskModifierData *)md;
|
||||
DerivedMesh *dm = derivedData, *result = NULL;
|
||||
|
@ -341,8 +341,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, 0);
|
||||
|
||||
|
@ -322,8 +322,7 @@ static DerivedMesh *mirrorModifier__doMirror(MirrorModifierData *mmd,
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *result;
|
||||
MirrorModifierData *mmd = (MirrorModifierData *) md;
|
||||
@ -340,7 +339,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -71,11 +71,12 @@ static void copyData(ModifierData *md, ModifierData *target)
|
||||
}
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
|
||||
int useRenderParams, int isFinalCalc)
|
||||
ModifierApplyFlag flag)
|
||||
{
|
||||
MultiresModifierData *mmd = (MultiresModifierData *)md;
|
||||
DerivedMesh *result;
|
||||
Mesh *me = (Mesh *)ob->data;
|
||||
const int useRenderParams = flag & MOD_APPLY_RENDER;
|
||||
|
||||
if (mmd->totlvl) {
|
||||
if (!CustomData_get_layer(&me->ldata, CD_MDISPS)) {
|
||||
@ -89,7 +90,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *dm,
|
||||
if (result == dm)
|
||||
return dm;
|
||||
|
||||
if (useRenderParams || !isFinalCalc) {
|
||||
if(useRenderParams || !(flag & MOD_APPLY_USECACHE)) {
|
||||
DerivedMesh *cddm;
|
||||
|
||||
cddm = CDDM_copy(result);
|
||||
|
@ -536,8 +536,7 @@ static DerivedMesh *doOcean(ModifierData *md, Object *UNUSED(ob),
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *result;
|
||||
|
||||
@ -553,7 +552,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,8 +107,7 @@ static void foreachObjectLink(ModifierData *md, Object *ob,
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = derivedData, *result;
|
||||
ParticleInstanceModifierData *pimd = (ParticleInstanceModifierData *) md;
|
||||
@ -330,7 +329,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -124,8 +124,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int UNUSED(numVerts),
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
ParticleSystemModifierData *psmd = (ParticleSystemModifierData *) md;
|
||||
|
@ -147,8 +147,7 @@ static void dualcon_add_quad(void *output_v, const int vert_indices[4])
|
||||
static DerivedMesh *applyModifier(ModifierData *md,
|
||||
Object *UNUSED(ob),
|
||||
DerivedMesh *dm,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
RemeshModifierData *rmd;
|
||||
DualConOutput *output;
|
||||
@ -200,8 +199,7 @@ static DerivedMesh *applyModifier(ModifierData *md,
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *UNUSED(md), Object *UNUSED(ob),
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
return derivedData;
|
||||
}
|
||||
|
@ -134,12 +134,12 @@ static void copyData(ModifierData *md, ModifierData *target)
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int useRenderParams,
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag flag)
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
DerivedMesh *result;
|
||||
ScrewModifierData *ltmd = (ScrewModifierData *) md;
|
||||
const int useRenderParams = flag & MOD_APPLY_RENDER;
|
||||
|
||||
int *origindex;
|
||||
int mpoly_index = 0;
|
||||
@ -940,7 +940,7 @@ static DerivedMesh *applyModifierEM(
|
||||
struct BMEditMesh *UNUSED(editData),
|
||||
DerivedMesh *derivedData)
|
||||
{
|
||||
return applyModifier(md, ob, derivedData, 0, 1);
|
||||
return applyModifier(md, ob, derivedData, MOD_APPLY_USECACHE);
|
||||
}
|
||||
|
||||
static int dependsOnTime(ModifierData *UNUSED(md))
|
||||
|
@ -52,8 +52,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *UNUSED(derivedData),
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
KeyBlock *kb = ob_get_keyblock(ob);
|
||||
float (*deformedVerts)[3];
|
||||
@ -86,7 +85,7 @@ static void deformMatrices(ModifierData *md, Object *ob, DerivedMesh *derivedDat
|
||||
copy_m3_m3(defMats[a], scale);
|
||||
}
|
||||
|
||||
deformVerts(md, ob, derivedData, vertexCos, numVerts, 0, 0);
|
||||
deformVerts(md, ob, derivedData, vertexCos, numVerts, 0);
|
||||
}
|
||||
|
||||
static void deformVertsEM(ModifierData *md, Object *ob,
|
||||
@ -98,7 +97,7 @@ static void deformVertsEM(ModifierData *md, Object *ob,
|
||||
Key *key = ob_get_key(ob);
|
||||
|
||||
if (key && key->type == KEY_RELATIVE)
|
||||
deformVerts(md, ob, derivedData, vertexCos, numVerts, 0, 0);
|
||||
deformVerts(md, ob, derivedData, vertexCos, numVerts, 0);
|
||||
}
|
||||
|
||||
static void deformMatricesEM(ModifierData *UNUSED(md), Object *ob,
|
||||
|
@ -114,8 +114,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
CustomDataMask dataMask = requiredDataMask(ob, md);
|
||||
|
@ -307,8 +307,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
CustomDataMask dataMask = requiredDataMask(ob, md);
|
||||
|
@ -85,8 +85,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int UNUSED(numVerts),
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
SmokeModifierData *smd = (SmokeModifierData *) md;
|
||||
DerivedMesh *dm = get_cddm(ob, NULL, derivedData, vertexCos);
|
||||
|
@ -212,9 +212,8 @@ static void smoothModifier_do(
|
||||
MEM_freeN(uctmp);
|
||||
}
|
||||
|
||||
static void deformVerts(
|
||||
ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3], int numVerts, ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = get_dm(ob, NULL, derivedData, NULL, 0);
|
||||
|
||||
|
@ -48,8 +48,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *UNUSED(derivedData),
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
sbObjectStep(md->scene, ob, (float)md->scene->r.cfra, vertexCos, numVerts);
|
||||
}
|
||||
|
@ -204,8 +204,7 @@ static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *dm,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
int i;
|
||||
DerivedMesh *result;
|
||||
@ -753,7 +752,7 @@ static DerivedMesh *applyModifierEM(ModifierData *md,
|
||||
struct BMEditMesh *UNUSED(editData),
|
||||
DerivedMesh *derivedData)
|
||||
{
|
||||
return applyModifier(md, ob, derivedData, 0, 1);
|
||||
return applyModifier(md, ob, derivedData, MOD_APPLY_USECACHE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -91,14 +91,15 @@ static int isDisabled(ModifierData *md, int useRenderParams)
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int useRenderParams,
|
||||
int isFinalCalc)
|
||||
ModifierApplyFlag flag)
|
||||
{
|
||||
SubsurfModifierData *smd = (SubsurfModifierData *) md;
|
||||
DerivedMesh *result;
|
||||
const int useRenderParams = flag & MOD_APPLY_RENDER;
|
||||
const int isFinalCalc = flag & MOD_APPLY_USECACHE;
|
||||
|
||||
result = subsurf_make_derived_from_derived(derivedData, smd,
|
||||
useRenderParams, NULL, isFinalCalc, 0, (ob->flag & OB_MODE_EDIT));
|
||||
result = subsurf_make_derived_from_derived(derivedData, smd, useRenderParams, NULL,
|
||||
isFinalCalc, 0, (ob->flag & OB_MODE_EDIT));
|
||||
|
||||
if (useRenderParams || !isFinalCalc) {
|
||||
DerivedMesh *cddm = CDDM_copy(result);
|
||||
|
@ -89,8 +89,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int UNUSED(numVerts),
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
SurfaceModifierData *surmd = (SurfaceModifierData *) md;
|
||||
|
||||
|
@ -390,8 +390,7 @@ static DerivedMesh *uvprojectModifier_do(UVProjectModifierData *umd,
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *result;
|
||||
UVProjectModifierData *umd = (UVProjectModifierData *) md;
|
||||
@ -405,7 +404,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -317,7 +317,7 @@ static int warp_needs_dm(WarpModifierData *wmd)
|
||||
}
|
||||
|
||||
static void deformVerts(ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3], int numVerts, int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
float (*vertexCos)[3], int numVerts, ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = NULL;
|
||||
int use_dm = warp_needs_dm((WarpModifierData *)md);
|
||||
@ -344,7 +344,7 @@ static void deformVertsEM(ModifierData *md, Object *ob, struct BMEditMesh *editD
|
||||
dm = CDDM_from_BMEditMesh(editData, ob->data, FALSE, FALSE);
|
||||
}
|
||||
|
||||
deformVerts(md, ob, dm, vertexCos, numVerts, 0, 0);
|
||||
deformVerts(md, ob, dm, vertexCos, numVerts, 0);
|
||||
|
||||
if (use_dm) {
|
||||
if (!derivedData) dm->release(dm);
|
||||
|
@ -327,8 +327,7 @@ static void deformVerts(ModifierData *md, Object *ob,
|
||||
DerivedMesh *derivedData,
|
||||
float (*vertexCos)[3],
|
||||
int numVerts,
|
||||
int UNUSED(useRenderParams),
|
||||
int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
DerivedMesh *dm = derivedData;
|
||||
WaveModifierData *wmd = (WaveModifierData *)md;
|
||||
|
@ -176,7 +176,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
|
||||
}
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
WeightVGEditModifierData *wmd = (WeightVGEditModifierData *) md;
|
||||
DerivedMesh *dm = derivedData;
|
||||
@ -271,7 +271,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -218,7 +218,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
|
||||
}
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
WeightVGMixModifierData *wmd = (WeightVGMixModifierData *) md;
|
||||
DerivedMesh *dm = derivedData;
|
||||
@ -402,7 +402,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);
|
||||
}
|
||||
|
||||
|
||||
|
@ -338,7 +338,7 @@ static int isDisabled(ModifierData *md, int UNUSED(useRenderParams))
|
||||
}
|
||||
|
||||
static DerivedMesh *applyModifier(ModifierData *md, Object *ob, DerivedMesh *derivedData,
|
||||
int UNUSED(useRenderParams), int UNUSED(isFinalCalc))
|
||||
ModifierApplyFlag UNUSED(flag))
|
||||
{
|
||||
WeightVGProximityModifierData *wmd = (WeightVGProximityModifierData *) md;
|
||||
DerivedMesh *dm = derivedData;
|
||||
@ -537,7 +537,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);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user