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
diff options
context:
space:
mode:
authorLukas Tönne <lukas.toenne@gmail.com>2015-03-20 12:39:40 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-03-20 12:39:40 +0300
commit5950b4832896e4cf59b25de10e7b9e301e9ed65f (patch)
tree98dc47e9e8264bae1c1c6e3850af89ffb7a7a757 /source/blender/editors
parent229befd147a9e06202b24c1fd3e7ec8a0da59cc8 (diff)
Use the temporary 'is_dupli' flag to prevent objects from freeing
overriden data that is owned by the cache. This is not at all nice ... Hopefully it doesn't get too complicated to work around all these drawing code and depsgraph issues, so the code can be understood and replaced at some point in the future.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index ff664c880be..a303001e802 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7612,7 +7612,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, const short
/* code for new particle system */
if ((ob->particlesystem.first) &&
(ob != scene->obedit) &&
- !(base->flag & OB_FROMCACHE))
+ !(ob->transflag & OB_IS_DUPLI_CACHE))
{
ParticleSystem *psys;
diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c
index 4dccf5a1aa5..0b92b41dbee 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2094,11 +2094,11 @@ static void draw_dupli_objects_color(
/* override final DM */
bb_tmp = NULL;
- tbase.flag &= ~OB_FROMCACHE;
+ tbase.object->transflag &= ~OB_IS_DUPLI_CACHE;
if (base->object->dup_cache) {
DupliObjectData *dob_data = BKE_dupli_cache_find_data(base->object->dup_cache, tbase.object);
if (dob_data->cache_dm) {
- tbase.flag |= OB_FROMCACHE;
+ tbase.object->transflag |= OB_IS_DUPLI_CACHE;
tbase.object->derivedFinal = dob_data->cache_dm;
bb_tmp = &dob_data->bb;
@@ -2178,6 +2178,7 @@ static void draw_dupli_objects_color(
tbase.object->currentlod = savedlod;
/* restore final DM */
+ tbase.object->transflag &= ~OB_IS_DUPLI_CACHE;
tbase.object->derivedFinal = store_final_dm;
}