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>2007-12-06 00:50:23 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2007-12-06 00:50:23 +0300
commit26b8892c9c6733e2716df4aa84d02e3ff5331735 (patch)
tree0d552b20e3678176c5b0a6a804d33b3c6de4be80 /source/blender/src
parentb0c01a414b0915ae73a704e4c676ab985be82a04 (diff)
Bugfix for mysteriously disappearing left eyeball. Bounding boxes
used for clipping were being stored in the mesh, but modifiers can result in two objects with the same mesh having a different bounding box. Solution is to store bounding box in the object.
Diffstat (limited to 'source/blender/src')
-rw-r--r--source/blender/src/drawobject.c5
-rw-r--r--source/blender/src/drawview.c2
-rw-r--r--source/blender/src/meshtools.c2
3 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c
index c91c335c004..a73c4e71a3d 100644
--- a/source/blender/src/drawobject.c
+++ b/source/blender/src/drawobject.c
@@ -2430,8 +2430,7 @@ static int draw_mesh_object(Base *base, int dt, int flag)
}
else {
/* don't create boundbox here with mesh_get_bb(), the derived system will make it, puts deformed bb's OK */
-
- if(me->totface<=4 || boundbox_clip(ob->obmat, me->bb)) {
+ if(me->totface<=4 || boundbox_clip(ob->obmat, (ob->bb)? ob->bb: me->bb)) {
if(dt==OB_SOLID) has_alpha= init_gl_materials(ob, (base->flag & OB_FROMDUPLI)==0);
draw_mesh_fancy(base, dt, flag);
@@ -4481,7 +4480,7 @@ static void draw_bounding_volume(Object *ob)
BoundBox *bb=0;
if(ob->type==OB_MESH) {
- bb= mesh_get_bb(ob->data);
+ bb= mesh_get_bb(ob);
}
else if ELEM3(ob->type, OB_CURVE, OB_SURF, OB_FONT) {
bb= ( (Curve *)ob->data )->bb;
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index bd2fc642676..df33c7a597e 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -3306,7 +3306,7 @@ static int cached_dynamics(int sfra, int efra)
Object *ob;
ModifierData *md;
ParticleSystem *psys;
- int i, stack_index, cached=1;
+ int i, stack_index=-1, cached=1;
while(base && cached) {
ob = base->object;
diff --git a/source/blender/src/meshtools.c b/source/blender/src/meshtools.c
index 2b5ec2006c1..6dc01217b82 100644
--- a/source/blender/src/meshtools.c
+++ b/source/blender/src/meshtools.c
@@ -741,7 +741,7 @@ long mesh_octree_table(Object *ob, float *co, char mode)
}
else if(mode=='s') { /* start table */
Mesh *me= ob->data;
- BoundBox *bb = mesh_get_bb(me);
+ BoundBox *bb = mesh_get_bb(ob);
/* for quick unit coordinate calculus */
VECCOPY(offs, bb->vec[0]);