[Bf-blender-cvs] [0c63463] blender-v2.76-release: Cycles: Correction to point density with particle source and world mapping
Sergey Sharybin
noreply at git.blender.org
Fri Oct 9 13:32:19 CEST 2015
Commit: 0c6346379f1452009fa0cce0c191f7cb21480264
Author: Sergey Sharybin
Date: Thu Oct 1 19:34:37 2015 +0500
Branches: blender-v2.76-release
https://developer.blender.org/rB0c6346379f1452009fa0cce0c191f7cb21480264
Cycles: Correction to point density with particle source and world mapping
===================================================================
M intern/cycles/blender/blender_texture.cpp
===================================================================
diff --git a/intern/cycles/blender/blender_texture.cpp b/intern/cycles/blender/blender_texture.cpp
index cb4dd17..a1e1c82 100644
--- a/intern/cycles/blender/blender_texture.cpp
+++ b/intern/cycles/blender/blender_texture.cpp
@@ -68,10 +68,12 @@ static void density_particle_system_texture_space(
float3 particle_size = make_float3(radius, radius, radius);
for(int i = 0; i < b_particle_system.particles.length(); ++i) {
BL::Particle particle = b_particle_system.particles[i];
- float3 location = get_float3(particle.location());
- location = transform_point(&itfm, location);
- min = ccl::min(min, location - particle_size);
- max = ccl::max(max, location + particle_size);
+ if (particle.alive_state() == BL::Particle::alive_state_ALIVE) {
+ float3 location = get_float3(particle.location());
+ location = transform_point(&itfm, location);
+ min = ccl::min(min, location - particle_size);
+ max = ccl::max(max, location + particle_size);
+ }
}
/* Calculate texture space from the particle bounds. */
loc = (min + max) * 0.5f;
More information about the Bf-blender-cvs
mailing list