forked from bartvdbraak/blender
add foreachIDLink function for cloth, remove cloth specific newlibadr calls in readfile.
This commit is contained in:
parent
43ec34f054
commit
e7e1bc4ca1
@ -3847,16 +3847,6 @@ static void lib_link_object(FileData *fd, Main *main)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
|
||||||
ClothModifierData *clmd = (ClothModifierData *)modifiers_findByType(ob, eModifierType_Cloth);
|
|
||||||
|
|
||||||
if(clmd)
|
|
||||||
{
|
|
||||||
clmd->sim_parms->effector_weights->group = newlibadr(fd, ob->id.lib, clmd->sim_parms->effector_weights->group);
|
|
||||||
clmd->coll_parms->group= newlibadr(fd, ob->id.lib, clmd->coll_parms->group);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* texture field */
|
/* texture field */
|
||||||
if(ob->pd)
|
if(ob->pd)
|
||||||
lib_link_partdeflect(fd, &ob->id, ob->pd);
|
lib_link_partdeflect(fd, &ob->id, ob->pd);
|
||||||
|
@ -190,6 +190,19 @@ static void freeData(ModifierData *md)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void foreachIDLink(ModifierData *md, Object *ob,
|
||||||
|
IDWalkFunc walk, void *userData)
|
||||||
|
{
|
||||||
|
ClothModifierData *clmd = (ClothModifierData*) md;
|
||||||
|
|
||||||
|
if(clmd->coll_parms) {
|
||||||
|
walk(userData, ob, (ID **)&clmd->coll_parms->group);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(clmd->sim_parms && clmd->sim_parms->effector_weights) {
|
||||||
|
walk(userData, ob, (ID **)&clmd->sim_parms->effector_weights->group);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ModifierTypeInfo modifierType_Cloth = {
|
ModifierTypeInfo modifierType_Cloth = {
|
||||||
/* name */ "Cloth",
|
/* name */ "Cloth",
|
||||||
@ -215,5 +228,5 @@ ModifierTypeInfo modifierType_Cloth = {
|
|||||||
/* dependsOnTime */ dependsOnTime,
|
/* dependsOnTime */ dependsOnTime,
|
||||||
/* dependsOnNormals */ NULL,
|
/* dependsOnNormals */ NULL,
|
||||||
/* foreachObjectLink */ NULL,
|
/* foreachObjectLink */ NULL,
|
||||||
/* foreachIDLink */ NULL,
|
/* foreachIDLink */ foreachIDLink,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user