Essentially add some API to properly free non-public data, instead of directly calling `MEM_freeN` on them. Based on @brecht code from https://projects.blender.org/mont29/blender/compare/tmp-guardedalloc-api...brecht:free-void Co-authored-by: Brecht Van Lommel <brecht@blender.org> Pull Request: https://projects.blender.org/blender/blender/pulls/134765
42 lines
1.3 KiB
C++
42 lines
1.3 KiB
C++
/* SPDX-FileCopyrightText: 2009 Blender Authors
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup editors
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
struct Main;
|
|
struct Scene;
|
|
struct View3D;
|
|
struct ViewLayer;
|
|
struct wmWindowManager;
|
|
|
|
/* `info_stats.cc` */
|
|
|
|
void ED_info_stats_clear(wmWindowManager *wm, ViewLayer *view_layer);
|
|
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);
|
|
|
|
void ED_view3d_local_stats_free(View3D *v3d);
|
|
|
|
/**
|
|
* \param 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.
|
|
*/
|
|
void ED_info_draw_stats(Main *bmain,
|
|
Scene *scene,
|
|
ViewLayer *view_layer,
|
|
View3D *v3d_local,
|
|
int x,
|
|
int *y,
|
|
int height);
|