Blender  V3.3
Functions
BKE_mesh_runtime.h File Reference

Go to the source code of this file.

Functions

void BKE_mesh_runtime_init_data (struct Mesh *mesh)
 Initialize the runtime of the given mesh. More...
 
void BKE_mesh_runtime_free_data (struct Mesh *mesh)
 Free all data (and mutexes) inside the runtime of the given mesh. More...
 
void BKE_mesh_runtime_reset_on_copy (struct Mesh *mesh, int flag)
 
int BKE_mesh_runtime_looptri_len (const struct Mesh *mesh)
 
void BKE_mesh_runtime_looptri_recalc (struct Mesh *mesh)
 
const struct MLoopTri * BKE_mesh_runtime_looptri_ensure (const struct Mesh *mesh)
 
bool BKE_mesh_runtime_ensure_edit_data (struct Mesh *mesh)
 
bool BKE_mesh_runtime_clear_edit_data (struct Mesh *mesh)
 
bool BKE_mesh_runtime_reset_edit_data (struct Mesh *mesh)
 
void BKE_mesh_runtime_clear_geometry (struct Mesh *mesh)
 
void BKE_mesh_runtime_clear_cache (struct Mesh *mesh)
 This function clears runtime cache of the given mesh. More...
 
void BKE_mesh_runtime_verttri_from_looptri (struct MVertTri *r_verttri, const struct MLoop *mloop, const struct MLoopTri *looptri, int looptri_num)
 
