Blender V5.0
BKE_mesh_runtime.hh File Reference
#include "BLI_math_vector_types.hh"
#include "BLI_span.hh"

Go to the source code of this file.

Namespaces

namespace  blender
namespace  blender::bke

Functions

int BKE_mesh_runtime_corner_tris_len (const Mesh *mesh)
void BKE_mesh_runtime_ensure_edit_data (Mesh *mesh)
void BKE_mesh_runtime_clear_geometry (Mesh *mesh)
void BKE_mesh_runtime_clear_cache (Mesh *mesh)
void blender::bke::mesh_get_mapped_verts_coords (Mesh *mesh_eval, MutableSpan< float3 > r_cos)
Meshblender::bke::editbmesh_get_eval_cage (Depsgraph *depsgraph, const Scene *scene, Object *obedit, BMEditMesh *em, const CustomData_MeshMasks *dataMask)
Meshblender::bke::editbmesh_get_eval_cage_from_orig (Depsgraph *depsgraph, const Scene *scene, Object *obedit, const CustomData_MeshMasks *dataMask)
bool blender::bke::editbmesh_modifier_is_enabled (const Scene *scene, const Object *ob, ModifierData *md, bool has_prev_mesh)
Meshblender::bke::mesh_get_eval_deform (Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
Meshblender::bke::mesh_create_eval_final (Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
Meshblender::bke::mesh_create_eval_no_deform (Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
Meshblender::bke::mesh_create_eval_no_deform_render (Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
bool BKE_mesh_runtime_is_valid (Mesh *mesh_eval)

Detailed Description

This file contains access functions for the Mesh.runtime struct.

Definition in file BKE_mesh_runtime.hh.

Function Documentation

◆ BKE_mesh_runtime_clear_cache()

void BKE_mesh_runtime_clear_cache ( Mesh * mesh)

Similar to BKE_mesh_runtime_clear_geometry, but subtly different in that it also clears data-block level features like evaluated data-blocks and edit mode data. They will be functionally the same in most cases, but prefer this function if unsure, since it clears more data.

Definition at line 304 of file mesh_runtime.cc.

References BKE_mesh_runtime_clear_geometry(), blender::bke::free_batch_cache(), and blender::bke::free_mesh_eval().

Referenced by BKE_mesh_clear_geometry(), BKE_mesh_clear_geometry_and_metadata(), BKE_mesh_validate(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_vertices(), mesh_add_edges(), mesh_add_faces(), mesh_add_loops(), mesh_add_verts(), and blender::nodes::node_geo_extrude_mesh_cc::tag_mesh_added_faces().

◆ BKE_mesh_runtime_clear_geometry()

void BKE_mesh_runtime_clear_geometry ( Mesh * mesh)

Clear and free any derived caches associated with the mesh geometry data. Examples include BVH caches, normals, triangulation, etc. This should be called when replacing a mesh's geometry directly or making other large changes to topology. It does not need to be called on new meshes.

For "smaller" changes to meshes like updating positions, consider calling a more specific update function like #Mesh::tag_positions_changed().

Definition at line 313 of file mesh_runtime.cc.

References blender::bke::free_bvh_caches(), ME_FLAG_UV_SELECT_SYNC_VALID, and ME_NO_OVERLAPPING_TOPOLOGY.

Referenced by BKE_mesh_runtime_clear_cache(), and BM_mesh_bm_to_me_compact().

◆ BKE_mesh_runtime_corner_tris_len()

int BKE_mesh_runtime_corner_tris_len ( const Mesh * mesh)

Return the number of derived triangles (corner_tris).

Definition at line 291 of file mesh_runtime.cc.

References poly_to_tri_count().

Referenced by RE_bake_pixels_populate_from_objects().

◆ BKE_mesh_runtime_ensure_edit_data()

void BKE_mesh_runtime_ensure_edit_data ( Mesh * mesh)

Definition at line 297 of file mesh_runtime.cc.

Referenced by BKE_mesh_wrapper_from_editmesh().

◆ BKE_mesh_runtime_is_valid()