|
Blender V4.3
|
#include <cstdio>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_armature_types.h"#include "DNA_curve_types.h"#include "DNA_gpencil_legacy_types.h"#include "DNA_grease_pencil_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.hh"#include "BLI_listbase.h"#include "BLI_math_geom.h"#include "BLI_span.hh"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_timecode.h"#include "BLI_utildefines.h"#include "BLT_translation.hh"#include "BKE_action.hh"#include "BKE_armature.hh"#include "BKE_blender_version.h"#include "BKE_curve.hh"#include "BKE_curves.hh"#include "BKE_editmesh.hh"#include "BKE_gpencil_legacy.h"#include "BKE_grease_pencil.hh"#include "BKE_key.hh"#include "BKE_layer.hh"#include "BKE_main.hh"#include "BKE_mesh.hh"#include "BKE_object.hh"#include "BKE_paint.hh"#include "BKE_pbvh_api.hh"#include "BKE_scene.hh"#include "BKE_subdiv_ccg.hh"#include "BKE_subdiv_modifier.hh"#include "DEG_depsgraph_query.hh"#include "ED_info.hh"#include "WM_api.hh"#include "UI_resources.hh"#include "GPU_capabilities.hh"Go to the source code of this file.
Classes | |
| struct | SceneStats |
| struct | SceneStatsFmt |
Macros | |
| #define | SCENE_STATS_FMT_INT(_id) BLI_str_format_uint64_grouped(stats_fmt->_id, stats->_id) |
Functions | |
| static bool | stats_mesheval (const Mesh *mesh_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, const Scene *scene, 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, const Scene *scene, 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 SCENE_STATS_FMT_INT | ( | _id | ) | BLI_str_format_uint64_grouped(stats_fmt->_id, stats->_id) |
Referenced by format_stats().
| void ED_info_draw_stats | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| 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 741 of file info_stats.cc.
References BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLF_default(), BLF_width(), BLI_assert, ELEM, format_stats(), IFACE_, View3D::localvd, max_ii(), Object::mode, OB_ARMATURE, OB_FONT, OB_GPENCIL_LEGACY, OB_GREASE_PENCIL, OB_LAMP, OB_MESH, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OBEDIT_FROM_OBACT, stats_is_object_dynamic_topology_sculpt(), stats_row(), STREQ, STRNCPY_UTF8, 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::tottrisel, SceneStatsFmt::totvert, SceneStatsFmt::totvertsculpt, SceneStatsFmt::totvertsel, Object::type, and x.
Referenced by view3d_draw_region_info().
Definition at line 716 of file info_stats.cc.
References ED_info_statusbar_string_ex(), STATUSBAR_SHOW_MEMORY, STATUSBAR_SHOW_SCENE_DURATION, STATUSBAR_SHOW_STATS, and STATUSBAR_SHOW_VERSION.
| void ED_info_stats_clear | ( | wmWindowManager * | wm, |
| ViewLayer * | view_layer ) |
Definition at line 441 of file info_stats.cc.
References 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 711 of file info_stats.cc.
References ED_info_statusbar_string_ex().
| const char * ED_info_statusbar_string_ex | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| const char | statusbar_flag ) |
Definition at line 627 of file info_stats.cc.
References BKE_blender_version_string_compact(), BLI_snprintf_rlen(), BLI_str_format_byte_unit(), BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE, BLI_timecode_string_from_time(), format_stats(), FPS, FRA2TIME, get_stats_string(), GPU_mem_stats_get(), GPU_mem_stats_supported(), IFACE_, len, MEM_get_memory_in_use, mem_in_use, STATUSBAR_SHOW_MEMORY, STATUSBAR_SHOW_SCENE_DURATION, STATUSBAR_SHOW_STATS, STATUSBAR_SHOW_VERSION, and STATUSBAR_SHOW_VRAM.
Referenced by ED_info_statistics_string(), ED_info_statusbar_string(), and uiTemplateStatusInfo().
|
static |
Definition at line 462 of file info_stats.cc.
References BKE_scene_ensure_depsgraph(), depsgraph, ListBase::first, View3D_Runtime::local_stats, MEM_mallocN, View3D::runtime, wmWindowManager::runtime, 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 515 of file info_stats.cc.
References BKE_collection_ui_name_get(), BKE_keyblock_from_object(), BKE_view_layer_active_collection_get(), BKE_view_layer_active_object_get(), BKE_view_layer_synced_ensure(), BLI_snprintf_rlen(), BLI_strncpy_rlen(), LayerCollection::collection, Object::id, IFACE_, len, Object::mode, ID::name, OB_ARMATURE, OB_GPENCIL_LEGACY, OB_MESH, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OBEDIT_FROM_OBACT, stats_is_object_dynamic_topology_sculpt(), STREQ, 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().
|
static |
Definition at line 339 of file info_stats.cc.
References BLI_assert, SculptSession::bm, Object::mode, OB_MODE_SCULPT, and Object::sculpt.
Referenced by ED_info_draw_stats(), and get_stats_string().
|
static |
Definition at line 96 of file info_stats.cc.
References BKE_subdiv_ccg_topology_counters(), Mesh::corners_num, Mesh::edges_num, Mesh::faces_num, poly_to_tri_count(), SubsurfRuntimeData::resolution, Mesh::runtime, SubsurfRuntimeData::stats_faces_num, SubsurfRuntimeData::stats_totedge, SubsurfRuntimeData::stats_totloop, SubsurfRuntimeData::stats_totvert, SceneStats::totedge, SceneStats::totedgesel, SceneStats::totface, SceneStats::totfacesel, SceneStats::tottri, SceneStats::tottrisel, SceneStats::totvert, SceneStats::totvertsel, and Mesh::verts_num.
Referenced by stats_object().
|
static |
Definition at line 138 of file info_stats.cc.
References BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT, Object::base_flag, BASE_SELECTED, BKE_object_get_evaluated_mesh_no_subsurf(), BKE_object_is_visible_in_viewport(), BLI_gset_add(), Object::data, OB_CURVES, OB_GREASE_PENCIL, OB_LAMP, OB_MESH, OB_POINTCLOUD, OB_VOLUME, stats_mesheval(), SceneStats::totgpframe, SceneStats::totgplayer, SceneStats::totgppoint, SceneStats::totgpstroke, SceneStats::totlamp, SceneStats::totlampsel, SceneStats::totobj, SceneStats::totobjsel, and Object::type.
Referenced by stats_update().
|
static |
Definition at line 205 of file info_stats.cc.
References 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, BMEditMesh::looptris, OB_ARMATURE, OB_CURVES_LEGACY, OB_LATTICE, OB_MBALL, OB_MESH, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, SELECT, blender::Array< T, InlineBufferCapacity, Allocator >::size(), SceneStats::totbone, SceneStats::totbonesel, BMesh::totedge, SceneStats::totedge, BMesh::totedgesel, SceneStats::totedgesel, BMesh::totface, SceneStats::totface, BMesh::totfacesel, SceneStats::totfacesel, SceneStats::tottri, BMesh::totvert, SceneStats::totvert, BMesh::totvertsel, SceneStats::totvertsel, and Object::type.
Referenced by stats_update().
|
static |
Definition at line 323 of file info_stats.cc.
References BKE_pose_is_bonecoll_visible(), BONE_SELECTED, bPose::chanbase, Object::data, LISTBASE_FOREACH, Object::pose, SceneStats::totbone, and SceneStats::totbonesel.
Referenced by stats_update().
|
static |
Definition at line 345 of file info_stats.cc.
References BKE_pbvh_get_grid_num_faces(), BKE_pbvh_get_grid_num_verts(), SculptSession::bm, blender::bke::pbvh::BMesh, Object::data, blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, blender::bke::object::pbvh_get(), Object::sculpt, BMesh::totface, SceneStats::totfacesculpt, SceneStats::tottri, BMesh::totvert, SceneStats::totvertsculpt, and blender::bke::pbvh::Tree::type().
Referenced by stats_update().
|
static |
Definition at line 726 of file info_stats.cc.
References BLF_draw_default(), and SNPRINTF.
Referenced by ED_info_draw_stats().
|
static |
Definition at line 372 of file info_stats.cc.
References BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT, BKE_object_is_visible_in_viewport(), BKE_view_layer_active_object_get(), BKE_view_layer_edit_object_get(), BKE_view_layer_synced_ensure(), BLI_ghashutil_ptrcmp(), BLI_ghashutil_ptrhash(), BLI_gset_free(), BLI_gset_new(), DEG_OBJECT_ITER_BEGIN, DEG_OBJECT_ITER_END, DEG_OBJECT_ITER_FOR_RENDER_ENGINE_FLAGS, DEGObjectIterSettings::depsgraph, depsgraph, FOREACH_OBJECT_BEGIN, FOREACH_OBJECT_END, Object::mode, OB_GREASE_PENCIL, OB_MODE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, stats_object(), stats_object_edit(), stats_object_pose(), stats_object_sculpt(), SceneStats::totobj, SceneStats::totobjsel, and Object::type.
Referenced by format_stats().