Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2009-09-13 00:47:53 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2009-09-13 00:47:53 +0400
commit26942cd78936d9f160478aff3d6df11514c9d50d (patch)
treeb8d1a6b3eb4179ce04867d8ac13a6b8f1321385e /source
parent5ac5988448b89ecfdff955499743169c4e8a369e (diff)
Pointcache:
* Flagging object caches as outdated and use PTCACHE_RESET_OUTDATED as reset event
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/object/object_edit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c
index aaf6ed387c7..e5a8df8cb26 100644
--- a/source/blender/editors/object/object_edit.c
+++ b/source/blender/editors/object/object_edit.c
@@ -334,10 +334,20 @@ void ED_object_exit_editmode(bContext *C, int flag)
/* freedata only 0 now on file saves */
if(freedata) {
+ ListBase pidlist;
+ PTCacheID *pid;
+
/* for example; displist make is different in editmode */
scene->obedit= NULL; // XXX for context
+
+ /* flag object caches as outdated */
+ BKE_ptcache_ids_from_object(&pidlist, obedit);
+ for(pid=pidlist.first; pid; pid=pid->next) {
+ if(pid->type != PTCACHE_TYPE_PARTICLES) /* particles don't need reset on geometry change */
+ pid->cache->flag |= PTCACHE_OUTDATED;
+ }
- BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_DEPSGRAPH);
+ BKE_ptcache_object_reset(scene, obedit, PTCACHE_RESET_OUTDATED);
/* also flush ob recalc, doesn't take much overhead, but used for particles */
DAG_id_flush_update(&obedit->id, OB_RECALC_OB|OB_RECALC_DATA);