Blender  V3.3
Classes | Macros | Functions | Variables
DerivedMesh.cc File Reference
#include <climits>
#include <cstring>
#include "MEM_guardedalloc.h"
#include "DNA_cloth_types.h"
#include "DNA_customdata_types.h"
#include "DNA_key_types.h"
#include "DNA_material_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.h"
#include "BLI_bitmap.h"
#include "BLI_blenlib.h"
#include "BLI_linklist.h"
#include "BLI_math.h"
#include "BLI_math_vec_types.hh"
#include "BLI_task.h"
#include "BLI_task.hh"
#include "BLI_utildefines.h"
#include "BLI_vector.hh"
#include "BKE_DerivedMesh.h"
#include "BKE_bvhutils.h"
#include "BKE_colorband.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
#include "BKE_geometry_set.hh"
#include "BKE_geometry_set_instances.hh"
#include "BKE_key.h"
#include "BKE_layer.h"
#include "BKE_lib_id.h"
#include "BKE_material.h"
#include "BKE_mesh.h"
#include "BKE_mesh_iterators.h"
#include "BKE_mesh_mapping.h"
#include "BKE_mesh_runtime.h"
#include "BKE_mesh_tangent.h"
#include "BKE_mesh_wrapper.h"
#include "BKE_modifier.h"
#include "BKE_multires.h"
#include "BKE_object.h"
#include "BKE_object_deform.h"
#include "BKE_paint.h"
#include "BKE_subdiv_modifier.h"
#include "BLI_sys_types.h"
#include "BKE_shrinkwrap.h"
#include "DEG_depsgraph.h"
#include "DEG_depsgraph_query.h"
#include "CLG_log.h"

Go to the source code of this file.

Classes

struct  MappedUserData
 

Macros

#define ASSERT_IS_VALID_MESH(mesh)
 

Functions

static void mesh_init_origspace (Mesh *mesh)
 
static void editbmesh_calc_modifier_final_normals (Mesh *mesh_final, const CustomData_MeshMasks *final_datamask)
 
static void editbmesh_calc_modifier_final_normals_or_defer (Mesh *mesh_final, const CustomData_MeshMasks *final_datamask)
 
static MVertdm_getVertArray (DerivedMesh *dm)
 
static MEdgedm_getEdgeArray (DerivedMesh *dm)
 
static MLoopdm_getLoopArray (DerivedMesh *dm)
 
static MPolydm_getPolyArray (DerivedMesh *dm)
 
static MVertdm_dupVertArray (DerivedMesh *dm)
 
static MEdgedm_dupEdgeArray (DerivedMesh *dm)
 
static MLoopdm_dupLoopArray (DerivedMesh *dm)
 
static MPolydm_dupPolyArray (DerivedMesh *dm)
 
static int dm_getNumLoopTri (DerivedMesh *dm)
 
static const MLoopTridm_getLoopTriArray (DerivedMesh *dm)
 
void DM_init_funcs (DerivedMesh *dm)
 
void DM_init (DerivedMesh *dm, DerivedMeshType type, int numVerts, int numEdges, int numTessFaces, int numLoops, int numPolys)
 
void DM_from_template (DerivedMesh *dm, DerivedMesh *source, DerivedMeshType type, int numVerts, int numEdges, int numTessFaces, int numLoops, int numPolys)
 
bool DM_release (DerivedMesh *dm)
 
void DM_DupPolys (DerivedMesh *source, DerivedMesh *target)
 
void DM_ensure_looptri_data (DerivedMesh *dm)
 
void BKE_mesh_runtime_eval_to_meshkey (Mesh *me_deformed, Mesh *me, KeyBlock *kb)
 
void DM_set_only_copy (DerivedMesh *dm, const CustomData_MeshMasks *mask)
 
static void mesh_set_only_copy (Mesh *mesh, const CustomData_MeshMasks *mask)
 
voidDM_get_vert_data_layer (DerivedMesh *dm, int type)
 
voidDM_get_edge_data_layer (DerivedMesh *dm, int type)
 
