Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_info/info_stats.cc
| Show First 20 Lines • Show All 90 Lines • ▼ Show 20 Lines | if (me_eval == nullptr) { | ||||
| return false; | return false; | ||||
| } | } | ||||
| int totvert, totedge, totface, totloop; | int totvert, totedge, totface, totloop; | ||||
| if (me_eval->runtime.subdiv_ccg != nullptr) { | if (me_eval->runtime.subdiv_ccg != nullptr) { | ||||
| const SubdivCCG *subdiv_ccg = me_eval->runtime.subdiv_ccg; | const SubdivCCG *subdiv_ccg = me_eval->runtime.subdiv_ccg; | ||||
| BKE_subdiv_ccg_topology_counters(subdiv_ccg, &totvert, &totedge, &totface, &totloop); | BKE_subdiv_ccg_topology_counters(subdiv_ccg, &totvert, &totedge, &totface, &totloop); | ||||
| } | } | ||||
| else if (me_eval->runtime.subsurf_resolution != 0) { | |||||
| totvert = me_eval->runtime.subsurf_totvert; | |||||
| totedge = me_eval->runtime.subsurf_totedge; | |||||
| totface = me_eval->runtime.subsurf_totpoly; | |||||
| totloop = me_eval->runtime.subsurf_totloop; | |||||
| } | |||||
| else { | else { | ||||
| totvert = me_eval->totvert; | totvert = me_eval->totvert; | ||||
| totedge = me_eval->totedge; | totedge = me_eval->totedge; | ||||
| totface = me_eval->totpoly; | totface = me_eval->totpoly; | ||||
| totloop = me_eval->totloop; | totloop = me_eval->totloop; | ||||
| } | } | ||||
| stats->totvert += totvert; | stats->totvert += totvert; | ||||
| Show All 26 Lines | static void stats_object(Object *ob, | ||||
| stats->totobj++; | stats->totobj++; | ||||
| if (is_selected) { | if (is_selected) { | ||||
| stats->totobjsel++; | stats->totobjsel++; | ||||
| } | } | ||||
| switch (ob->type) { | switch (ob->type) { | ||||
| case OB_MESH: { | case OB_MESH: { | ||||
| /* we assume evaluated mesh is already built, this strictly does stats now. */ | /* we assume evaluated mesh is already built, this strictly does stats now. */ | ||||
| const Mesh *me_eval = BKE_object_get_evaluated_mesh(ob); | const Mesh *me_eval = BKE_object_get_evaluated_mesh_no_subsurf(ob); | ||||
| if (!BLI_gset_add(objects_gset, (void *)me_eval)) { | if (!BLI_gset_add(objects_gset, (void *)me_eval)) { | ||||
| break; | break; | ||||
| } | } | ||||
| stats_mesheval(me_eval, is_selected, stats); | stats_mesheval(me_eval, is_selected, stats); | ||||
| break; | break; | ||||
| } | } | ||||
| case OB_LAMP: | case OB_LAMP: | ||||
| stats->totlamp++; | stats->totlamp++; | ||||
| ▲ Show 20 Lines • Show All 676 Lines • Show Last 20 Lines | |||||