[Bf-blender-cvs] [b33c55d] gooseberry: Fix for invalid cache index -1 in some cases, like virtual parents.
Lukas Tönne
noreply at git.blender.org
Fri Jan 23 17:11:46 CET 2015
Commit: b33c55ddee26910d9c930e5cd0a585fa0f1b53f0
Author: Lukas Tönne
Date: Fri Jan 23 17:10:15 2015 +0100
Branches: gooseberry
https://developer.blender.org/rBb33c55ddee26910d9c930e5cd0a585fa0f1b53f0
Fix for invalid cache index -1 in some cases, like virtual parents.
The code was assuming that child 0 is always valid, but in fact has to
be treated like all others that can be disable due to preview percentage,
virtual parents, etc.
===================================================================
M source/blender/editors/space_view3d/drawobject.c
===================================================================
diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c
index 1a83f53..4b9587f 100644
--- a/source/blender/editors/space_view3d/drawobject.c
+++ b/source/blender/editors/space_view3d/drawobject.c
@@ -4682,7 +4682,7 @@ static void draw_particle_hair_hull(Scene *UNUSED(scene), View3D *v3d, RegionVie
glShadeModel(GL_SMOOTH);
glBegin(GL_QUADS);
- pstart = 0;
+ pstart = particle_path_next(cache, totchild, -1);
while (pstart < totchild) {
int p = pstart;
int np = particle_path_next(cache, totchild, p);
@@ -4700,7 +4700,7 @@ static void draw_particle_hair_hull(Scene *UNUSED(scene), View3D *v3d, RegionVie
glEnd();
glBegin(GL_TRIANGLES);
- pstart = 0;
+ pstart = particle_path_next(cache, totchild, -1);
while (pstart < totchild) {
int groupend;
{
More information about the Bf-blender-cvs
mailing list