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 Toenne <lukas.toenne@googlemail.com>2012-08-10 14:15:45 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2012-08-10 14:15:45 +0400
commitd33a0effbaa42f577c8474b7d07a6deef75e0e7a (patch)
tree49b32b6aa80cfd891ed91546eacf945fb960f371 /intern/cycles/blender/blender_particles.cpp
parenta1dd6ea83616b2ed1b78d1a6c48761d94018e714 (diff)
Fix for particle object rendering in Cycles. On object sync the object first has to determine if a particle update is needed (which depends on dupli objects and their meshes), before deciding to skip the actual syncing.
Diffstat (limited to 'intern/cycles/blender/blender_particles.cpp')
-rw-r--r--intern/cycles/blender/blender_particles.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/blender/blender_particles.cpp b/intern/cycles/blender/blender_particles.cpp
index d669aa34a68..e32c80a51b5 100644
--- a/intern/cycles/blender/blender_particles.cpp
+++ b/intern/cycles/blender/blender_particles.cpp
@@ -31,7 +31,7 @@ CCL_NAMESPACE_BEGIN
/* Particles Sync */
-bool BlenderSync::object_use_particles(BL::Object b_ob)
+bool BlenderSync::object_need_particle_update(BL::Object b_ob)
{
/* Particle data is only needed for
* a) Billboard render mode if object's own material uses particle info
@@ -39,7 +39,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
*
* Note: Meshes have to be synced at this point!
*/
- bool use_particles = false;
+ bool need_update = false;
BL::Object::particle_systems_iterator b_psys;
for (b_ob.particle_systems.begin(b_psys); b_psys != b_ob.particle_systems.end(); ++b_psys) {
@@ -54,7 +54,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
BL::ID key = (BKE_object_is_modified(b_ob))? b_ob: b_ob.data();
Mesh *mesh = mesh_map.find(key);
if (mesh) {
- use_particles |= mesh->need_attribute(scene, ATTR_STD_PARTICLE);
+ need_update |= mesh->need_attribute(scene, ATTR_STD_PARTICLE) && mesh->need_update;
}
break;
}
@@ -66,7 +66,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
BL::ID key = (BKE_object_is_modified(b_dupli_ob))? b_dupli_ob: b_dupli_ob.data();
Mesh *mesh = mesh_map.find(key);
if (mesh) {
- use_particles |= mesh->need_attribute(scene, ATTR_STD_PARTICLE);
+ need_update |= mesh->need_attribute(scene, ATTR_STD_PARTICLE) && mesh->need_update;
}
}
break;
@@ -80,7 +80,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
BL::ID key = (BKE_object_is_modified(*b_gob))? *b_gob: b_gob->data();
Mesh *mesh = mesh_map.find(key);
if (mesh) {
- use_particles |= mesh->need_attribute(scene, ATTR_STD_PARTICLE);
+ need_update |= mesh->need_attribute(scene, ATTR_STD_PARTICLE) && mesh->need_update;
}
}
}
@@ -93,7 +93,7 @@ bool BlenderSync::object_use_particles(BL::Object b_ob)
}
}
- return use_particles;
+ return need_update;
}
static bool use_particle_system(BL::ParticleSystem b_psys)