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:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-12-18 16:19:55 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-12-18 16:22:12 +0300
commit6ccf9619153ea412c7a8c320a3d59d9ec50600c8 (patch)
tree7d4f8f7afb2bd8f7be01fd7f7f6e123dc9727772 /source/blender/editors/space_info
parenteb78579bb65820b7eab2049d614a9ad70d1c8d07 (diff)
Fix T59478: Information Bar Missing Data when in Sculpt Mode
Display statistics from CCG structure. This makes values to be different from what is shown in object mode, since CCG is operating on individual grids, and object mode will stitch those grids. But on another, those values from CCG is what sculpt mode is actually "sees" or "uses". The number of faces should be the same in both sculpt and object modes.
Diffstat (limited to 'source/blender/editors/space_info')
-rw-r--r--source/blender/editors/space_info/info_stats.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c
index b027d6c3df0..de406ccdc59 100644
--- a/source/blender/editors/space_info/info_stats.c
+++ b/source/blender/editors/space_info/info_stats.c
@@ -58,6 +58,7 @@
#include "BKE_object.h"
#include "BKE_gpencil.h"
#include "BKE_scene.h"
+#include "BKE_subdiv_ccg.h"
#include "DEG_depsgraph_query.h"
@@ -102,10 +103,17 @@ static bool stats_mesheval(Mesh *me_eval, int sel, int totob, SceneStats *stats)
}
int totvert, totedge, totface, totloop;
- totvert = me_eval->totvert;
- totedge = me_eval->totedge;
- totface = me_eval->totpoly;
- totloop = me_eval->totloop;
+ if (me_eval->runtime.subdiv_ccg != NULL) {
+ const SubdivCCG *subdiv_ccg = me_eval->runtime.subdiv_ccg;
+ BKE_subdiv_ccg_topology_counters(
+ subdiv_ccg, &totvert, &totedge, &totface, &totloop);
+ }
+ else {
+ totvert = me_eval->totvert;
+ totedge = me_eval->totedge;
+ totface = me_eval->totpoly;
+ totloop = me_eval->totloop;
+ }
stats->totvert += totvert * totob;
stats->totedge += totedge * totob;