|
Blender V4.3
|
Go to the source code of this file.
Namespaces | |
| namespace | blender |
| namespace | blender::bke |
This file contains access functions for the Mesh.runtime struct.
Definition in file BKE_mesh_runtime.hh.
| 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 303 of file mesh_runtime.cc.
References BKE_mesh_runtime_clear_geometry().
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().
| 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().
Also note that some derived caches like CD_TANGENT are stored directly in CustomData.
Definition at line 312 of file mesh_runtime.cc.
Referenced by BKE_mesh_runtime_clear_cache(), and BM_mesh_bm_to_me_compact().
Return the number of derived triangles (corner_tris).
Definition at line 290 of file mesh_runtime.cc.
References poly_to_tri_count().
Referenced by RE_bake_pixels_populate_from_objects().
| void BKE_mesh_runtime_ensure_edit_data | ( | Mesh * | mesh | ) |
Definition at line 296 of file mesh_runtime.cc.
Referenced by BKE_mesh_wrapper_from_editmesh().
| bool BKE_mesh_runtime_is_valid | ( | Mesh * | mesh_eval | ) |
Definition at line 443 of file mesh_runtime.cc.
References BKE_mesh_validate_all_customdata(), BKE_mesh_validate_arrays(), BLI_assert, CD_MDEFORMVERT, CD_MFACE, Mesh::corner_data, Mesh::corners_num, CustomData_get_layer_for_write(), blender::MutableSpan< T >::data(), blender::Span< T >::data(), Mesh::edge_data, Mesh::edges_num, Mesh::face_data, Mesh::faces_num, Mesh::fdata_legacy, Mesh::id, is_valid, ID::name, printf, blender::Span< T >::size(), Mesh::totface_legacy, Mesh::vert_data, and Mesh::verts_num.