Fix a bunch of missing expand calls in object/particle physics area, was breaking linking of those.
Initial report/patch by Alexander Gavrilov (@angavrilov), found more on the road. Nice demo of why we should use libquery ID looper in read code too - but that's for another day (also because read code needs to take care of some deprecated pointers sometimes)...
This commit is contained in:
parent
ceb03a4d32
commit
8e00406261
|
@ -8850,6 +8850,37 @@ static void expand_particlesettings(FileData *fd, Main *mainvar, ParticleSetting
|
|||
expand_doit(fd, mainvar, part->mtex[a]->object);
|
||||
}
|
||||
}
|
||||
|
||||
if (part->effector_weights) {
|
||||
expand_doit(fd, mainvar, part->effector_weights->group);
|
||||
}
|
||||
|
||||
if (part->pd) {
|
||||
expand_doit(fd, mainvar, part->pd->tex);
|
||||
expand_doit(fd, mainvar, part->pd->f_source);
|
||||
}
|
||||
if (part->pd2) {
|
||||
expand_doit(fd, mainvar, part->pd2->tex);
|
||||
expand_doit(fd, mainvar, part->pd2->f_source);
|
||||
}
|
||||
|
||||
if (part->boids) {
|
||||
BoidState *state;
|
||||
BoidRule *rule;
|
||||
|
||||
for (state = part->boids->states.first; state; state = state->next) {
|
||||
for (rule = state->rules.first; rule; rule = rule->next) {
|
||||
if (rule->type == eBoidRuleType_Avoid) {
|
||||
BoidRuleGoalAvoid *gabr = (BoidRuleGoalAvoid *)rule;
|
||||
expand_doit(fd, mainvar, gabr->ob);
|
||||
}
|
||||
else if (rule->type == eBoidRuleType_FollowLeader) {
|
||||
BoidRuleFollowLeader *flbr = (BoidRuleFollowLeader *)rule;
|
||||
expand_doit(fd, mainvar, flbr->ob);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void expand_group(FileData *fd, Main *mainvar, Group *group)
|
||||
|
@ -9213,7 +9244,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
|
|||
|
||||
for (psys = ob->particlesystem.first; psys; psys = psys->next)
|
||||
expand_doit(fd, mainvar, psys->part);
|
||||
|
||||
|
||||
for (sens = ob->sensors.first; sens; sens = sens->next) {
|
||||
if (sens->type == SENS_MESSAGE) {
|
||||
bMessageSensor *ms = sens->data;
|
||||
|
@ -9292,8 +9323,16 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
|
|||
}
|
||||
}
|
||||
|
||||
if (ob->pd && ob->pd->tex)
|
||||
if (ob->pd) {
|
||||
expand_doit(fd, mainvar, ob->pd->tex);
|
||||
expand_doit(fd, mainvar, ob->pd->f_source);
|
||||
}
|
||||
|
||||
if (ob->soft) {
|
||||
if (ob->soft->effector_weights) {
|
||||
expand_doit(fd, mainvar, ob->soft->effector_weights->group);
|
||||
}
|
||||
}
|
||||
|
||||
if (ob->rigidbody_constraint) {
|
||||
expand_doit(fd, mainvar, ob->rigidbody_constraint->ob1);
|
||||
|
|
Loading…
Reference in New Issue