voidDM_get_poly_data_layer (DerivedMesh *dm, int type)
 
voidDM_get_loop_data_layer (DerivedMesh *dm, int type)
 
void DM_copy_vert_data (DerivedMesh *source, DerivedMesh *dest, int source_index, int dest_index, int count)
 
void DM_interp_vert_data (DerivedMesh *source, DerivedMesh *dest, int *src_indices, float *weights, int count, int dest_index)
 
static float(* get_editbmesh_orco_verts (BMEditMesh *em))[3]
 
static float(* get_orco_coords (Object *ob, BMEditMesh *em, int layer, int *free))[3]
 
static Meshcreate_orco_mesh (Object *ob, Mesh *me, BMEditMesh *em, int layer)
 
static void add_orco_mesh (Object *ob, BMEditMesh *em, Mesh *mesh, Mesh *mesh_orco, int layer)
 
static bool mesh_has_modifier_final_normals (const Mesh *mesh_input, const CustomData_MeshMasks *final_datamask, Mesh *mesh_final)
 
static void mesh_calc_modifier_final_normals (const Mesh *mesh_input, const CustomData_MeshMasks *final_datamask, const bool sculpt_dyntopo, Mesh *mesh_final)
 
static void mesh_calc_finalize (const Mesh *mesh_input, Mesh *mesh_eval)
 
void BKE_mesh_wrapper_deferred_finalize_mdata (Mesh *me_eval, const CustomData_MeshMasks *cd_mask_finalize)
 
static Meshmodifier_modify_mesh_and_geometry_set (ModifierData *md, const ModifierEvalContext &mectx, Mesh *input_mesh, GeometrySet &geometry_set)
 
static void mesh_calc_modifiers (struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const bool use_deform, const bool need_mapping, const CustomData_MeshMasks *dataMask, const bool use_cache, const bool allow_shared_mesh, Mesh **r_deform, Mesh **r_final, GeometrySet **r_geometry_set)
 
float(* editbmesh_vert_coords_alloc (BMEditMesh *em, int *r_vert_len))[3]
 
bool editbmesh_modifier_is_enabled (const Scene *scene, const Object *ob, ModifierData *md, bool has_prev_mesh)
 
static void editbmesh_calc_modifiers (struct Depsgraph *depsgraph, const Scene *scene, Object *ob, BMEditMesh *em_input, const CustomData_MeshMasks *dataMask, Mesh **r_cage, Mesh **r_final, GeometrySet **r_geometry_set)
 
static void mesh_build_extra_data (struct Depsgraph *depsgraph, Object *ob, Mesh *mesh_eval)
 
static void mesh_build_data (struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask, const bool need_mapping)
 
static void editbmesh_build_data (struct Depsgraph *depsgraph, const Scene *scene, Object *obedit, BMEditMesh *em, CustomData_MeshMasks *dataMask)
 
static void object_get_datamask (const Depsgraph *depsgraph, Object *ob, CustomData_MeshMasks *r_mask, bool *r_need_mapping)
 
