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
path: root/source
diff options
context:
space:
mode:
authorThomas Dinges <blender@dingto.org>2012-04-30 22:37:34 +0400
committerThomas Dinges <blender@dingto.org>2012-04-30 22:37:34 +0400
commitdf74a51bac173b8e47882801bf0f5d47d856f897 (patch)
tree995307d292a63151e724313dd8333fc1e3bd1c22 /source
parente09a450d07e015d0b71c8fe65e5c5a79b3eab06a (diff)
Patch [#30681] Improved Display of Header Statistics by Harley Acheson (harley), thanks!
* This patch changes the header statistics to something more meaningful * Removed the blender.org string, version info is sufficient + not all Blender versions come directly from blender.org * Use names like Faces, rather than abbreviations. * Show Verts, Edges and Faces, independent of the current selection method in edit mode. * Added TriCount into the header. * Small change to the patch by myself, added a "v" in front of the version number.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/blender.c4
-rw-r--r--source/blender/editors/space_info/info_stats.c30
2 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c
index 198d644b211..2b741d6d8eb 100644
--- a/source/blender/blenkernel/intern/blender.c
+++ b/source/blender/blenkernel/intern/blender.c
@@ -129,9 +129,9 @@ void initglobals(void)
strcpy(G.ima, "//");
if (BLENDER_SUBVERSION)
- BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d.%d", BLENDER_VERSION, BLENDER_SUBVERSION);
+ BLI_snprintf(versionstr, sizeof(versionstr), "v%d.%02d.%d", BLENDER_VERSION/100, BLENDER_VERSION%100, BLENDER_SUBVERSION);
else
- BLI_snprintf(versionstr, sizeof(versionstr), "blender.org %d", BLENDER_VERSION);
+ BLI_snprintf(versionstr, sizeof(versionstr), "v%d.%02d", BLENDER_VERSION/100, BLENDER_VERSION%100);
#ifdef _WIN32 // FULLSCREEN
G.windowstate = G_WINDOWSTATE_USERDEF;
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index 2ef8f6c306c..0cc212f9c34 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -60,8 +60,9 @@ typedef struct SceneStats {
int totedge, totedgesel;
int totface, totfacesel;
int totbone, totbonesel;
- int totobj, totobjsel;
- int totmesh, totlamp, totcurve;
+ int totobj, totobjsel;
+ int totlamp, totlampsel;
+ int tottri, totmesh, totcurve;
char infostr[512];
} SceneStats;
@@ -94,6 +95,9 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
}
case OB_LAMP:
stats->totlamp += totob;
+ if (sel) {
+ stats->totlampsel += totob;
+ }
break;
case OB_SURF:
case OB_CURVE:
@@ -150,6 +154,8 @@ static void stats_object_edit(Object *obedit, SceneStats *stats)
stats->totface = em->bm->totface;
stats->totfacesel = em->bm->totfacesel;
+
+ stats->tottri = em->tottri;
}
else if (obedit->type == OB_ARMATURE) {
/* Armature Edit */
@@ -363,31 +369,25 @@ static void stats_string(Scene *scene)
s += sprintf(s, "(Key) ");
if (scene->obedit->type == OB_MESH) {
- if (scene->toolsettings->selectmode & SCE_SELECT_VERTEX)
- s += sprintf(s, "Ve:%d-%d | Ed:%d-%d | Fa:%d-%d",
- stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
- else if (scene->toolsettings->selectmode & SCE_SELECT_EDGE)
- s += sprintf(s, "Ed:%d-%d | Fa:%d-%d",
- stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface);
- else
- s += sprintf(s, "Fa:%d-%d", stats->totfacesel, stats->totface);
+ s += sprintf(s, "Verts:%d/%d | Edges:%d/%d | Faces:%d/%d | Tris:%d",
+ stats->totvertsel, stats->totvert, stats->totedgesel, stats->totedge, stats->totfacesel, stats->totface, stats->tottri);
}
else if (scene->obedit->type == OB_ARMATURE) {
- s += sprintf(s, "Ve:%d-%d | Bo:%d-%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone);
+ s += sprintf(s, "Verts:%d/%d | Bones:%d/%d", stats->totvertsel, stats->totvert, stats->totbonesel, stats->totbone);
}
else {
- s += sprintf(s, "Ve:%d-%d", stats->totvertsel, stats->totvert);
+ s += sprintf(s, "Verts:%d/%d", stats->totvertsel, stats->totvert);
}
strcat(s, memstr);
}
else if (ob && (ob->mode & OB_MODE_POSE)) {
- s += sprintf(s, "Bo:%d-%d %s",
+ s += sprintf(s, "Bones:%d/%d %s",
stats->totbonesel, stats->totbone, memstr);
}
else {
- s += sprintf(s, "Ve:%d | Fa:%d | Ob:%d-%d | La:%d%s",
- stats->totvert, stats->totface, stats->totobjsel, stats->totobj, stats->totlamp, memstr);
+ s += sprintf(s, "Verts:%d | Faces:%d | Objects:%d/%d | Lamps:%d/%d%s",
+ stats->totvert, stats->totface, stats->totobjsel, stats->totobj, stats->totlampsel, stats->totlamp, memstr);
}
if (ob)