diff options
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/drawobject.c | 22 |
2 files changed, 15 insertions, 9 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 6ec744ad027..541b0cf494f 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -160,7 +160,7 @@ void PE_free_ptcache_edit(PTCacheEdit *edit) edit->emitter_field= 0; } - psys_free_path_cache(NULL, edit); + psys_free_path_cache(edit->psys, edit); MEM_freeN(edit); } diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 89a82e51cd8..d3b70f4553a 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -3466,12 +3466,11 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv select=1; } + psys_update_children(&sim); + psys->flag|=PSYS_DRAWING; - if(part->type==PART_HAIR && !psys->childcache) - totchild=0; - else - totchild=psys->totchild*part->disp/100; + totchild=psys->totchild*part->disp/100; ma= give_current_material(ob,part->omat); @@ -3506,11 +3505,18 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv totpart=psys->totpart; - //if(part->flag&PART_GLOB_TIME) cfra=bsystem_time(scene, 0, (float)CFRA, 0.0f); - if(draw_as==PART_DRAW_PATH && psys->pathcache==NULL && psys->childcache==NULL) - draw_as=PART_DRAW_DOT; + if(draw_as==PART_DRAW_PATH) { + if(psys->pathcache==NULL && psys->childcache==NULL) + psys_update_path_cache(&sim, cfra); + + /* can't create pathcache for some reason*/ + if(psys->pathcache==NULL && psys->childcache==NULL) + draw_as=PART_DRAW_DOT; + else if(psys->childcache==NULL) + totchild = 0; + } /* 3. */ switch(draw_as){ @@ -3862,7 +3868,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv UI_ThemeColor(TH_WIRE); }*/ - if(totchild && (part->draw&PART_DRAW_PARENT)==0) + if(totchild && ((part->draw&PART_DRAW_PARENT)==0 || psys_in_edit_mode(scene, psys))) totpart=0; else if(psys->pathcache==NULL) totpart=0; |