void makeDerivedMesh (struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
 
Meshmesh_get_eval_final (struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
 
Meshmesh_get_eval_deform (struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
 
Meshmesh_create_eval_final (Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
 
Meshmesh_create_eval_no_deform (Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
 
Meshmesh_create_eval_no_deform_render (Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
 
Mesheditbmesh_get_eval_cage (struct Depsgraph *depsgraph, const Scene *scene, Object *obedit, BMEditMesh *em, const CustomData_MeshMasks *dataMask)
 
Mesheditbmesh_get_eval_cage_from_orig (struct Depsgraph *depsgraph, const Scene *scene, Object *obedit, const CustomData_MeshMasks *dataMask)
 
static void make_vertexcos__mapFunc (void *userData, int index, const float co[3], const float UNUSED(no[3]))
 
void mesh_get_mapped_verts_coords (Mesh *me_eval, float(*r_cos)[3], const int totcos)
 

Variables

static ThreadRWMutex loops_cache_lock = PTHREAD_RWLOCK_INITIALIZER
 

Macro Definition Documentation

◆ ASSERT_IS_VALID_MESH

#define ASSERT_IS_VALID_MESH (   mesh)

Definition at line 79 of file DerivedMesh.cc.

Function Documentation

◆ add_orco_mesh()

static void add_orco_mesh ( Object ob,
BMEditMesh em,
Mesh mesh,
Mesh mesh_orco,
int  layer 
)
static

◆ BKE_mesh_runtime_eval_to_meshkey()

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

◆ BKE_mesh_wrapper_deferred_finalize_mdata()

void BKE_mesh_wrapper_deferred_finalize_mdata ( Mesh me_eval,
const CustomData_MeshMasks cd_mask_finalize 
)

◆ create_orco_mesh()

static Mesh* create_orco_mesh ( Object ob,
Mesh me,
BMEditMesh em,
int  layer 
)
static

◆ DM_copy_vert_data()

void DM_copy_vert_data ( struct DerivedMesh source,
struct DerivedMesh dest,
int  source_index,
int  dest_index,
int  count 
)

Custom data copy functions copy count elements from source_index in source to dest_index in dest these copy all layers for which the CD_FLAG_NOCOPY flag is not set.

Definition at line 460 of file DerivedMesh.cc.

References count, CustomData_copy_data(), dest, and DerivedMesh::vertData.

Referenced by set_ccgdm_all_geometry().

◆ dm_dupEdgeArray()

static MEdge* dm_dupEdgeArray ( DerivedMesh dm)
static

Definition at line 160 of file DerivedMesh.cc.

References DerivedMesh::copyEdgeArray, DerivedMesh::getNumEdges, and MEM_malloc_arrayN.

Referenced by DM_init_funcs().

◆ dm_dupLoopArray()

static MLoop* dm_dupLoopArray ( DerivedMesh dm)
static

Definition at line 172 of file DerivedMesh.cc.

References DerivedMesh::copyLoopArray, DerivedMesh::getNumLoops, and MEM_malloc_arrayN.

Referenced by DM_init_funcs().

◆ dm_dupPolyArray()

static MPoly* dm_dupPolyArray ( DerivedMesh dm)
static

Definition at line 184 of file DerivedMesh.cc.

References DerivedMesh::copyPolyArray, DerivedMesh::getNumPolys, and MEM_malloc_arrayN.

Referenced by DM_init_funcs().

◆ DM_DupPolys()

void DM_DupPolys ( DerivedMesh source,
DerivedMesh target 
)

◆ dm_dupVertArray()

static MVert* dm_dupVertArray ( DerivedMesh dm)
static

Definition at line 148 of file DerivedMesh.cc.

References DerivedMesh::copyVertArray, DerivedMesh::getNumVerts, and MEM_malloc_arrayN.

Referenced by DM_init_funcs().

◆ DM_ensure_looptri_data()

void DM_ensure_looptri_data ( DerivedMesh dm)

Ensure the array is large enough.

Note
This function must always be thread-protected by caller. It should only be used by internal code.

Definition at line 362 of file DerivedMesh.cc.

References DerivedMesh::array, DerivedMesh::array_wip, BLI_assert, DerivedMesh::looptris, MEM_malloc_arrayN, MEM_SAFE_FREE, DerivedMesh::num, DerivedMesh::num_alloc, DerivedMesh::numLoopData, DerivedMesh::numPolyData, poly_to_tri_count(), and SWAP.

Referenced by ccgDM_recalcLoopTri(), and cdDM_recalc_looptri().

◆ DM_from_template()

void DM_from_template ( DerivedMesh dm,
DerivedMesh source,
DerivedMeshType  type,
int  numVerts,
int  numEdges,
int  numTessFaces,
int  numLoops,
int  numPolys 
)

◆ DM_get_edge_data_layer()

void* DM_get_edge_data_layer ( DerivedMesh dm,
int  type 
)

◆ DM_get_loop_data_layer()

void* DM_get_loop_data_layer ( DerivedMesh dm,
int  type 
)

Definition at line 455 of file DerivedMesh.cc.

References CustomData_get_layer(), DerivedMesh::loopData, and type.

Referenced by DM_init_funcs(), and do_multires_bake().

◆ DM_get_poly_data_layer()

void* DM_get_poly_data_layer ( DerivedMesh dm,
int  type 
)

◆ DM_get_vert_data_layer()

void* DM_get_vert_data_layer ( DerivedMesh dm,
int  type 
)

◆ dm_getEdgeArray()

static MEdge* dm_getEdgeArray ( DerivedMesh dm)
static

◆ dm_getLoopArray()

static MLoop* dm_getLoopArray ( DerivedMesh dm)
static

◆ dm_getLoopTriArray()

static const MLoopTri* dm_getLoopTriArray ( DerivedMesh dm)
static

◆ dm_getNumLoopTri()

static int dm_getNumLoopTri ( DerivedMesh dm)
static

◆ dm_getPolyArray()

static MPoly* dm_getPolyArray ( DerivedMesh dm)
static

◆ dm_getVertArray()

static MVert* dm_getVertArray ( DerivedMesh dm)
static

◆ DM_init()

void DM_init ( DerivedMesh dm,
DerivedMeshType  type,
int  numVerts,
int  numEdges,
int  numTessFaces,
int  numLoops,
int  numPolys 
)

Utility function to initialize a DerivedMesh for the desired number of vertices, edges and faces (doesn't allocate memory for them, just sets up the custom data layers)>

Definition at line 250 of file DerivedMesh.cc.

References CD_NUMTYPES, copy_vn_i(), DM_init_funcs(), DerivedMesh::edgeData, DerivedMesh::faceData, DerivedMesh::loopData, DerivedMesh::needsFree, DerivedMesh::numEdgeData, DerivedMesh::numLoopData, DerivedMesh::numPolyData, DerivedMesh::numTessFaceData, DerivedMesh::numVertData, DerivedMesh::polyData, DerivedMesh::type, type, CustomData::typemap, and DerivedMesh::vertData.

Referenced by cdDM_from_mesh_ex().

◆ DM_init_funcs()

void DM_init_funcs ( DerivedMesh dm)

◆ DM_interp_vert_data()

void DM_interp_vert_data ( struct DerivedMesh source,
struct DerivedMesh dest,
int *  src_indices,
float weights,
int  count,
int  dest_index 
)

Interpolates vertex data from the vertices indexed by src_indices in the source mesh using the given weights and stores the result in the vertex indexed by dest_index in the dest mesh.

Definition at line 466 of file DerivedMesh.cc.

References count, CustomData_interp(), dest, and DerivedMesh::vertData.

Referenced by set_ccgdm_all_geometry().

◆ DM_release()

bool DM_release ( DerivedMesh dm)

◆ DM_set_only_copy()

void DM_set_only_copy ( DerivedMesh dm,
const CustomData_MeshMasks mask 
)

◆ editbmesh_build_data()

static void editbmesh_build_data ( struct Depsgraph depsgraph,
const Scene scene,
Object obedit,
BMEditMesh em,
CustomData_MeshMasks dataMask 
)
static

◆ editbmesh_calc_modifier_final_normals()

static void editbmesh_calc_modifier_final_normals ( Mesh mesh_final,
const CustomData_MeshMasks final_datamask 
)
static

◆ editbmesh_calc_modifier_final_normals_or_defer()

static void editbmesh_calc_modifier_final_normals_or_defer ( Mesh mesh_final,
const CustomData_MeshMasks final_datamask 
)
static

◆ editbmesh_calc_modifiers()

static void editbmesh_calc_modifiers ( struct Depsgraph depsgraph,
const Scene scene,
Object ob,
BMEditMesh em_input,
const CustomData_MeshMasks dataMask,
Mesh **  r_cage,
Mesh **  r_final,
GeometrySet **  r_geometry_set 
)
static

Definition at line 1326 of file DerivedMesh.cc.

References add_orco_mesh(), ASSERT_IS_VALID_MESH, BKE_id_free(), BKE_mesh_copy_for_eval(), BKE_mesh_ensure_default_orig_index_customdata(), BKE_mesh_from_bmesh_for_eval_nomain(), BKE_mesh_runtime_ensure_edit_data(), BKE_mesh_runtime_reset_edit_data(), BKE_mesh_vert_coords_alloc(), BKE_mesh_vert_coords_apply(), BKE_mesh_wrapper_ensure_mdata(), BKE_mesh_wrapper_from_editmesh_with_coords(), BKE_modifier_calc_data_masks(), BKE_modifier_deform_verts(), BKE_modifier_deform_vertsEM(), BKE_modifier_get_info(), BKE_modifier_modify_mesh(), BKE_modifiers_clear_errors(), BKE_modifiers_get_cage_index(), BKE_modifiers_get_virtual_modifierlist(), BLI_assert, BLI_linklist_free(), BMEditMesh::bm, CD_CALLOC, CD_MASK_BAREMESH, CD_MASK_ORCO, CD_MASK_ORIGINDEX, CD_MASK_ORIGSPACE_MLOOP, CD_ORCO, CD_ORIGINDEX, CD_ORIGSPACE_MLOOP, create_orco_mesh(), CustomData_add_layer(), CustomData_get_layer(), CustomData_has_layer(), CustomData_MeshMasks_update(), DAG_EVAL_RENDER, Object::data, ModifierTypeInfo::deformVertsEM, DEG_get_mode(), ModifierTypeInfo::dependsOnNormals, depsgraph, BMesh::edata, Mesh_Runtime::edit_data, editbmesh_calc_modifier_final_normals_or_defer(), editbmesh_modifier_is_enabled(), editbmesh_vert_coords_alloc(), eModifierMode_Editmode, eModifierMode_Realtime, eModifierTypeType_OnlyDeform, float(), Mesh::id, LIB_TAG_COPIED_ON_WRITE, mask(), CDMaskLink::mask, MEM_dupallocN, MEM_freeN, mesh_init_origspace(), mesh_set_only_copy(), MOD_APPLY_ORCO, MOD_APPLY_RENDER, MOD_APPLY_USECACHE, Object::mode, modifier_modify_mesh_and_geometry_set(), CDMaskLink::next, ModifierData::next, OB_MODE_EDIT, BMesh::pdata, ModifierTypeInfo::requiredDataMask, Mesh::runtime, scene, ID::tag, ModifierTypeInfo::type, ModifierData::type, EditMeshData::vertexCos, and CustomData_MeshMasks::vmask.

Referenced by editbmesh_build_data().

◆ editbmesh_get_eval_cage()

Mesh* editbmesh_get_eval_cage ( struct Depsgraph depsgraph,
const Scene scene,
Object obedit,
BMEditMesh em,
const CustomData_MeshMasks dataMask 
)

◆ editbmesh_get_eval_cage_from_orig()

Mesh* editbmesh_get_eval_cage_from_orig ( struct Depsgraph depsgraph,
const Scene scene,
Object obedit,
const CustomData_MeshMasks dataMask 
)

◆ editbmesh_modifier_is_enabled()

bool editbmesh_modifier_is_enabled ( const Scene scene,
const Object ob,
ModifierData md,
bool  has_prev_mesh 
)

◆ editbmesh_vert_coords_alloc()

float(* editbmesh_vert_coords_alloc ( BMEditMesh em,
int *  r_vert_len 
) )[3]

◆ get_editbmesh_orco_verts()

static float(* get_editbmesh_orco_verts ( BMEditMesh em) )[3]
static

◆ get_orco_coords()

static float(* get_orco_coords ( Object ob,
BMEditMesh em,
int  layer,
int *  free 
) )[3]
static

◆ make_vertexcos__mapFunc()

static void make_vertexcos__mapFunc ( void userData,
int  index,
const float  co[3],
const float   UNUSEDno[3] 
)
static

◆ makeDerivedMesh()

void makeDerivedMesh ( struct Depsgraph depsgraph,
const Scene scene,
Object ob,
const CustomData_MeshMasks dataMask 
)

◆ mesh_build_data()

static void mesh_build_data ( struct Depsgraph depsgraph,
const Scene scene,
Object ob,
const CustomData_MeshMasks dataMask,
const bool  need_mapping 
)
static

◆ mesh_build_extra_data()

static void mesh_build_extra_data ( struct Depsgraph depsgraph,
Object ob,
Mesh mesh_eval 
)
static

◆ mesh_calc_finalize()

static void mesh_calc_finalize ( const Mesh mesh_input,
Mesh mesh_eval 
)
static

Definition at line 659 of file DerivedMesh.cc.

References BLI_strncpy(), Mesh::edit_mesh, Mesh::id, and ID::name.

Referenced by mesh_calc_modifiers().

◆ mesh_calc_modifier_final_normals()

static void mesh_calc_modifier_final_normals ( const Mesh mesh_input,
const CustomData_MeshMasks final_datamask,
const bool  sculpt_dyntopo,
Mesh mesh_final 
)
static

◆ mesh_calc_modifiers()

static void mesh_calc_modifiers ( struct Depsgraph depsgraph,
const Scene scene,
Object ob,
const bool  use_deform,
const bool  need_mapping,
const CustomData_MeshMasks dataMask,
const bool  use_cache,
const bool  allow_shared_mesh,
Mesh **  r_deform,
Mesh **  r_final,
GeometrySet **  r_geometry_set 
)
static

Definition at line 731 of file DerivedMesh.cc.

References add_orco_mesh(), ASSERT_IS_VALID_MESH, ATTR_DOMAIN_POINT, BKE_id_free(), BKE_mesh_assert_normals_dirty_or_calculated(), BKE_mesh_copy_for_eval(), BKE_mesh_vert_coords_alloc(), BKE_mesh_vert_coords_apply(), BKE_modifier_calc_data_masks(), BKE_modifier_deform_verts(), BKE_modifier_free_temporary_data(), BKE_modifier_get_info(), BKE_modifier_get_last_preview(), BKE_modifier_is_enabled(), BKE_modifier_modify_mesh(), BKE_modifier_set_error(), BKE_modifier_supports_mapping(), BKE_modifiers_clear_errors(), BKE_modifiers_get_virtual_modifierlist(), BKE_sculpt_multires_active(), BLI_assert, BLI_linklist_free(), BLI_mutex_lock(), BLI_mutex_unlock(), SculptSession::bm, CD_CALLOC, CD_CLOTH_ORCO, CD_MASK_BAREMESH_ORIGINDEX, CD_MASK_CLOTH_ORCO, CD_MASK_ORCO, CD_MASK_ORIGINDEX, CD_MASK_ORIGSPACE_MLOOP, CD_MASK_PREVIEW_MLOOPCOL, CD_ORCO, CD_ORIGINDEX, CD_ORIGSPACE_MLOOP, create_orco_mesh(), CustomData_add_layer(), CustomData_free_layers(), CustomData_get_layer(), CustomData_has_layer(), CustomData_MeshMasks_update(), DAG_EVAL_RENDER, Object::data, Mesh_Runtime::deformed_only, DEG_get_mode(), ModifierTypeInfo::dependsOnNormals, depsgraph, Mesh::edata, CustomData_MeshMasks::emask, eModifierMode_Realtime, eModifierMode_Render, eModifierType_DynamicPaint, eModifierType_Multires, eModifierTypeFlag_RequiresOriginalData, eModifierTypeType_OnlyDeform, Mesh_Runtime::eval_mutex, blender::bke::SpanAttributeWriter< T >::finish(), ModifierTypeInfo::flags, Sculpt::flags, float(), CustomData_MeshMasks::fmask, Mesh::id, blender::threading::isolate_task(), Mesh::ldata, LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT, CustomData_MeshMasks::lmask, blender::bke::AttributeAccessor::lookup(), blender::bke::MutableAttributeAccessor::lookup_or_add_for_write_only_span(), mask(), CDMaskLink::mask, MEM_freeN, blender::bke::mesh_attributes_for_write(), mesh_calc_finalize(), mesh_calc_modifier_final_normals(), Mesh_Runtime::mesh_eval, mesh_has_modifier_final_normals(), mesh_init_origspace(), mesh_set_only_copy(), MOD_APPLY_ORCO, MOD_APPLY_RENDER, MOD_APPLY_USECACHE, Object::mode, Object::modifier_flag, modifier_modify_mesh_and_geometry_set(), CDMaskLink::next, ModifierData::next, OB_MODE_OBJECT, OB_MODE_SCULPT, OB_MODIFIER_FLAG_ADD_REST_POSITION, Mesh::pdata, CustomData_MeshMasks::pmask, range_vn_i(), ModifierTypeInfo::requiredDataMask, Mesh::runtime, scene, Object::sculpt, ToolSettings::sculpt, SCULPT_ONLY_DEFORM, blender::bke::SpanAttributeWriter< T >::span, ID::tag, Scene::toolsettings, Mesh::totedge, Mesh::totloop, Mesh::totpoly, Mesh::totvert, ModifierTypeInfo::type, ModifierData::type, Mesh::vdata, and CustomData_MeshMasks::vmask.

Referenced by mesh_build_data(), mesh_create_eval_final(), mesh_create_eval_no_deform(), and mesh_create_eval_no_deform_render().

◆ mesh_create_eval_final()

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

Definition at line 1898 of file DerivedMesh.cc.

References depsgraph, mesh_calc_modifiers(), result, and scene.

◆ mesh_create_eval_no_deform()

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

Definition at line 1909 of file DerivedMesh.cc.

References depsgraph, mesh_calc_modifiers(), result, and scene.

◆ mesh_create_eval_no_deform_render()

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

Definition at line 1920 of file DerivedMesh.cc.

References depsgraph, mesh_calc_modifiers(), result, and scene.

◆ mesh_get_eval_deform()

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

◆ mesh_get_eval_final()

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

◆ mesh_get_mapped_verts_coords()

void mesh_get_mapped_verts_coords ( Mesh me_eval,
float(*)  r_cos[3],
const int  totcos 
)

◆ mesh_has_modifier_final_normals()

static bool mesh_has_modifier_final_normals ( const Mesh mesh_input,
const CustomData_MeshMasks final_datamask,
Mesh mesh_final 
)
static

◆ mesh_init_origspace()

static void mesh_init_origspace ( Mesh mesh)
static

◆ mesh_set_only_copy()

static void mesh_set_only_copy ( Mesh mesh,
const CustomData_MeshMasks mask 
)
static

◆ modifier_modify_mesh_and_geometry_set()

static Mesh* modifier_modify_mesh_and_geometry_set ( ModifierData md,
const ModifierEvalContext mectx,
Mesh input_mesh,
GeometrySet geometry_set 
)
static

Modifies the given mesh and geometry set. The mesh is not passed as part of the mesh component in the geometry_set input, it is only passed in input_mesh and returned in the return value.

The purpose of the geometry set is to store all geometry components that are generated by modifiers to allow outputting non-mesh data from modifiers.

Definition at line 686 of file DerivedMesh.cc.

References BKE_mesh_copy_parameters_for_eval(), BKE_mesh_new_nomain(), BKE_mesh_wrapper_ensure_mdata(), BKE_modifier_get_info(), BKE_modifier_modify_mesh(), Editable, MeshComponent::ensure_owns_direct_data(), GeometrySet::get_component_for_write(), MeshComponent::get_for_read(), GeometrySet::has(), ModifierTypeInfo::modifyGeometrySet, MeshComponent::release(), MeshComponent::replace(), and ModifierData::type.

Referenced by editbmesh_calc_modifiers(), and mesh_calc_modifiers().

◆ object_get_datamask()

static void object_get_datamask ( const Depsgraph depsgraph,
Object ob,
CustomData_MeshMasks r_mask,
bool r_need_mapping 
)
static

Variable Documentation

◆ loops_cache_lock

ThreadRWMutex loops_cache_lock = PTHREAD_RWLOCK_INITIALIZER
static

Definition at line 82 of file DerivedMesh.cc.

Referenced by dm_getLoopTriArray().