|
Blender V5.0
|
#include <cstdio>#include <cstring>#include "MEM_guardedalloc.h"#include "DNA_armature_types.h"#include "DNA_curve_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_pointcloud_types.h"#include "DNA_scene_types.h"#include "DNA_space_enums.h"#include "DNA_windowmanager_types.h"#include "BLF_api.hh"#include "BLI_array_utils.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_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_paint_bvh.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 "GPU_capabilities.hh"Go to the source code of this file.
Classes | |
| struct | SceneStats |
| struct | SceneStatsFmt |
Macros | |
| #define | SCENE_STATS_FMT_INT(_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) |
| void | ED_view3d_local_stats_free (View3D *v3d) |
| 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 | ) |
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 821 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(), i, IFACE_, View3D::localvd, max_ii(), Object::mode, OB_ARMATURE, OB_CURVES, OB_FONT, OB_GREASE_PENCIL, OB_LAMP, OB_MESH, OB_MODE_EDIT, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_POINTCLOUD, 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::totgpstroke, SceneStatsFmt::totlamp, SceneStatsFmt::totlampsel, SceneStatsFmt::totobj, SceneStatsFmt::totobjsel, SceneStatsFmt::totpoints, SceneStatsFmt::tottri, SceneStatsFmt::tottrisel, SceneStatsFmt::totvert, SceneStatsFmt::totvertsculpt, SceneStatsFmt::totvertsel, Object::type, U, x, and y.
Referenced by view3d_draw_region_info().
Definition at line 796 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 490 of file info_stats.cc.
References bScreen::areabase, ED_view3d_local_stats_free(), LISTBASE_FOREACH, View3D::localvd, MEM_SAFE_FREE, SPACE_VIEW3D, ViewLayer::stats, WM_window_get_active_screen(), and WM_window_get_active_view_layer().
Referenced by wm_event_do_notifiers().
Definition at line 791 of file info_stats.cc.
References ED_info_statusbar_string_ex(), and U.
| const char * ED_info_statusbar_string_ex | ( | Main * | bmain, |
| Scene * | scene, | ||
| ViewLayer * | view_layer, | ||
| const char | statusbar_flag ) |
Definition at line 702 of file info_stats.cc.
References BKE_blender_version_string_compact(), BLI_snprintf_utf8_rlen(), BLI_str_format_byte_unit(), BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE, BLI_timecode_string_from_time(), RenderData::cfra, RenderData::efra, format_stats(), FRA2TIME, get_stats_string(), GPU_mem_stats_get(), GPU_mem_stats_supported(), IFACE_, len, MEM_get_memory_in_use, mem_in_use, Scene::r, RenderData::sfra, STATUSBAR_SHOW_MEMORY, STATUSBAR_SHOW_SCENE_DURATION, STATUSBAR_SHOW_STATS, STATUSBAR_SHOW_VERSION, STATUSBAR_SHOW_VRAM, and U.
Referenced by ED_info_statistics_string(), ED_info_statusbar_string(), and uiTemplateStatusInfo().
| void ED_view3d_local_stats_free | ( | View3D * | v3d | ) |
Definition at line 511 of file info_stats.cc.
References View3D_Runtime::local_stats, MEM_SAFE_FREE, and View3D::runtime.
Referenced by ED_info_stats_clear(), space_view3d_refresh(), view3d_exit(), view3d_free(), and view3d_localview_exit().
|
static |
Definition at line 516 of file info_stats.cc.
References BKE_scene_ensure_depsgraph(), depsgraph, ListBase::first, View3D_Runtime::local_stats, MEM_mallocN(), View3D::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 570 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_utf8_rlen(), BLI_strncpy_utf8_rlen(), LayerCollection::collection, count, Object::id, IFACE_, len, Object::mode, ID::name, OB_ARMATURE, OB_CURVES, OB_GREASE_PENCIL, OB_MESH, OB_MODE_EDIT, OB_MODE_OBJECT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, OB_POINTCLOUD, 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::totgpstroke, SceneStatsFmt::totobj, SceneStatsFmt::totobjsel, SceneStatsFmt::totpoints, SceneStatsFmt::tottri, SceneStatsFmt::totvert, SceneStatsFmt::totvertsculpt, SceneStatsFmt::totvertsel, and Object::type.
Referenced by ED_info_statusbar_string_ex().
|
static |
Definition at line 375 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 95 of file info_stats.cc.
References BKE_subdiv_ccg_topology_counters(), Mesh::corners_num, Mesh::edges_num, Mesh::faces_num, SubsurfRuntimeData::has_gpu_subdiv, poly_to_tri_count(), 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 151 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(), blender::bke::CurvesGeometry::curves_num(), Object::data, Curves::geometry, OB_CURVES, OB_GREASE_PENCIL, OB_LAMP, OB_MESH, OB_POINTCLOUD, OB_VOLUME, blender::bke::CurvesGeometry::points_num(), stats_mesheval(), SceneStats::totgpframe, SceneStats::totgplayer, SceneStats::totgpstroke, SceneStats::totlamp, SceneStats::totlampsel, SceneStats::totobj, SceneStats::totobjsel, SceneStats::totpoints, and Object::type.
Referenced by stats_update().
|
static |
Definition at line 224 of file info_stats.cc.
References blender::bke::CurvesGeometry::attributes(), Geometry::attributes, BKE_curve_editNurbs_get(), BKE_editmesh_from_object(), BMEditMesh::bm, BONE_CONNECTED, BONE_ROOTSEL, BONE_SELECTED, BONE_TIPSEL, blender::array_utils::count_booleans(), CU_BEZIER, Object::data, Lattice::def, bArmature::edbo, MetaBall::editelems, Lattice::editlatt, ELEM, BezTriple::f1, BPoint::f1, BezTriple::f2, BezTriple::f3, Curves::geometry, EditLatt::latt, LISTBASE_FOREACH, blender::bke::AttributeAccessor::lookup_or_default(), BMEditMesh::looptris, OB_ARMATURE, OB_CURVES, OB_CURVES_LEGACY, OB_LATTICE, OB_MBALL, OB_MESH, OB_POINTCLOUD, OB_SURF, Lattice::pntsu, Lattice::pntsv, Lattice::pntsw, blender::bke::Point, blender::bke::CurvesGeometry::points_num(), SELECT, 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, PointCloud::totpoint, SceneStats::totpoints, SceneStats::tottri, BMesh::totvert, SceneStats::totvert, BMesh::totvertsel, SceneStats::totvertsel, and Object::type.
Referenced by stats_update().
|
static |
Definition at line 359 of file info_stats.cc.
References BKE_pose_is_bonecoll_visible(), bPose::chanbase, Object::data, LISTBASE_FOREACH, Object::pose, POSE_SELECTED, SceneStats::totbone, and SceneStats::totbonesel.
Referenced by stats_update().
|
static |
Definition at line 381 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, Mesh::faces_num, Curves::geometry, blender::bke::pbvh::Grids, blender::bke::pbvh::Mesh, OB_CURVES, OB_MESH, blender::bke::object::pbvh_get(), blender::bke::CurvesGeometry::points_num(), Object::sculpt, BMesh::totface, SceneStats::totfacesculpt, SceneStats::tottri, BMesh::totvert, SceneStats::totvertsculpt, blender::bke::pbvh::Tree::type(), Object::type, and Mesh::verts_num.
Referenced by stats_update().
|
static |
Definition at line 806 of file info_stats.cc.
References BLF_draw_default(), SNPRINTF_UTF8, and y.
Referenced by ED_info_draw_stats().
|
static |
Definition at line 421 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, ELEM, DEGObjectIterSettings::flags, FOREACH_OBJECT_BEGIN, FOREACH_OBJECT_END, Object::mode, OB_GREASE_PENCIL, OB_MODE_EDIT, OB_MODE_POSE, OB_MODE_SCULPT, OB_MODE_SCULPT_CURVES, stats_object(), stats_object_edit(), stats_object_pose(), stats_object_sculpt(), SceneStats::totobj, SceneStats::totobjsel, and Object::type.
Referenced by format_stats().