Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/physics/particle_edit_undo.c
| Show First 20 Lines • Show All 256 Lines • ▼ Show 20 Lines | static void particle_undosys_step_decode(struct bContext *C, | ||||
| BLI_assert(particle_undosys_poll(C)); | BLI_assert(particle_undosys_poll(C)); | ||||
| ParticleUndoStep *us = (ParticleUndoStep *)us_p; | ParticleUndoStep *us = (ParticleUndoStep *)us_p; | ||||
| Scene *scene = us->scene_ref.ptr; | Scene *scene = us->scene_ref.ptr; | ||||
| Object *ob = us->object_ref.ptr; | Object *ob = us->object_ref.ptr; | ||||
| PTCacheEdit *edit = PE_get_current(depsgraph, scene, ob); | PTCacheEdit *edit = PE_get_current(depsgraph, scene, ob); | ||||
| if (edit) { | if (edit) { | ||||
| undoptcache_to_editcache(&us->data, edit); | undoptcache_to_editcache(&us->data, edit); | ||||
| ParticleEditSettings *pset = &scene->toolsettings->particle; | |||||
| if ((pset->flag & PE_DRAW_PART) != 0) { | |||||
| psys_free_path_cache(NULL, edit); | |||||
| BKE_particle_batch_cache_dirty_tag(edit->psys, BKE_PARTICLE_BATCH_DIRTY_ALL); | |||||
| } | |||||
| DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); | ||||
| } | } | ||||
| else { | else { | ||||
| BLI_assert(0); | BLI_assert(0); | ||||
| } | } | ||||
| } | } | ||||
| static void particle_undosys_step_free(UndoStep *us_p) | static void particle_undosys_step_free(UndoStep *us_p) | ||||
| Show All 31 Lines | |||||