|
Blender V5.3
|
#include <algorithm>#include "MEM_guardedalloc.h"#include "CLG_log.h"#include "DNA_key_types.h"#include "DNA_layer_types.h"#include "DNA_mesh_types.h"#include "DNA_meshdata_types.h"#include "DNA_object_types.h"#include "DNA_scene_types.h"#include "BLI_array_utils_c.hh"#include "BLI_implicit_sharing.hh"#include "BLI_listbase.hh"#include "BLI_math_base_c.hh"#include "BLI_multi_value_map.hh"#include "BLI_string.hh"#include "BLI_task.hh"#include "BLI_vector.hh"#include "BKE_attribute_legacy_convert.hh"#include "BKE_context.hh"#include "BKE_customdata.hh"#include "BKE_deform.hh"#include "BKE_editmesh.hh"#include "BKE_key.hh"#include "BKE_layer.hh"#include "BKE_lib_id.hh"#include "BKE_main.hh"#include "BKE_mesh.hh"#include "BKE_object.hh"#include "BKE_undo_system.hh"#include "DEG_depsgraph.hh"#include "ED_mesh.hh"#include "ED_object.hh"#include "ED_undo.hh"#include "ED_util.hh"#include "WM_api.hh"#include "WM_types.hh"#include "BLI_array_store.hh"#include "BLI_array_store_utils.hh"#include "BLI_task_c.hh"Go to the source code of this file.
Classes | |
| struct | blender::BArrayCustomData |
| struct | blender::UndoMesh |
| struct | blender::UMArrayData |
| struct | blender::MeshUndoStep_Elem |
| struct | blender::MeshUndoStep_SceneData |
| struct | blender::MeshUndoStep |
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Macros | |
| #define | USE_ARRAY_STORE |
| #define | ARRAY_CHUNK_SIZE_IN_BYTES 65536 |
| #define | ARRAY_CHUNK_NUM_MIN 256 |
| #define | USE_ARRAY_STORE_THREAD |
| #define | USE_ARRAY_STORE_RLE |
Variables | |
| static CLG_LogRef | blender::LOG = {"undo.mesh"} |
| #define ARRAY_CHUNK_NUM_MIN 256 |
Definition at line 73 of file editmesh_undo.cc.
Referenced by blender::array_chunk_size_calc().
| #define ARRAY_CHUNK_SIZE_IN_BYTES 65536 |
This used to be much smaller (256), but this caused too much overhead when selection moved to boolean arrays. Especially with high-poly meshes where managing a large number of small chunks could be slow, blocking user interactivity. Use a larger value (in bytes) which calculates the chunk size using #array_chunk_size_calc. See: #105046 & #105205.
Definition at line 72 of file editmesh_undo.cc.
Referenced by blender::array_chunk_size_calc().
| #define ARRAY_STORE_INDEX_NUM (ARRAY_STORE_INDEX_MSEL + 1) |
Definition at line 206 of file editmesh_undo.cc.
Referenced by blender::um_arraystore_compact_with_info(), and blender::um_arraystore_free().
| #define USE_ARRAY_STORE |
Definition at line 54 of file editmesh_undo.cc.
| #define USE_ARRAY_STORE_RLE |
Use run length encoding for boolean custom-data.
Avoid poor performance caused by boolean arrays not having enough uniqueness to efficiently de-duplicate, see: #136737.
NOTE(@ideasman42): This has the down-side that creating undo steps needs to encode data before comparing it with the previous state (when creating each undo step). Adding additional work even when nothing change.
Since there is overhead for RLE encoding this is only used on boolean array, typically used for storing selection/hidden state as well as edge flags. The encoding has also been optimized for performance instead of "compression" which would pack bits into the smallest possible space.
In practice, arrays of 32 million booleans (on an AMD TRX 3990X):
There is also the benefit of reduced memory use, although that isn't the goal.
Definition at line 99 of file editmesh_undo.cc.
| #define USE_ARRAY_STORE_THREAD |
Definition at line 75 of file editmesh_undo.cc.