Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/particle.c
| Show First 20 Lines • Show All 2,910 Lines • ▼ Show 20 Lines | if ((psys->edit == NULL || pset->flag & PE_DRAW_PART) == 0) { | ||||
| return; | return; | ||||
| } | } | ||||
| } | } | ||||
| keyed = psys->flag & PSYS_KEYED; | keyed = psys->flag & PSYS_KEYED; | ||||
| baked = psys->pointcache->mem_cache.first && psys->part->type != PART_HAIR; | baked = psys->pointcache->mem_cache.first && psys->part->type != PART_HAIR; | ||||
| /* clear out old and create new empty path cache */ | /* clear out old and create new empty path cache */ | ||||
| psys_free_path_cache(psys, psys->edit); | /* another suggestion, much more general (and risky?) */ | ||||
| psys_free_path_cache(psys, psys_orig_edit_get(psys)); | |||||
sergey: You are freeing cache for an original psys, but allocating it for evaluated one?
Can't be right. | |||||
lichtwerkAuthorUnsubmitted Not Done Inline ActionsDuring DEG evaluation:
But regarding the PTCacheEdit->pathcache [ I am only looking at this atm ]:
not sure what that tells us?
Anyways:
What do you think to get this finally of the table: (a) or (b)? lichtwerk: During DEG evaluation:
- patch frees the **original** of the `PTCacheEdit->pathcache`
- code… | |||||
| cache = psys->pathcache = psys_alloc_path_cache_buffers( | cache = psys->pathcache = psys_alloc_path_cache_buffers( | ||||
| &psys->pathcachebufs, totpart, segments + 1); | &psys->pathcachebufs, totpart, segments + 1); | ||||
| psys->lattice_deform_data = psys_create_lattice_deform_data(sim); | psys->lattice_deform_data = psys_create_lattice_deform_data(sim); | ||||
| ma = give_current_material(sim->ob, psys->part->omat); | ma = give_current_material(sim->ob, psys->part->omat); | ||||
| if (ma && (psys->part->draw_col == PART_DRAW_COL_MAT)) { | if (ma && (psys->part->draw_col == PART_DRAW_COL_MAT)) { | ||||
| copy_v3_v3(col, &ma->r); | copy_v3_v3(col, &ma->r); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 2,000 Lines • Show Last 20 Lines | |||||
You are freeing cache for an original psys, but allocating it for evaluated one?
Can't be right.