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:
authorCampbell Barton <ideasman42@gmail.com>2007-04-14 17:18:24 +0400
committerCampbell Barton <ideasman42@gmail.com>2007-04-14 17:18:24 +0400
commit0a0cf54a27dded2ec23a3ff7b1af9ff3426bfbcf (patch)
treeaf93660b6f2135b63015f1845920c0657e1cea7b /source/blender/src/view.c
parent0a411c47049378906d1a4c3df4d6b6cb9f87ca9e (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/view.c')
-rw-r--r--source/blender/src/view.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/src/view.c b/source/blender/src/view.c
index a197b1a0a23..56166037e7f 100644
--- a/source/blender/src/view.c
+++ b/source/blender/src/view.c
@@ -1305,8 +1305,7 @@ void centerview() /* like a localview without local! */
if(G.obedit) {
- minmax_verts(min, max); // ony selected
- ok= 1;
+ ok = minmax_verts(min, max); /* only selected */
}
else if(ob && (ob->flag & OB_POSEMODE)) {
if(ob->pose) {
@@ -1330,14 +1329,16 @@ void centerview() /* like a localview without local! */
}
}
else if (G.f & G_FACESELECT) {
- minmax_tface(min, max);
- ok= 1;
+ ok= minmax_tface(min, max);
}
else {
Base *base= FIRSTBASE;
while(base) {
if TESTBASE(base) {
minmax_object(base->object, min, max);
+ /* account for duplis */
+ minmax_object_duplis(base->object, min, max);
+
ok= 1;
}
base= base->next;