Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/particle_system.c
| Show First 20 Lines • Show All 3,747 Lines • ▼ Show 20 Lines | static void dynamics_step_sph_classical_calc_density_task_cb_ex( | ||||
| if ((pa = psys->particles + p)->state.time <= 0.0f) { | if ((pa = psys->particles + p)->state.time <= 0.0f) { | ||||
| return; | return; | ||||
| } | } | ||||
| sphclassical_calc_dens(pa, pa->state.time, sphdata); | sphclassical_calc_dens(pa, pa->state.time, sphdata); | ||||
| } | } | ||||
| static void dynamics_step_sph_classical_integrate_task_cb_ex( | static void dynamics_step_sph_classical_integrate_task_cb_ex(void *__restrict userdata, | ||||
| void *__restrict userdata, const int p, const TaskParallelTLS *__restrict tls) | const int p, | ||||
| const TaskParallelTLS *__restrict tls) | |||||
| { | { | ||||
| DynamicStepSolverTaskData *data = userdata; | DynamicStepSolverTaskData *data = userdata; | ||||
| ParticleSimulationData *sim = data->sim; | ParticleSimulationData *sim = data->sim; | ||||
| ParticleSystem *psys = sim->psys; | ParticleSystem *psys = sim->psys; | ||||
| ParticleSettings *part = psys->part; | ParticleSettings *part = psys->part; | ||||
| SPHData *sphdata = tls->userdata_chunk; | SPHData *sphdata = tls->userdata_chunk; | ||||
| ▲ Show 20 Lines • Show All 891 Lines • ▼ Show 20 Lines | case PART_HAIR: { | ||||
| part_local = particle_settings_localize(part); | part_local = particle_settings_localize(part); | ||||
| psys->part = part_local; | psys->part = part_local; | ||||
| } | } | ||||
| for (i = 0; i <= part->hair_step; i++) { | for (i = 0; i <= part->hair_step; i++) { | ||||
| hcfra = 100.0f * (float)i / (float)psys->part->hair_step; | hcfra = 100.0f * (float)i / (float)psys->part->hair_step; | ||||
| if ((part->flag & PART_HAIR_REGROW) == 0) { | if ((part->flag & PART_HAIR_REGROW) == 0) { | ||||
| BKE_animsys_evaluate_animdata( | BKE_animsys_evaluate_animdata( | ||||
| depsgraph, scene, &part_local->id, part_local->adt, hcfra, ADT_RECALC_ANIM); | scene, &part_local->id, part_local->adt, hcfra, ADT_RECALC_ANIM, false); | ||||
| } | } | ||||
| system_step(&sim, hcfra, use_render_params); | system_step(&sim, hcfra, use_render_params); | ||||
| psys->cfra = hcfra; | psys->cfra = hcfra; | ||||
| psys->recalc = 0; | psys->recalc = 0; | ||||
| save_hair(&sim, hcfra); | save_hair(&sim, hcfra); | ||||
| } | } | ||||
| if (part_local != part) { | if (part_local != part) { | ||||
| ▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines | |||||