remove modifiers_indexInObject(), just call BLI_findindex directly.
This commit is contained in:
@@ -358,8 +358,6 @@ int modifiers_isCorrectableDeformed(struct Object *ob);
|
||||
void modifier_freeTemporaryData(struct ModifierData *md);
|
||||
int modifiers_isPreview(struct Object *ob);
|
||||
|
||||
int modifiers_indexInObject(struct Object *ob, struct ModifierData *md);
|
||||
|
||||
typedef struct CDMaskLink {
|
||||
struct CDMaskLink *next;
|
||||
CustomDataMask mask;
|
||||
|
||||
@@ -1421,7 +1421,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
}
|
||||
|
||||
/* grab modifiers until index i */
|
||||
if ((index >= 0) && (modifiers_indexInObject(ob, md) >= index))
|
||||
if ((index >= 0) && (BLI_findindex(&ob->modifiers, md) >= index))
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1666,7 +1666,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
|
||||
isPrevDeform = (mti->type == eModifierTypeType_OnlyDeform);
|
||||
|
||||
/* grab modifiers until index i */
|
||||
if ((index >= 0) && (modifiers_indexInObject(ob, md) >= index))
|
||||
if ((index >= 0) && (BLI_findindex(&ob->modifiers, md) >= index))
|
||||
break;
|
||||
|
||||
if (sculpt_mode && md->type == eModifierType_Multires)
|
||||
|
||||
@@ -621,11 +621,6 @@ int modifiers_isPreview(Object *ob)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int modifiers_indexInObject(Object *ob, ModifierData *md_seek)
|
||||
{
|
||||
return BLI_findindex(&ob->modifiers, md_seek);
|
||||
}
|
||||
|
||||
void modifier_freeTemporaryData(ModifierData *md)
|
||||
{
|
||||
if (md->type == eModifierType_Armature) {
|
||||
|
||||
@@ -267,7 +267,7 @@ static void set_vertex_channel(float *channel, float time, struct Scene *scene,
|
||||
FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
|
||||
float *verts;
|
||||
int *tris=NULL, numVerts=0, numTris=0;
|
||||
int modifierIndex = modifiers_indexInObject(ob, (ModifierData *)fluidmd);
|
||||
int modifierIndex = BLI_findindex(&ob->modifiers, fluidmd);
|
||||
int framesize = (3*fobj->numVerts) + 1;
|
||||
int j;
|
||||
|
||||
@@ -388,7 +388,7 @@ static void fluid_init_all_channels(bContext *C, Object *UNUSED(fsDomain), Fluid
|
||||
|
||||
if (fluid_is_animated_mesh(fluidmd->fss)) {
|
||||
float *verts=NULL;
|
||||
int *tris=NULL, modifierIndex = modifiers_indexInObject(ob, (ModifierData *)fluidmd);
|
||||
int *tris=NULL, modifierIndex = BLI_findindex(&ob->modifiers, (ModifierData *)fluidmd);
|
||||
|
||||
initElbeemMesh(scene, ob, &fobj->numVerts, &verts, &fobj->numTris, &tris, 0, modifierIndex);
|
||||
fobj->VertexCache = MEM_callocN(length *((fobj->numVerts*CHANNEL_VEC)+1) * sizeof(float), "fluidobject VertexCache");
|
||||
@@ -491,7 +491,7 @@ static void export_fluid_objects(ListBase *fobjects, Scene *scene, int length)
|
||||
for (fobj=fobjects->first; fobj; fobj=fobj->next) {
|
||||
Object *ob = fobj->object;
|
||||
FluidsimModifierData *fluidmd = (FluidsimModifierData *)modifiers_findByType(ob, eModifierType_Fluidsim);
|
||||
int modifierIndex = modifiers_indexInObject(ob, (ModifierData *)fluidmd);
|
||||
int modifierIndex = BLI_findindex(&ob->modifiers, fluidmd);
|
||||
|
||||
float *verts=NULL;
|
||||
int *tris=NULL;
|
||||
|
||||
Reference in New Issue
Block a user