diff options
author | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-10-29 05:09:12 +0400 |
---|---|---|
committer | Tamito Kajiyama <rd6t-kjym@asahi-net.or.jp> | 2012-10-29 05:09:12 +0400 |
commit | 15ed8343437c6b304de72cd14591455da1d5b3ec (patch) | |
tree | cbe40f76668f5e8539744c4d2f8aeaa0ded72f52 /source/blender/blenkernel/intern/object.c | |
parent | 5acd5d14970c829c2873623716a67beeb6da5278 (diff) | |
parent | dd106b5c7a129e00bebe121c4da8cb90a16d48cb (diff) |
Merged changes in the trunk up to revision 51718.
Conflicts resolved:
source/blender/blenloader/intern/readfile.c
source/blender/makesrna/intern/rna_scene.c
release/datafiles/startup.blend
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 32 |
1 files changed, 6 insertions, 26 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index ff778a4b71b..549d4e2d126 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -302,11 +302,11 @@ void BKE_object_free(Object *ob) BKE_object_free_display(ob); - /* disconnect specific data */ + /* disconnect specific data, but not for lib data (might be indirect data, can get relinked) */ if (ob->data) { ID *id = ob->data; id->us--; - if (id->us == 0) { + if (id->us == 0 && id->lib==NULL) { switch (ob->type) { case OB_MESH: BKE_mesh_unlink((Mesh *)id); @@ -456,7 +456,7 @@ void BKE_object_unlink(Object *ob) if (pchan->custom == ob) pchan->custom = NULL; } - } + } else if (ELEM(OB_MBALL, ob->type, obt->type)) { if (BKE_mball_is_basis_for(obt, ob)) obt->recalc |= OB_RECALC_DATA; @@ -2581,9 +2581,7 @@ void BKE_object_handle_update(Scene *scene, Object *ob) if (ob->recalc & OB_RECALC_DATA) { ID *data_id = (ID *)ob->data; AnimData *adt = BKE_animdata_from_id(data_id); - float ctime = (float)scene->r.cfra; // XXX this is bad... - ListBase pidlist; - PTCacheID *pid; + float ctime = (float)scene->r.cfra; /* XXX this is bad... */ if (G.debug & G_DEBUG) printf("recalcdata %s\n", ob->id.name + 2); @@ -2706,26 +2704,8 @@ void BKE_object_handle_update(Scene *scene, Object *ob) psys_get_modifier(ob, psys)->flag &= ~eParticleSystemFlag_psys_updated; } } - - /* check if quick cache is needed */ - BKE_ptcache_ids_from_object(&pidlist, ob, scene, MAX_DUPLI_RECUR); - - for (pid = pidlist.first; pid; pid = pid->next) { - if ((pid->cache->flag & PTCACHE_BAKED) || - (pid->cache->flag & PTCACHE_QUICK_CACHE) == 0) - { - continue; - } - - if (pid->cache->flag & PTCACHE_OUTDATED || (pid->cache->flag & PTCACHE_SIMULATION_VALID) == 0) { - scene->physics_settings.quick_cache_step = - scene->physics_settings.quick_cache_step ? - mini(scene->physics_settings.quick_cache_step, pid->cache->step) : - pid->cache->step; - } - } - - BLI_freelistN(&pidlist); + + /* quick cache removed */ } /* the no-group proxy case, we call update */ |