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:
authorJanne Karhu <jhkarh@gmail.com>2010-05-30 18:53:26 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-05-30 18:53:26 +0400
commitf8ecc3fd2fd11a40f5cea3a23b3c83b9861762cc (patch)
tree59f4204ff356047d501e85b39404726bdfaec311 /source/blender/editors/space_view3d/drawobject.c
parent1658a28a58ebd5fe58ab33875b10aaabb3458b79 (diff)
Some cleanup of particle path drawing logic:
* Path drawing now works for non hair particles. * Should fix the following bugs too: [#21316] Hair weight drawing is wrong [#21923] Consistent Crash When Rendering Particle Scene. [#21950] Path rendering option for particles causes crash
Diffstat (limited to 'source/blender/editors/space_view3d/drawobject.c')
-rw-r--r--source/blender/editors/space_view3d/drawobject.c22
1 files changed, 14 insertions, 8 deletions
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;