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:
authorTon Roosendaal <ton@blender.org>2005-09-28 15:24:39 +0400
committerTon Roosendaal <ton@blender.org>2005-09-28 15:24:39 +0400
commit2a08be6e507e0a128ebfb940449655780fc78454 (patch)
treeedace9520e1ec20ac4178cff6cc91be6e0452df3 /source/blender/src/edit.c
parent7382a3d9d9d8d661d17f7d26e98e5eba4ee4bcae (diff)
Brought back (lost with modifier code) display of actual amount of faces
for subsurfs in info header.
Diffstat (limited to 'source/blender/src/edit.c')
-rw-r--r--source/blender/src/edit.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/blender/src/edit.c b/source/blender/src/edit.c
index 9d5ba5f3f75..7e9787a3b07 100644
--- a/source/blender/src/edit.c
+++ b/source/blender/src/edit.c
@@ -56,6 +56,7 @@
#include "DNA_lattice_types.h"
#include "DNA_meta_types.h"
#include "DNA_mesh_types.h"
+#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_screen_types.h"
#include "DNA_scene_types.h"
@@ -76,6 +77,7 @@
#include "BKE_ipo.h"
#include "BKE_lattice.h"
#include "BKE_mesh.h"
+#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_utildefines.h"
@@ -493,17 +495,25 @@ static void count_object(Object *ob, int sel, int totob)
{
Mesh *me;
Curve *cu;
- int tot=0, totf=0;
+ int tot=0, totf=0, subsurf;
switch(ob->type) {
case OB_MESH:
G.totmesh+=totob;
me= get_mesh(ob);
if(me) {
+ ModifierData *md = modifiers_findByType(ob, eModifierType_Subsurf);
int totvert, totface;
- totvert= me->totvert*totob;
- totface= me->totface*totob;
+ if (md) {
+ SubsurfModifierData *smd = (SubsurfModifierData*) md;
+
+ subsurf= 1<<(2*smd->levels);
+ }
+ else subsurf= 1;
+
+ totvert= subsurf*me->totvert*totob;
+ totface= subsurf*me->totface*totob;
G.totvert+= totvert;
G.totface+= totface;