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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-02-06 16:47:02 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-02-06 16:51:02 +0300
commit66521b382b33168dc661f53b20a3cde7933eecf6 (patch)
tree2871774e35834b313b6e5fdd6070a62bfe11c3e9 /source/blender
parentf9f64ca4a3170fda239ac27542046942cce23876 (diff)
Depsgraph: Correction to previous particle fix
The reason it appeared working was due to left-over debug code to force time dependency. Real fix seems to include force tagging objects used by duplication, similar to what we do for some other modifiers already.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc1
-rw-r--r--source/blender/render/intern/source/pipeline.c24
2 files changed, 24 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index c30d3fecdd5..553442e3ca5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -193,7 +193,6 @@ static bool particle_system_depends_on_time(ParticleSystem *psys)
static bool object_particles_depends_on_time(Object *object)
{
- return true;
BLI_LISTBASE_FOREACH (ParticleSystem *, psys, &object->particlesystem) {
if (particle_system_depends_on_time(psys)) {
return true;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index f1dce4d0cfb..6ed2534f152 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -37,9 +37,11 @@
#include <errno.h>
#include "DNA_anim_types.h"
+#include "DNA_group_types.h"
#include "DNA_image_types.h"
#include "DNA_node_types.h"
#include "DNA_object_types.h"
+#include "DNA_particle_types.h"
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
#include "DNA_userdef_types.h"
@@ -2088,6 +2090,28 @@ static void tag_dependend_objects_for_render(Scene *scene, int renderlay)
DAG_id_tag_update(&smd->target->id, OB_RECALC_DATA);
}
}
+ else if (md->type == eModifierType_ParticleSystem) {
+ ParticleSystemModifierData *psmd = (ParticleSystemModifierData *)md;
+ ParticleSystem *psys = psmd->psys;
+ ParticleSettings *part = psys->part;
+ switch (part->ren_as) {
+ case PART_DRAW_OB:
+ if (part->dup_ob != NULL) {
+ DAG_id_tag_update(&part->dup_ob->id, OB_RECALC_DATA);
+ }
+ break;
+ case PART_DRAW_GR:
+ if (part->dup_group != NULL) {
+ for (GroupObject *go = part->dup_group->gobject.first;
+ go != NULL;
+ go = go->next)
+ {
+ DAG_id_tag_update(&go->ob->id, OB_RECALC_DATA);
+ }
+ }
+ break;
+ }
+ }
}
}
}