Blender
V3.3
|
#include <cstdio>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_armature_types.h"
#include "DNA_collection_types.h"
#include "DNA_curve_types.h"
#include "DNA_gpencil_types.h"
#include "DNA_lattice_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meta_types.h"
#include "DNA_scene_types.h"
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"
#include "BLF_api.h"
#include "BLI_listbase.h"
#include "BLI_math.h"
#include "BLI_string.h"
#include "BLI_utildefines.h"
#include "BLT_translation.h"
#include "BKE_action.h"
#include "BKE_armature.h"
#include "BKE_blender_version.h"
#include "BKE_context.h"
#include "BKE_curve.h"
#include "BKE_displist.h"
#include "BKE_editmesh.h"
#include "BKE_gpencil.h"
#include "BKE_key.h"
#include "BKE_layer.h"
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_paint.h"
#include "BKE_particle.h"
#include "BKE_pbvh.h"
#include "BKE_scene.h"
#include "BKE_subdiv_ccg.h"
#include "BKE_subdiv_modifier.h"
#include "DEG_depsgraph_query.h"
#include "ED_info.h"
#include "WM_api.h"
#include "UI_resources.h"
#include "GPU_capabilities.h"
Go to the source code of this file.
Classes | |
struct | SceneStats |
struct | SceneStatsFmt |
Macros | |
#define | MAX_INFO_NUM_LEN 16 |
#define | SCENE_STATS_FMT_INT(_id) BLI_str_format_uint64_grouped(stats_fmt->_id, stats->_id) |
Functions | |
static bool | stats_mesheval (const Mesh *me_eval, bool is_selected, SceneStats *stats) |
static void | stats_object (Object *ob, const View3D *v3d_local, SceneStats *stats, GSet *objects_gset) |
static void | stats_object_edit (Object *obedit, SceneStats *stats) |
static void | stats_object_pose (const Object *ob, SceneStats *stats) |
static bool | stats_is_object_dynamic_topology_sculpt (const Object *ob) |
static void | stats_object_sculpt (const Object *ob, SceneStats *stats) |
static void | stats_update (Depsgraph *depsgraph, ViewLayer *view_layer, View3D *v3d_local, SceneStats *stats) |
void | ED_info_stats_clear (wmWindowManager *wm, ViewLayer *view_layer) |
static bool | format_stats (Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d_local, SceneStatsFmt *stats_fmt) |
static void | get_stats_string (char *info, int len, size_t *ofs, ViewLayer *view_layer, SceneStatsFmt *stats_fmt) |
const char * | ED_info_statusbar_string_ex (Main *bmain, Scene *scene, ViewLayer *view_layer, const char statusbar_flag) |
const char * | ED_info_statusbar_string (Main *bmain, Scene *scene, ViewLayer *view_layer) |
const char * | ED_info_statistics_string (Main *bmain, Scene *scene, ViewLayer *view_layer) |
static void | stats_row (int col1, const char *key, int col2, const char *value1, const char *value2, int *y, int height) |
void | ED_info_draw_stats (Main *bmain, Scene *scene, ViewLayer *view_layer, View3D *v3d_local, int x, int *y, int height) |
#define MAX_INFO_NUM_LEN 16 |
Definition at line 63 of file info_stats.cc.
#define SCENE_STATS_FMT_INT | ( | _id | ) | BLI_str_format_uint64_grouped(stats_fmt->_id, stats->_id) |
void ED_info_draw_stats | ( | struct Main * | bmain, |
struct Scene * | scene, | ||
struct ViewLayer * | view_layer, | ||
struct View3D * | v3d_local, | ||
int | x, | ||
int * | y, | ||
int | height | ||
) |
v3d_local | Pass this argument to calculate view-port local statistics. Note that this must only be used for local-view, otherwise report specific statistics will be written into the global scene statistics giving incorrect results. |
Definition at line 721 of file info_stats.cc.
References BLF_disable(), BLF_enable(), BLF_set_default(), BLF_shadow(), BLF_SHADOW, BLF_shadow_offset(), BLF_width(), BLI_assert, format_stats(), height, IFACE_, View3D::localvd, max_ii(), Object::mode, OB_ARMATURE, OB_GPENCIL, OB_LAMP, OB_MESH, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OBACT, OBEDIT_FROM_OBACT, scene, stats_is_object_dynamic_topology_sculpt(), stats_row(), STRNCPY, TH_TEXT_HI, SceneStatsFmt::totbone, SceneStatsFmt::totbonesel, SceneStatsFmt::totedge, SceneStatsFmt::totedgesel, SceneStatsFmt::totface, SceneStatsFmt::totfacesculpt, SceneStatsFmt::totfacesel, SceneStatsFmt::totgpframe, SceneStatsFmt::totgplayer, SceneStatsFmt::totgppoint, SceneStatsFmt::totgpstroke, SceneStatsFmt::totlamp, SceneStatsFmt::totlampsel, SceneStatsFmt::totobj, SceneStatsFmt::totobjsel, SceneStatsFmt::tottri, SceneStatsFmt::totvert, SceneStatsFmt::totvertsculpt, SceneStatsFmt::totvertsel, Object::type, UI_FontThemeColor(), x, and y.
Referenced by view3d_draw_region_info().
Definition at line 697 of file info_stats.cc.
References ED_info_statusbar_string_ex(), scene, STATUSBAR_SHOW_MEMORY, STATUSBAR_SHOW_STATS, and STATUSBAR_SHOW_VERSION.
void ED_info_stats_clear | ( | wmWindowManager * | wm, |
ViewLayer * | view_layer | ||
) |
Definition at line 462 of file info_stats.cc.
References blender::compositor::area(), bScreen::areabase, if(), LISTBASE_FOREACH, View3D_Runtime::local_stats, View3D::localvd, MEM_SAFE_FREE, View3D::runtime, SPACE_VIEW3D, ViewLayer::stats, wmWindowManager::windows, WM_window_get_active_screen(), and WM_window_get_active_view_layer().
Referenced by wm_event_do_notifiers().
Definition at line 692 of file info_stats.cc.
References ED_info_statusbar_string_ex(), and scene.
Referenced by uiTemplateStatusInfo().
const char* ED_info_statusbar_string_ex | ( | Main * | bmain, |
Scene * | scene, | ||
ViewLayer * | view_layer, | ||
const char | statusbar_flag | ||
) |
Definition at line 629 of file info_stats.cc.
References BKE_blender_version_string(), BLI_snprintf_rlen(), BLI_str_format_byte_unit(), format_stats(), get_stats_string(), GPU_mem_stats_get(), GPU_mem_stats_supported(), len, MEM_get_memory_in_use, mem_in_use, scene, STATUSBAR_SHOW_MEMORY, STATUSBAR_SHOW_STATS, STATUSBAR_SHOW_VERSION, STATUSBAR_SHOW_VRAM, and TIP_.
Referenced by ED_info_statistics_string(), ED_info_statusbar_string(), and uiTemplateStatusInfo().
|
static |
Definition at line 483 of file info_stats.cc.
References BKE_scene_ensure_depsgraph(), depsgraph, ListBase::first, if(), wmWindowManager::is_interface_locked, View3D_Runtime::local_stats, MEM_mallocN, View3D::runtime, scene, SCENE_STATS_FMT_INT, ViewLayer::stats, stats_update(), and Main::wm.
Referenced by ED_info_draw_stats(), and ED_info_statusbar_string_ex().
|
static |
Definition at line 535 of file info_stats.cc.
References ViewLayer::active_collection, BKE_collection_ui_name_get(), BKE_keyblock_from_object(), BLI_snprintf_rlen(), BLI_strncpy_rlen(), Object::id, if(), len, Object::mode, ID::name, OB_ARMATURE, OB_GPENCIL, OB_MESH, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OBACT, OBEDIT_FROM_OBACT, stats_is_object_dynamic_topology_sculpt(), TIP_, SceneStatsFmt::totbone, SceneStatsFmt::totbonesel, SceneStatsFmt::totedge, SceneStatsFmt::totedgesel, SceneStatsFmt::totface, SceneStatsFmt::totfacesculpt, SceneStatsFmt::totfacesel, SceneStatsFmt::totgpframe, SceneStatsFmt::totgplayer, SceneStatsFmt::totgppoint, SceneStatsFmt::totgpstroke, SceneStatsFmt::totobj, SceneStatsFmt::totobjsel, SceneStatsFmt::tottri, SceneStatsFmt::totvert, SceneStatsFmt::totvertsculpt, SceneStatsFmt::totvertsel, and Object::type.
Referenced by ED_info_statusbar_string_ex().
Definition at line 359 of file info_stats.cc.
References BLI_assert, SculptSession::bm, Object::mode, OB_MODE_SCULPT, and Object::sculpt.
Referenced by ED_info_draw_stats(), get_stats_string(), and stats_update().
|
static |
Definition at line 89 of file info_stats.cc.
References BKE_subdiv_ccg_topology_counters(), poly_to_tri_count(), SubsurfRuntimeData::resolution, Mesh::runtime, SubsurfRuntimeData::stats_totedge, SubsurfRuntimeData::stats_totloop, SubsurfRuntimeData::stats_totpoly, SubsurfRuntimeData::stats_totvert, Mesh_Runtime::subdiv_ccg, Mesh_Runtime::subsurf_runtime_data, SceneStats::totedge, Mesh::totedge, SceneStats::totface, SceneStats::totfacesel, Mesh::totloop, Mesh::totpoly, SceneStats::tottri, SceneStats::totvert, Mesh::totvert, and SceneStats::totvertsel.
Referenced by stats_object().
|
static |
Definition at line 128 of file info_stats.cc.
References ATTR_FALLTHROUGH, Object::base_flag, BASE_SELECTED, BASE_VISIBLE_VIEWLAYER, BKE_displist_count(), BKE_gpencil_stats_update(), BKE_object_get_evaluated_mesh(), BKE_object_get_evaluated_mesh_no_subsurf(), BKE_object_is_visible_in_viewport(), BLI_gset_add(), Object_Runtime::curve_cache, Object::data, CurveCache::disp, ListBase::first, if(), OB_CURVES, OB_CURVES_LEGACY, OB_FONT, OB_GPENCIL, OB_LAMP, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, OB_VOLUME, Object::runtime, stats_mesheval(), SceneStats::totface, SceneStats::totfacesel, bGPdata::totframe, SceneStats::totgpframe, SceneStats::totgplayer, SceneStats::totgppoint, SceneStats::totgpstroke, SceneStats::totlamp, SceneStats::totlampsel, bGPdata::totlayer, SceneStats::totobj, SceneStats::totobjsel, bGPdata::totpoint, bGPdata::totstroke, SceneStats::tottri, SceneStats::totvert, SceneStats::totvertsel, and Object::type.
Referenced by stats_update().
|
static |
Definition at line 226 of file info_stats.cc.
References Freestyle::a, BKE_curve_editNurbs_get(), BKE_editmesh_from_object(), BMEditMesh::bm, BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, CU_BEZIER, Object::data, Lattice::def, bArmature::edbo, MetaBall::editelems, Lattice::editlatt, ELEM, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, EditLatt::latt, LISTBASE_FOREACH, OB_ARMATURE, OB_CURVES_LEGACY, OB_LATTICE, OB_MBALL, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, SELECT, SceneStats::totbone, SceneStats::totbonesel, BMesh::totedge, SceneStats::totedge, BMesh::totedgesel, SceneStats::totedgesel, BMesh::totface, SceneStats::totface, BMesh::totfacesel, SceneStats::totfacesel, BMEditMesh::tottri, SceneStats::tottri, BMesh::totvert, SceneStats::totvert, BMesh::totvertsel, SceneStats::totvertsel, and Object::type.
Referenced by stats_update().
|
static |
Definition at line 343 of file info_stats.cc.
References BKE_pose_is_layer_visible(), BONE_SELECTED, bPose::chanbase, Object::data, LISTBASE_FOREACH, Object::pose, SceneStats::totbone, and SceneStats::totbonesel.
Referenced by stats_update().
|
static |
Definition at line 365 of file info_stats.cc.
References BKE_pbvh_get_grid_num_faces(), BKE_pbvh_get_grid_num_vertices(), BKE_pbvh_type(), SculptSession::bm, SculptSession::pbvh, PBVH_BMESH, PBVH_FACES, PBVH_GRIDS, Object::sculpt, BMesh::totface, SculptSession::totfaces, SceneStats::totfacesculpt, SceneStats::tottri, SculptSession::totvert, BMesh::totvert, and SceneStats::totvertsculpt.
Referenced by stats_update().
|
static |
Definition at line 706 of file info_stats.cc.
References BLF_draw_default(), BLI_snprintf(), height, and y.
Referenced by ED_info_draw_stats().
|
static |
Definition at line 391 of file info_stats.cc.
References BASE_VISIBLE_VIEWLAYER, BKE_object_is_visible_in_viewport(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_gset_free(), BLI_gset_new(), DEG_OBJECT_ITER_FOR_RENDER_ENGINE_BEGIN, DEG_OBJECT_ITER_FOR_RENDER_ENGINE_END, depsgraph, FOREACH_OBJECT_BEGIN, FOREACH_OBJECT_END, Object::mode, OB_MODE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OBACT, OBEDIT_FROM_VIEW_LAYER, stats_is_object_dynamic_topology_sculpt(), stats_object(), stats_object_edit(), stats_object_pose(), stats_object_sculpt(), SceneStats::totobj, and SceneStats::totobjsel.
Referenced by format_stats().