diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-03-18 18:17:15 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-03-18 18:17:15 +0300 |
commit | 878d09e65bc88a087ccc21fa8b43f76767334330 (patch) | |
tree | b0ae94fc38d515677b6660379e46868f95806a06 /source/blender/editors | |
parent | 238f3ac972ae1a5b3eca2178d564cd3a070b852f (diff) |
Skip drawing of particle systems (including hair) when using cache
duplis.
Particle systems can not be overridden from caches easily, there are too
many strings attached to the data and code to make this reliable.
Instead, a new simplified data structure for reading hair from caches
will be added, which replaces drawing and rendering of particle data.
The original particle data is not updated through duplis, so is usually
out of sync and should not be displayed.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 3 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_draw.c | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 61c9891e201..ff664c880be 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -7611,7 +7611,8 @@ 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)) + (ob != scene->obedit) && + !(base->flag & OB_FROMCACHE)) { ParticleSystem *psys; diff --git a/source/blender/editors/space_view3d/view3d_draw.c b/source/blender/editors/space_view3d/view3d_draw.c index 297e5861b16..a6d6cefb265 100644 --- a/source/blender/editors/space_view3d/view3d_draw.c +++ b/source/blender/editors/space_view3d/view3d_draw.c @@ -2041,7 +2041,7 @@ static void draw_dupli_objects_color( UI_GetThemeColorBlend3ubv(color, TH_BACK, 0.5f, color_rgb); } - tbase.flag = OB_FROMDUPLI | base->flag; + tbase.flag |= OB_FROMDUPLI; lb = object_duplilist(G.main->eval_ctx, scene, base->object); // BLI_listbase_sort(lb, dupli_ob_sort); /* might be nice to have if we have a dupli list with mixed objects. */ @@ -2099,6 +2099,8 @@ static void draw_dupli_objects_color( 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->derivedFinal = dob_data->cache_dm; tbase.object->bb = bb_tmp = &dob_data->bb; } |