Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/object.c
| Show First 20 Lines • Show All 2,983 Lines • ▼ Show 20 Lines | #endif | ||||
| while (psys) { | while (psys) { | ||||
| /* ensure this update always happens even if psys is disabled */ | /* ensure this update always happens even if psys is disabled */ | ||||
| if (psys->recalc & PSYS_RECALC_TYPE) { | if (psys->recalc & PSYS_RECALC_TYPE) { | ||||
| psys_changed_type(ob, psys); | psys_changed_type(ob, psys); | ||||
| } | } | ||||
| if (psys_check_enabled(ob, psys)) { | if (psys_check_enabled(ob, psys)) { | ||||
| /* check use of dupli objects here */ | /* check use of dupli objects here */ | ||||
| if (psys->part && (psys->part->draw_as == PART_DRAW_REND || eval_ctx->for_render) && | if (psys->part && (psys->part->draw_as == PART_DRAW_REND || eval_ctx->mode == DAG_EVAL_RENDER) && | ||||
| ((psys->part->ren_as == PART_DRAW_OB && psys->part->dup_ob) || | ((psys->part->ren_as == PART_DRAW_OB && psys->part->dup_ob) || | ||||
| (psys->part->ren_as == PART_DRAW_GR && psys->part->dup_group))) | (psys->part->ren_as == PART_DRAW_GR && psys->part->dup_group))) | ||||
| { | { | ||||
| ob->transflag |= OB_DUPLIPARTS; | ob->transflag |= OB_DUPLIPARTS; | ||||
| } | } | ||||
| particle_system_update(scene, ob, psys); | particle_system_update(scene, ob, psys); | ||||
| psys = psys->next; | psys = psys->next; | ||||
| } | } | ||||
| else if (psys->flag & PSYS_DELETE) { | else if (psys->flag & PSYS_DELETE) { | ||||
| tpsys = psys->next; | tpsys = psys->next; | ||||
| BLI_remlink(&ob->particlesystem, psys); | BLI_remlink(&ob->particlesystem, psys); | ||||
| psys_free(ob, psys); | psys_free(ob, psys); | ||||
| psys = tpsys; | psys = tpsys; | ||||
| } | } | ||||
| else | else | ||||
| psys = psys->next; | psys = psys->next; | ||||
| } | } | ||||
| if (eval_ctx->for_render && ob->transflag & OB_DUPLIPARTS) { | if (eval_ctx->mode == DAG_EVAL_RENDER && ob->transflag & OB_DUPLIPARTS) { | ||||
| /* this is to make sure we get render level duplis in groups: | /* this is to make sure we get render level duplis in groups: | ||||
| * the derivedmesh must be created before init_render_mesh, | * the derivedmesh must be created before init_render_mesh, | ||||
| * since object_duplilist does dupliparticles before that */ | * since object_duplilist does dupliparticles before that */ | ||||
| dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH | CD_MASK_MTFACE | CD_MASK_MCOL); | dm = mesh_create_derived_render(scene, ob, CD_MASK_BAREMESH | CD_MASK_MTFACE | CD_MASK_MCOL); | ||||
| dm->release(dm); | dm->release(dm); | ||||
| for (psys = ob->particlesystem.first; psys; psys = psys->next) | for (psys = ob->particlesystem.first; psys; psys = psys->next) | ||||
| psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated; | psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated; | ||||
| ▲ Show 20 Lines • Show All 744 Lines • Show Last 20 Lines | |||||