diff options
author | Janne Karhu <jhkarh@gmail.com> | 2011-02-13 00:54:50 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2011-02-13 00:54:50 +0300 |
commit | 54b2127fadd53ccabeeee6b7bc75a10495643255 (patch) | |
tree | c997d5a824d68e6a8c403ceb5f3b762cb4c3b5ea /source/blender/blenkernel | |
parent | 0a83817672a6ec908eb5f4dd85a48ffa6e97736c (diff) |
Fix for [#25857] create_dupli_list incorrect behaviour with particle systems
* Particle duplis are now always created with render percentage if G.rendering is set.
* This is not yet a perfect solution (hair for example won't yet work correctly), but
it's good to have even partial functionality here until a proper way to handle this
is implemented.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/anim.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c index ab1da04e683..2c52e0b0c49 100644 --- a/source/blender/blenkernel/intern/anim.c +++ b/source/blender/blenkernel/intern/anim.c @@ -1173,6 +1173,8 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p int a, b, counter, hair = 0; int totpart, totchild, totgroup=0, pa_num; + int no_draw_flag = PARS_UNEXIST; + if(psys==0) return; /* simple preventing of too deep nested groups */ @@ -1185,6 +1187,9 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p if(!psys_check_enabled(par, psys)) return; + + if(G.rendering == 0) + no_draw_flag |= PARS_NO_DISP; ctime = bsystem_time(scene, par, (float)scene->r.cfra, 0.0); @@ -1280,7 +1285,7 @@ static void new_particle_duplilist(ListBase *lb, ID *id, Scene *scene, Object *p for(pa=psys->particles,counter=0; a<totpart+totchild; a++,pa++,counter++) { if(a<totpart) { /* handle parent particle */ - if(pa->flag & (PARS_UNEXIST+PARS_NO_DISP)) + if(pa->flag & no_draw_flag) continue; pa_num = pa->num; |