Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_info/info_stats.cc
| Show All 40 Lines | |||||
| #include "BKE_layer.h" | #include "BKE_layer.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_object.h" | #include "BKE_object.h" | ||||
| #include "BKE_paint.h" | #include "BKE_paint.h" | ||||
| #include "BKE_particle.h" | #include "BKE_particle.h" | ||||
| #include "BKE_pbvh.h" | #include "BKE_pbvh.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_subdiv_ccg.h" | #include "BKE_subdiv_ccg.h" | ||||
| #include "BKE_subdiv_modifier.h" | |||||
| #include "DEG_depsgraph_query.h" | #include "DEG_depsgraph_query.h" | ||||
| #include "ED_info.h" | #include "ED_info.h" | ||||
| #include "WM_api.h" | #include "WM_api.h" | ||||
| #include "UI_resources.h" | #include "UI_resources.h" | ||||
| Show All 30 Lines | |||||
| static bool stats_mesheval(const Mesh *me_eval, bool is_selected, SceneStats *stats) | static bool stats_mesheval(const Mesh *me_eval, bool is_selected, SceneStats *stats) | ||||
| { | { | ||||
| if (me_eval == nullptr) { | 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) { | |||||
| const SubdivCCG *subdiv_ccg = me_eval->runtime.subdiv_ccg; | const SubdivCCG *subdiv_ccg = me_eval->runtime.subdiv_ccg; | ||||
| const SubsurfRuntimeData *subsurf_runtime_data = me_eval->runtime.subsurf_runtime_data; | |||||
| if (subdiv_ccg != nullptr) { | |||||
| 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) { | else if (subsurf_runtime_data && subsurf_runtime_data->resolution != 0) { | ||||
| totvert = me_eval->runtime.subsurf_totvert; | totvert = subsurf_runtime_data->stats_totvert; | ||||
| totedge = me_eval->runtime.subsurf_totedge; | totedge = subsurf_runtime_data->stats_totedge; | ||||
| totface = me_eval->runtime.subsurf_totpoly; | totface = subsurf_runtime_data->stats_totpoly; | ||||
| totloop = me_eval->runtime.subsurf_totloop; | totloop = subsurf_runtime_data->stats_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; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 720 Lines • Show Last 20 Lines | |||||