diff options
author | Campbell Barton <ideasman42@gmail.com> | 2007-04-14 17:18:24 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2007-04-14 17:18:24 +0400 |
commit | 0a0cf54a27dded2ec23a3ff7b1af9ff3426bfbcf (patch) | |
tree | af93660b6f2135b63015f1845920c0657e1cea7b /source/blender/src/editface.c | |
parent | 0a411c47049378906d1a4c3df4d6b6cb9f87ca9e (diff) |
update to center view.
- Dont do anything if no verts or faces are selected (used to zoom into 0,0,0)
- use the centers of dupli objects (should eventually use their bound boxes), much nicer when dealing with many dupli-objects
Diffstat (limited to 'source/blender/src/editface.c')
-rw-r--r-- | source/blender/src/editface.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/source/blender/src/editface.c b/source/blender/src/editface.c index db4d50dccbb..1617f6f68ca 100644 --- a/source/blender/src/editface.c +++ b/source/blender/src/editface.c @@ -911,20 +911,20 @@ void mirror_uv_tface() object_uvs_changed(OBACT); } -void minmax_tface(float *min, float *max) +int minmax_tface(float *min, float *max) { Object *ob; Mesh *me; MFace *mf; MTFace *tf; MVert *mv; - int a; + int a, ok=0; float vec[3], bmat[3][3]; ob = OBACT; - if (ob==0) return; + if (ob==0) return ok; me= get_mesh(ob); - if(me==0 || me->mtface==0) return; + if(me==0 || me->mtface==0) return ok; Mat3CpyMat4(bmat, ob->obmat); @@ -956,7 +956,9 @@ void minmax_tface(float *min, float *max) VecAddf(vec, vec, ob->obmat[3]); DO_MINMAX(vec, min, max); } + ok= 1; } + return ok; } #define ME_SEAM_DONE ME_SEAM_LAST /* reuse this flag */ |