Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/particle.c
| Show First 20 Lines • Show All 3,285 Lines • ▼ Show 20 Lines | void psys_cache_edit_paths(Depsgraph *depsgraph, | ||||
| ParticleSystem *psys = edit->psys; | ParticleSystem *psys = edit->psys; | ||||
| ParticleData *pa = psys ? psys->particles : NULL; | ParticleData *pa = psys ? psys->particles : NULL; | ||||
| int segments = 1 << pset->draw_step; | int segments = 1 << pset->draw_step; | ||||
| int totpart = edit->totpoint, recalc_set = 0; | int totpart = edit->totpoint, recalc_set = 0; | ||||
| if (edit->psmd_eval == NULL) { | |||||
| return; | |||||
| } | |||||
| segments = MAX2(segments, 4); | segments = MAX2(segments, 4); | ||||
| if (!cache || edit->totpoint != edit->totcached) { | if (!cache || edit->totpoint != edit->totcached) { | ||||
| /* Clear out old and create new empty path cache. */ | /* Clear out old and create new empty path cache. */ | ||||
| psys_free_path_cache(edit->psys, edit); | psys_free_path_cache(edit->psys, edit); | ||||
| cache = edit->pathcache = psys_alloc_path_cache_buffers( | cache = edit->pathcache = psys_alloc_path_cache_buffers( | ||||
| &edit->pathcachebufs, totpart, segments + 1); | &edit->pathcachebufs, totpart, segments + 1); | ||||
| /* Set flag for update (child particles check this too). */ | /* Set flag for update (child particles check this too). */ | ||||
| ▲ Show 20 Lines • Show All 1,621 Lines • Show Last 20 Lines | |||||