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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-17 21:07:50 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-07-17 21:07:50 +0400
commit21cb1f82db01f9e0a69c955569cd6af4356b63e5 (patch)
tree9ce995b13521d5fb8f1ebc93379d66ae0504ceff /source/blender/editors/space_view3d/drawobject.c
parent02ef91a6195db38388b12ec9c643858ba1b5be7e (diff)
Revert part of commit 29079, cleanup of particle path drawing logic
This commit and other commits attempting to fix it broke various things. The main thing that changed was that instead of computing children/paths in advance as part of particle_system_update, this was moved to do it just before drawing or rendering. I've changed back that behavior and tried to keep the other fixes in the commit. When the new particle system was just committed, it also worked this way but gave various problems, and I had to remove that behavior to get things working stable. Basically it meant that you could get have a path cache that was outdated in various situations, and it doesn't fit well with dependency graph evaluation order. This fixes: #22823: Children Particle Rendering is broken #22733: Particle objects not displayed #22888: SigSegV when rending hair particles #22820: Another SigSegV when undo adding hairs in particel edit mode Some particle setups in dupligroups. The three bugs that the original commit fixed are now also still working in my tests: #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.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index be98e24ea9d..532b4ce0771 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -3475,11 +3475,12 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
select=1;
}
- psys_update_children(&sim);
-
psys->flag|=PSYS_DRAWING;
- totchild=psys->totchild*part->disp/100;
+ if(part->type==PART_HAIR && !psys->childcache)
+ totchild=0;
+ else
+ totchild=psys->totchild*part->disp/100;
ma= give_current_material(ob,part->omat);
@@ -3516,16 +3517,8 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv
cfra=bsystem_time(scene, 0, (float)CFRA, 0.0f);
- 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;
- }
+ if(draw_as==PART_DRAW_PATH && psys->pathcache==NULL && psys->childcache==NULL)
+ draw_as=PART_DRAW_DOT;
/* 3. */
switch(draw_as){
@@ -3877,7 +3870,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 || psys_in_edit_mode(scene, psys)))
+ if(totchild && (part->draw&PART_DRAW_PARENT)==0)
totpart=0;
else if(psys->pathcache==NULL)
totpart=0;