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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-03-18 18:17:15 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-03-26 16:13:39 +0300
commitaebc98e06179647e0f45a1d12f7289534f0edfdd (patch)
treead96ecb1e7a82e14e3e252bee3f77d5a8251fb17 /source
parentcf5a4256a89c3459cb60edd3d31764292675043f (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')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c3
-rw-r--r--source/blender/editors/space_view3d/view3d_draw.c4
-rw-r--r--source/blender/makesdna/DNA_object_types.h1
3 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 808408be694..7d1a747afb5 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -7621,7 +7621,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 1002fb50934..94a562419e9 100644
--- a/source/blender/editors/space_view3d/view3d_draw.c
+++ b/source/blender/editors/space_view3d/view3d_draw.c
@@ -2048,7 +2048,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. */
@@ -2106,6 +2106,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;
}
diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h
index 6fe40b407da..cf94c5f0bab 100644
--- a/source/blender/makesdna/DNA_object_types.h
+++ b/source/blender/makesdna/DNA_object_types.h
@@ -543,6 +543,7 @@ enum {
#define OB_DONE (1 << 10) /* unknown state, clear before use */
/* #define OB_RADIO (1 << 11) */ /* deprecated */
#define OB_FROMGROUP (1 << 12)
+#define OB_FROMCACHE (1 << 13)
/* WARNING - when adding flags check on PSYS_RECALC */
/* ob->recalc (flag bits!) */