}
}
+static void expand_particlesettings(FileData *fd, Main *mainvar, ParticleSettings *part)
+{
+ expand_doit(fd, mainvar, part->dup_ob);
+ expand_doit(fd, mainvar, part->dup_group);
+ expand_doit(fd, mainvar, part->eff_group);
+ expand_doit(fd, mainvar, part->bb_ob);
+}
+
static void expand_ipo(FileData *fd, Main *mainvar, Ipo *ipo)
{
IpoCurve *icu;
case ID_IP:
expand_ipo(fd, mainvar, (Ipo *)id);
break;
+ case ID_PA:
+ expand_particlesettings(fd, mainvar, (ParticleSettings *)id);
}
doit= 1;
Group *group;
GroupObject *go;
ParticleSystem *psys;
+ DerivedMesh *dm;
if(level >= MAX_DUPLI_RECUR)
return;
if(ob->transflag & OB_DUPLIPARTS) {
- for(psys=ob->particlesystem.first; psys; psys=psys->next)
- if(enable)
- psys_render_set(ob, psys, re->viewmat, re->winmat, re->winx, re->winy);
- else
- psys_render_restore(ob, psys);
+ for(psys=ob->particlesystem.first; psys; psys=psys->next) {
+ if(ELEM(psys->part->draw_as, PART_DRAW_OB, PART_DRAW_GR)) {
+ if(enable)
+ psys_render_set(ob, psys, re->viewmat, re->winmat, re->winx, re->winy);
+ else
+ psys_render_restore(ob, psys);
+ }
+ }
+
+ if(level == 0 && enable) {
+ /* this is to make sure we get render level duplis in groups:
+ * the derivedmesh must be created before init_render_mesh,
+ * since object_duplilist does dupliparticles before that */
+ dm = mesh_create_derived_render(ob, CD_MASK_BAREMESH|CD_MASK_MTFACE|CD_MASK_MCOL);
+ dm->release(dm);
+
+ for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated;
+ }
}
if(ob->dup_group==NULL) return;
for(SETLOOPER(re->scene, base)) {
ob= base->object;
-
+
/* if the object has been restricted from rendering in the outliner, ignore it */
if(ob->restrictflag & OB_RESTRICT_RENDER) continue;
if(obd->restrictflag & OB_RESTRICT_RENDER)
continue;
-
+
if(obd->type==OB_MBALL)
continue;