diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-03 16:54:50 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-09-03 16:54:50 +0300 |
commit | b899114a7ed222ad41c86f2408200838dd6e33ba (patch) | |
tree | 5685a9a60d454a99a8a2785d9dbc2795be9e7d09 /intern/cycles/blender/blender_curves.cpp | |
parent | a4bcd9bc9676edf9706dd6169c4c7f8eabf312b4 (diff) |
Fix T45937: Cycles hair not rendered if children count set to zero
Diffstat (limited to 'intern/cycles/blender/blender_curves.cpp')
-rw-r--r-- | intern/cycles/blender/blender_curves.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/intern/cycles/blender/blender_curves.cpp b/intern/cycles/blender/blender_curves.cpp index dba801fc4df..6a119081bfd 100644 --- a/intern/cycles/blender/blender_curves.cpp +++ b/intern/cycles/blender/blender_curves.cpp @@ -145,7 +145,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f); int totcurves = totchild; - if(b_part.child_type() == 0) + if(b_part.child_type() == 0 || totchild == 0) totcurves += totparts; if(totcurves == 0) @@ -169,7 +169,7 @@ bool ObtainCacheParticleData(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par CData->psys_closetip.push_back(get_boolean(cpsys, "use_closetip")); int pa_no = 0; - if(!(b_part.child_type() == 0)) + if(!(b_part.child_type() == 0) && totchild != 0) pa_no = totparts; int num_add = (totparts+totchild - pa_no); @@ -233,14 +233,14 @@ bool ObtainCacheParticleUV(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Parti int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f); int totcurves = totchild; - if(b_part.child_type() == 0) + if(b_part.child_type() == 0 || totchild == 0) totcurves += totparts; if(totcurves == 0) continue; int pa_no = 0; - if(!(b_part.child_type() == 0)) + if(!(b_part.child_type() == 0) && totchild != 0) pa_no = totparts; int num_add = (totparts+totchild - pa_no); @@ -287,14 +287,14 @@ bool ObtainCacheParticleVcol(Mesh *mesh, BL::Mesh *b_mesh, BL::Object *b_ob, Par int totchild = background ? b_psys.child_particles.length() : (int)((float)b_psys.child_particles.length() * (float)b_part.draw_percentage() / 100.0f); int totcurves = totchild; - if(b_part.child_type() == 0) + if(b_part.child_type() == 0 || totchild == 0) totcurves += totparts; if(totcurves == 0) continue; int pa_no = 0; - if(!(b_part.child_type() == 0)) + if(!(b_part.child_type() == 0) && totchild != 0) pa_no = totparts; int num_add = (totparts+totchild - pa_no); |