struct Mesh * mesh_get_eval_final (struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
 
struct Mesh * mesh_get_eval_deform (struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
 
struct Mesh * mesh_create_eval_final (struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
 
struct Mesh * mesh_create_eval_no_deform (struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
 
struct Mesh * mesh_create_eval_no_deform_render (struct Depsgraph *depsgraph, const struct Scene *scene, struct Object *ob, const struct CustomData_MeshMasks *dataMask)
 
void BKE_mesh_runtime_eval_to_meshkey (struct Mesh *me_deformed, struct Mesh *me, struct KeyBlock *kb)
 
bool BKE_mesh_runtime_is_valid (struct Mesh *me_eval)
 

Detailed Description

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

Definition in file BKE_mesh_runtime.h.

Function Documentation

◆ BKE_mesh_runtime_clear_cache()

void BKE_mesh_runtime_clear_cache ( struct Mesh *  mesh)

◆ BKE_mesh_runtime_clear_edit_data()

bool BKE_mesh_runtime_clear_edit_data ( struct Mesh *  mesh)

◆ BKE_mesh_runtime_clear_geometry()

void BKE_mesh_runtime_clear_geometry ( struct Mesh *  mesh)

◆ BKE_mesh_runtime_ensure_edit_data()

bool BKE_mesh_runtime_ensure_edit_data ( struct Mesh *  mesh)

◆ BKE_mesh_runtime_eval_to_meshkey()

void BKE_mesh_runtime_eval_to_meshkey ( struct Mesh *  me_deformed,
struct Mesh *  me,
struct KeyBlock *  kb 
)

◆ BKE_mesh_runtime_free_data()

void BKE_mesh_runtime_free_data ( struct Mesh *  mesh)

Free all data (and mutexes) inside the runtime of the given mesh.

Definition at line 72 of file mesh_runtime.cc.

References BKE_mesh_runtime_clear_cache(), mesh, and mesh_runtime_free_mutexes().

Referenced by mesh_free_data().

◆ BKE_mesh_runtime_init_data()

void BKE_mesh_runtime_init_data ( struct Mesh *  mesh)

Initialize the runtime of the given mesh.

Function expects that the runtime is already cleared.

Definition at line 67 of file mesh_runtime.cc.

References mesh, and mesh_runtime_init_mutexes().

Referenced by mesh_blend_read_data(), and mesh_init_data().

◆ BKE_mesh_runtime_is_valid()

bool BKE_mesh_runtime_is_valid ( struct Mesh *  me_eval)

◆ BKE_mesh_runtime_looptri_ensure()

const struct MLoopTri* BKE_mesh_runtime_looptri_ensure ( const struct Mesh *  mesh)
Note
This function only fills a cache, and therefore the mesh argument can be considered logically const. Concurrent access is protected by a mutex.
This is a ported copy of dm_getLoopTriArray(dm).

Referenced by BKE_bvhtree_from_mesh_get(), BKE_editmesh_looptri_calc_ex(), BKE_mesh_calc_loop_tangents(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_remesh_reproject_sculpt_face_sets(), C_BVHTree_FromObject(), cloth_from_mesh(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), deformVerts(), dynamicPaint_createUVSurface(), dynamicPaint_paintMesh(), dynamicPaint_setInitialColor(), blender::bke::mesh_surface_sample::MeshAttributeInterpolator::ensure_barycentric_coords(), blender::bke::mesh_surface_sample::MeshAttributeInterpolator::ensure_nearest_weights(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::nodes::node_geo_transfer_attribute_cc::get_closest_mesh_polygons(), harmonic_coordinates_bind(), imapaint_pick_uv(), initSystem(), lineart_geometry_object_load(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), proj_paint_state_mesh_eval_init(), RE_bake_pixels_populate_from_objects(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::nodes::node_geo_distribute_points_on_faces_cc::sample_mesh_surface(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::bke::mesh_surface_sample::sample_surface_points_projected(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), shrinkwrap_build_boundary_data(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), surfacedeformBind(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), and blender::nodes::node_geo_distribute_points_on_faces_cc::update_elimination_mask_based_on_density_factors().

◆ BKE_mesh_runtime_looptri_len()

int BKE_mesh_runtime_looptri_len ( const struct Mesh *  mesh)

Referenced by BKE_bvhtree_from_mesh_get(), C_BVHTree_FromObject(), blender::nodes::node_geo_distribute_points_on_faces_cc::compute_attribute_outputs(), deformVerts(), dynamicPaint_createUVSurface(), dynamicPaint_setInitialColor(), blender::bke::mesh_surface_sample::MeshAttributeInterpolator::ensure_barycentric_coords(), blender::bke::mesh_surface_sample::MeshAttributeInterpolator::ensure_nearest_weights(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::nodes::node_geo_transfer_attribute_cc::get_closest_mesh_polygons(), initSystem(), lineart_geometry_object_load(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::nodes::node_geo_distribute_points_on_faces_cc::sample_mesh_surface(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::bke::mesh_surface_sample::sample_surface_points_projected(), blender::bke::mesh_surface_sample::sample_surface_points_spherical(), shrinkwrap_build_boundary_data(), blender::ed::curves::snap_curves_to_surface::snap_curves_to_surface_exec_object(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), and blender::nodes::node_geo_distribute_points_on_faces_cc::update_elimination_mask_based_on_density_factors().

◆ BKE_mesh_runtime_looptri_recalc()

void BKE_mesh_runtime_looptri_recalc ( struct Mesh *  mesh)

◆ BKE_mesh_runtime_reset_edit_data()

bool BKE_mesh_runtime_reset_edit_data ( struct Mesh *  mesh)

◆ BKE_mesh_runtime_reset_on_copy()

void BKE_mesh_runtime_reset_on_copy ( struct Mesh *  mesh,
int  flag 
)

Clear all pointers which we don't want to be shared on copying the datablock. However, keep all the flags which defines what the mesh is (for example, that it's deformed only, or that its custom data layers are out of date.)

Referenced by mesh_copy_data().

◆ BKE_mesh_runtime_verttri_from_looptri()

void BKE_mesh_runtime_verttri_from_looptri ( struct MVertTri *  r_verttri,
const struct MLoop *  mloop,
const struct MLoopTri *  looptri,
int  looptri_num 
)

Referenced by cloth_from_mesh(), and deformVerts().

◆ mesh_create_eval_final()

struct Mesh* mesh_create_eval_final ( struct Depsgraph *  depsgraph,
const struct Scene *  scene,
struct Object *  ob,
const struct CustomData_MeshMasks *  dataMask 
)

◆ mesh_create_eval_no_deform()

struct Mesh* mesh_create_eval_no_deform ( struct Depsgraph *  depsgraph,
const struct Scene *  scene,
struct Object *  ob,
const struct CustomData_MeshMasks *  dataMask 
)

Referenced by bvh_get_mesh().

◆ mesh_create_eval_no_deform_render()

struct Mesh* mesh_create_eval_no_deform_render ( struct Depsgraph *  depsgraph,
const struct Scene *  scene,
struct Object *  ob,
const struct CustomData_MeshMasks *  dataMask 
)

Referenced by bvh_get_mesh().

◆ mesh_get_eval_deform()

struct Mesh* mesh_get_eval_deform ( struct Depsgraph *  depsgraph,
const struct Scene *  scene,
struct Object *  ob,
const struct CustomData_MeshMasks *  dataMask 
)

◆ mesh_get_eval_final()

struct Mesh* mesh_get_eval_final ( struct Depsgraph *  depsgraph,
const struct Scene *  scene,
struct Object *  ob,
const struct CustomData_MeshMasks *  dataMask 
)