65 #ifdef WITH_OPENSUBDIV
75 #ifdef USE_MODIFIER_VALIDATE
76 # define ASSERT_IS_VALID_MESH(mesh) \
77 (BLI_assert((mesh == nullptr) || (BKE_mesh_is_valid(mesh) == true)))
79 # define ASSERT_IS_VALID_MESH(mesh)
151 dm->
getNumVerts(dm),
sizeof(*tmp),
"dm_dupVertArray tmp");
163 dm->
getNumEdges(dm),
sizeof(*tmp),
"dm_dupEdgeArray tmp");
175 dm->
getNumLoops(dm),
sizeof(*tmp),
"dm_dupLoopArray tmp");
187 dm->
getNumPolys(dm),
sizeof(*tmp),
"dm_dupPolyArray tmp");
211 if (looptri !=
nullptr) {
372 if ((looptris_num > dm->
looptris.
num_alloc) || (looptris_num < dm->looptris.num_alloc * 2) ||
395 const int totvert = me_deformed->
totvert;
474 &source->
vertData, &
dest->vertData, src_indices, weights,
nullptr,
count, dest_index);
520 if (kb && kb->
data) {
521 return (
float(*)[3])kb->
data;
560 float(*orco)[3], (*layerorco)[3];
568 if (mesh_orco->
totvert == totvert) {
593 memcpy(layerorco, orco,
sizeof(
float[3]) * totvert);
615 const bool sculpt_dyntopo,
624 if (subsurf_runtime_data) {
628 if (calc_loop_normals) {
631 if (!subsurf_runtime_data || subsurf_runtime_data->
resolution == 0) {
636 if (sculpt_dyntopo ==
false) {
691 Mesh *mesh_output =
nullptr;
718 mesh_output = mesh_component.
release();
722 if (mesh_output ==
nullptr) {
734 const bool use_deform,
735 const bool need_mapping,
737 const bool use_cache,
738 const bool allow_shared_mesh,
750 Mesh *mesh_final =
nullptr;
751 Mesh *mesh_deform =
nullptr;
761 float(*deformed_verts)[3] =
nullptr;
762 int num_deformed_verts = mesh_input->
totvert;
763 bool isPrevDeform =
false;
768 Mesh *mesh_orco =
nullptr;
769 Mesh *mesh_orco_cloth =
nullptr;
777 bool multires_applied =
false;
779 const bool sculpt_dyntopo = (sculpt_mode && ob->
sculpt->
bm) && !use_render;
815 scene, ob, md, &final_datamask, required_mode, previewmd, &previewmask);
824 if (mesh_final ==
nullptr) {
831 if (rest_positions) {
839 for (; md; md = md->
next, md_datamask = md_datamask->
next) {
847 if (!deformed_verts) {
851 if (mesh_final ==
nullptr) {
873 if (deformed_verts) {
880 bool have_non_onlydeform_modifiers_appled =
false;
881 for (; md; md = md->
next, md_datamask = md_datamask->
next) {
893 have_non_onlydeform_modifiers_appled) {
898 if (sculpt_mode && (!has_multires || multires_applied || sculpt_dyntopo)) {
899 bool unsupported =
false;
903 if (!sculpt_dyntopo) {
908 if (sculpt_dyntopo) {
916 unsupported |= multires_applied;
919 if (sculpt_dyntopo) {
947 if (!deformed_verts) {
961 if (mesh_final ==
nullptr) {
970 bool check_for_needs_mapping =
false;
972 if (mesh_final !=
nullptr) {
973 if (have_non_onlydeform_modifiers_appled ==
false) {
976 check_for_needs_mapping =
true;
982 check_for_needs_mapping =
true;
985 if (deformed_verts) {
989 have_non_onlydeform_modifiers_appled =
true;
994 if (check_for_needs_mapping) {
1053 md, mectx, mesh_final, geometry_set_final);
1058 if (mesh_final != mesh_next) {
1062 mesh_final = mesh_next;
1064 if (deformed_verts) {
1066 deformed_verts =
nullptr;
1094 if (mesh_orco != mesh_next) {
1099 mesh_orco = mesh_next;
1105 if (!mesh_orco_cloth) {
1120 if (mesh_orco_cloth != mesh_next) {
1125 mesh_orco_cloth = mesh_next;
1141 multires_applied =
true;
1147 for (md = firstmd; md; md = md->
next) {
1154 if (mesh_final ==
nullptr) {
1155 if (deformed_verts ==
nullptr && allow_shared_mesh) {
1156 mesh_final = mesh_input;
1162 if (deformed_verts) {
1165 deformed_verts =
nullptr;
1170 const bool is_own_mesh = (mesh_final != mesh_input);
1188 if (mesh_orco_cloth) {
1212 mesh_input, &final_datamask, sculpt_dyntopo, mesh_final);
1237 *r_final = mesh_final;
1239 *r_deform = mesh_deform;
1241 if (r_geometry_set) {
1242 *r_geometry_set =
new GeometrySet(std::move(geometry_set_final));
1253 *r_vert_len = em->bm->totvert;
1291 if (subsurf_runtime_data) {
1295 if (calc_loop_normals) {
1298 if (!subsurf_runtime_data || subsurf_runtime_data->
resolution == 0) {
1340 Mesh *mesh_final =
nullptr;
1341 Mesh *mesh_cage =
nullptr;
1349 float(*deformed_verts)[3] =
nullptr;
1350 int num_deformed_verts = 0;
1351 bool isPrevDeform =
false;
1356 Mesh *mesh_orco =
nullptr;
1379 scene, ob, md, &final_datamask, required_mode,
nullptr,
nullptr);
1385 if (r_cage && cageIndex == -1) {
1387 em_input, &final_datamask,
nullptr, mesh_input);
1399 for (
int i = 0; md; i++, md = md->
next, md_datamask = md_datamask->
next) {
1420 if (!deformed_verts) {
1432 if (mesh_final ==
nullptr) {
1443 md, &mectx, em_input, mesh_final, deformed_verts, num_deformed_verts);
1452 if (deformed_verts) {
1454 if (mesh_final != mesh_cage) {
1457 mesh_final = mesh_tmp;
1460 else if (mesh_final == mesh_cage) {
1467 em_input,
nullptr, deformed_verts, mesh_input);
1468 deformed_verts =
nullptr;
1489 if (mesh_orco && mesh_orco != mesh_next) {
1492 mesh_orco = mesh_next;
1516 md, mectx, mesh_final, geometry_set_final);
1520 if (mesh_final && mesh_final != mesh_next) {
1523 mesh_final = mesh_next;
1525 if (deformed_verts) {
1527 deformed_verts =
nullptr;
1530 mesh_final->runtime.deformed_only =
false;
1533 if (r_cage && i == cageIndex) {
1534 if (mesh_final && deformed_verts) {
1538 else if (mesh_final) {
1539 mesh_cage = mesh_final;
1542 Mesh *me_orig = mesh_input;
1554 deformed_verts ? (
const float(*)[3])
MEM_dupallocN(deformed_verts) :
nullptr,
1568 if (deformed_verts) {
1570 if (mesh_final != mesh_cage) {
1573 mesh_final = mesh_tmp;
1577 else if (!deformed_verts && mesh_cage) {
1579 mesh_final = mesh_cage;
1584 em_input, &final_datamask, deformed_verts, mesh_input);
1585 deformed_verts =
nullptr;
1588 if (deformed_verts) {
1606 if (mesh_cage && (mesh_cage != mesh_final)) {
1611 *r_final = mesh_final;
1613 *r_cage = mesh_cage;
1615 if (r_geometry_set) {
1616 *r_geometry_set =
new GeometrySet(std::move(geometry_set_final));
1633 const bool need_mapping)
1644 Mesh *mesh_eval =
nullptr, *mesh_deform_eval =
nullptr;
1656 &geometry_set_eval);
1706 depsgraph,
scene, obedit, em, dataMask, &me_cage, &me_final, &non_mesh_components);
1720 if (me_final != me_cage) {
1740 bool *r_need_mapping)
1746 if (r_need_mapping) {
1747 *r_need_mapping =
false;
1762 if (r_need_mapping) {
1843 if ((mesh_eval ==
nullptr) ||
1864 if (em !=
nullptr) {
1868 BLI_assert_msg(0,
"Request of derformed mesh of object which is in edit mode");
1905 depsgraph,
scene, ob,
true,
false, dataMask,
false,
false,
nullptr, &
result,
nullptr);
1916 depsgraph,
scene, ob,
false,
false, dataMask,
false,
false,
nullptr, &
result,
nullptr);
1927 depsgraph,
scene, ob,
false,
false, dataMask,
false,
false,
nullptr, &
result,
nullptr);
1977 const float UNUSED(no[3]))
1994 memset(r_cos, 0,
sizeof(*r_cos) * totcos);
2002 for (
int i = 0; i < totcos; i++,
mv++) {
2010 const float default_osf[4][2] = {{0, 0}, {1, 0}, {1, 1}, {0, 1}};
2023 for (i = 0; i < numpoly; i++, mp++) {
2027 for (j = 0; j < mp->
totloop; j++, lof++) {
2033 float p_nor[3], co[3];
2036 float min[2] = {FLT_MAX, FLT_MAX},
max[2] = {-FLT_MAX, -FLT_MAX};
2037 float translate[2], scale[2];
2043 for (j = 0; j < mp->
totloop; j++,
l++) {
2047 for (k = 0; k < 2; k++) {
2048 if (co[k] >
max[k]) {
2051 else if (co[k] <
min[k]) {
2062 if (scale[0] == 0.0f) {
2065 if (scale[1] == 0.0f) {
2072 for (j = 0; j < mp->
totloop; j++, lof++) {
typedef float(TangentPoint)[2]
void CustomData_free(struct CustomData *data, int totelem)
const CustomData_MeshMasks CD_MASK_BAREMESH_ORIGINDEX
void CustomData_copy(const struct CustomData *source, struct CustomData *dest, eCustomDataMask mask, eCDAllocType alloctype, int totelem)
void CustomData_free_layers(struct CustomData *data, int type, int totelem)
bool CustomData_has_layer(const struct CustomData *data, int type)
void CustomData_MeshMasks_update(CustomData_MeshMasks *mask_dst, const CustomData_MeshMasks *mask_src)
bool CustomData_MeshMasks_are_matching(const CustomData_MeshMasks *mask_ref, const CustomData_MeshMasks *mask_required)
const CustomData_MeshMasks CD_MASK_BAREMESH
void CustomData_interp(const struct CustomData *source, struct CustomData *dest, const int *src_indices, const float *weights, const float *sub_weights, int count, int dest_index)
void CustomData_set_only_copy(const struct CustomData *data, eCustomDataMask mask)
void * CustomData_get_layer(const struct CustomData *data, int type)
void CustomData_free_temporary(struct CustomData *data, int totelem)
void * CustomData_add_layer(struct CustomData *data, int type, eCDAllocType alloctype, void *layer, int totelem)
void CustomData_set_layer_flag(struct CustomData *data, int type, int flag)
const CustomData_MeshMasks CD_MASK_DERIVEDMESH
void CustomData_copy_data(const struct CustomData *source, struct CustomData *dest, int source_index, int dest_index, int count)
BMEditMesh * BKE_editmesh_from_object(struct Object *ob)
Return the BMEditMesh for a given object.
struct KeyBlock * BKE_keyblock_from_key(struct Key *key, int index)
void BKE_keyblock_convert_from_mesh(const struct Mesh *me, const struct Key *key, struct KeyBlock *kb)
struct Key * BKE_key_from_object(struct Object *ob)
void BKE_id_free(struct Main *bmain, void *idv)
General operations, lookup, etc. for materials.
struct Mesh * BKE_mesh_copy_for_eval(const struct Mesh *source, bool reference)
float(* BKE_mesh_orco_verts_get(struct Object *ob))[3]
void BKE_mesh_tessface_clear(struct Mesh *mesh)
void BKE_mesh_copy_parameters_for_eval(struct Mesh *me_dst, const struct Mesh *me_src)
void BKE_mesh_free_editmesh(struct Mesh *mesh)
void BKE_mesh_vert_coords_apply(struct Mesh *mesh, const float(*vert_coords)[3])
void BKE_mesh_assert_normals_dirty_or_calculated(const struct Mesh *mesh)
struct Mesh * BKE_mesh_new_nomain(int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len)
void BKE_mesh_update_customdata_pointers(struct Mesh *me, bool do_ensure_tess_cd)
struct Mesh * BKE_mesh_from_bmesh_for_eval_nomain(struct BMesh *bm, const struct CustomData_MeshMasks *cd_mask_extra, const struct Mesh *me_settings)
void BKE_mesh_calc_poly_normal(const struct MPoly *mpoly, const struct MLoop *loopstart, const struct MVert *mvarray, float r_no[3])
void BKE_mesh_calc_normals_split(struct Mesh *mesh)
void BKE_mesh_orco_verts_transform(struct Mesh *me, float(*orco)[3], int totvert, int invert)
float(* BKE_mesh_vert_coords_alloc(const struct Mesh *mesh, int *r_vert_len))[3]
void BKE_mesh_ensure_default_orig_index_customdata(struct Mesh *mesh)
void BKE_mesh_ensure_normals_for_display(struct Mesh *mesh)
void BKE_mesh_foreach_mapped_vert(struct Mesh *mesh, void(*func)(void *userData, int index, const float co[3], const float no[3]), void *userData, MeshForeachFlag flag)
bool BKE_mesh_runtime_reset_edit_data(struct Mesh *mesh)
bool BKE_mesh_runtime_ensure_edit_data(struct Mesh *mesh)
void BKE_mesh_wrapper_ensure_mdata(struct Mesh *me)
struct Mesh * BKE_mesh_wrapper_from_editmesh_with_coords(struct BMEditMesh *em, const struct CustomData_MeshMasks *cd_mask_extra, const float(*vert_coords)[3], const struct Mesh *me_settings)
const ModifierTypeInfo * BKE_modifier_get_info(ModifierType type)
void BKE_modifier_deform_vertsEM(ModifierData *md, const struct ModifierEvalContext *ctx, struct BMEditMesh *em, struct Mesh *me, float(*vertexCos)[3], int numVerts)
bool BKE_modifier_is_enabled(const struct Scene *scene, struct ModifierData *md, int required_mode)
struct Mesh * BKE_modifier_modify_mesh(ModifierData *md, const struct ModifierEvalContext *ctx, struct Mesh *me)
@ eModifierTypeFlag_RequiresOriginalData
void BKE_modifier_deform_verts(ModifierData *md, const struct ModifierEvalContext *ctx, struct Mesh *me, float(*vertexCos)[3], int numVerts)
struct ModifierData * BKE_modifier_get_last_preview(const struct Scene *scene, struct ModifierData *md, int required_mode)
struct ModifierData * BKE_modifiers_get_virtual_modifierlist(const struct Object *ob, struct VirtualModifierData *data)
struct ModifierData * BKE_modifiers_findby_type(const struct Object *ob, ModifierType type)
bool BKE_modifier_supports_mapping(struct ModifierData *md)
@ eModifierTypeType_OnlyDeform
void BKE_modifier_free_temporary_data(struct ModifierData *md)
void BKE_modifier_set_error(const struct Object *ob, struct ModifierData *md, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_modifiers_clear_errors(struct Object *ob)
struct CDMaskLink * BKE_modifier_calc_data_masks(const struct Scene *scene, struct Object *ob, struct ModifierData *md, struct CustomData_MeshMasks *final_datamask, int required_mode, ModifierData *previewmd, const struct CustomData_MeshMasks *previewmask)
int BKE_modifiers_get_cage_index(const struct Scene *scene, struct Object *ob, int *r_lastPossibleCageIndex, bool is_virtual)
General operations, lookup, etc. for blender objects.
struct Mesh * BKE_object_get_evaluated_mesh(const struct Object *object)
void BKE_object_free_derived_caches(struct Object *ob)
void BKE_object_boundbox_calc_from_mesh(struct Object *ob, const struct Mesh *me_eval)
void BKE_object_eval_assign_data(struct Object *object, struct ID *data, bool is_owned)
void BKE_sculpt_update_object_before_eval(const struct Scene *scene, struct Object *ob_eval)
struct MultiresModifierData * BKE_sculpt_multires_active(const struct Scene *scene, struct Object *ob)
bool BKE_paint_select_face_test(struct Object *ob)
void BKE_sculpt_update_object_after_eval(struct Depsgraph *depsgraph, struct Object *ob_eval)
void BKE_shrinkwrap_compute_boundary_data(struct Mesh *mesh)
A (mainly) macro array library.
#define BLI_assert_msg(a, msg)
#define BLI_BITMAP_NEW(_num, _alloc_string)
#define BLI_BITMAP_TEST(_bitmap, _index)
#define BLI_BITMAP_ENABLE(_bitmap, _index)
void BLI_kdtree_nd_() free(KDTree *tree)
void BLI_linklist_free(LinkNode *list, LinkNodeFreeFP freefunc)
void axis_dominant_v3_to_m3(float r_mat[3][3], const float normal[3])
Normal to x,y matrix.
MINLINE int poly_to_tri_count(int poly_count, int corner_count)
void mul_v3_m3v3(float r[3], const float M[3][3], const float a[3])
MINLINE void mul_v2_v2(float r[2], const float a[2])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
MINLINE void negate_v2_v2(float r[2], const float a[2])
void range_vn_i(int *array_tar, int size, int start)
void copy_vn_i(int *array_tar, int size, int val)
MINLINE void add_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void sub_v2_v2v2(float r[2], const float a[2], const float b[2])
MINLINE void invert_v2(float r[2])
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
pthread_rwlock_t ThreadRWMutex
#define THREAD_LOCK_WRITE
void BLI_rw_mutex_lock(ThreadRWMutex *mutex, int mode)
void BLI_mutex_lock(ThreadMutex *mutex)
void BLI_mutex_unlock(ThreadMutex *mutex)
void BLI_rw_mutex_unlock(ThreadRWMutex *mutex)
pthread_mutex_t ThreadMutex
struct Depsgraph Depsgraph
bool DEG_is_active(const struct Depsgraph *depsgraph)
bool DEG_is_evaluating(const struct Depsgraph *depsgraph)
@ DAG_EVAL_NEED_SHRINKWRAP_BOUNDARY
eEvaluationMode DEG_get_mode(const Depsgraph *graph)
struct Object * DEG_get_original_object(struct Object *object)
struct ID * DEG_get_evaluated_id(const struct Depsgraph *depsgraph, struct ID *id)
struct ViewLayer * DEG_get_evaluated_view_layer(const struct Depsgraph *graph)
uint32_t DEG_get_eval_flags_for_id(const struct Depsgraph *graph, const struct ID *id)
bool DEG_is_evaluated_id(const struct ID *id)
void DEG_get_customdata_mask_for_object(const struct Depsgraph *graph, struct Object *object, struct CustomData_MeshMasks *r_mask)
@ LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT
@ LIB_TAG_COPIED_ON_WRITE
#define CD_MASK_PROP_BYTE_COLOR
#define CD_MASK_ORIGINDEX
#define CD_MASK_MDEFORMVERT
#define CD_MASK_MVERT_SKIN
#define CD_MASK_ORIGSPACE_MLOOP
#define CD_MASK_CLOTH_ORCO
#define CD_MASK_PREVIEW_MLOOPCOL
@ eModifierType_DynamicPaint
#define OB_MODE_ALL_SCULPT
Object is a sort of wrapper for general info.
@ OB_MODIFIER_FLAG_ADD_REST_POSITION
static float(* get_editbmesh_orco_verts(BMEditMesh *em))[3]
static ThreadRWMutex loops_cache_lock
void mesh_get_mapped_verts_coords(Mesh *me_eval, float(*r_cos)[3], const int totcos)
static float(* get_orco_coords(Object *ob, BMEditMesh *em, int layer, int *free))[3]
Mesh * mesh_get_eval_deform(struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
static void mesh_build_extra_data(struct Depsgraph *depsgraph, Object *ob, Mesh *mesh_eval)
void makeDerivedMesh(struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
static MEdge * dm_getEdgeArray(DerivedMesh *dm)
Mesh * editbmesh_get_eval_cage_from_orig(struct Depsgraph *depsgraph, const Scene *scene, Object *obedit, const CustomData_MeshMasks *dataMask)
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 * DM_get_loop_data_layer(DerivedMesh *dm, int type)
Mesh * mesh_create_eval_no_deform(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
void * DM_get_poly_data_layer(DerivedMesh *dm, int type)
static MEdge * dm_dupEdgeArray(DerivedMesh *dm)
static MVert * dm_dupVertArray(DerivedMesh *dm)
void BKE_mesh_runtime_eval_to_meshkey(Mesh *me_deformed, Mesh *me, KeyBlock *kb)
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_init_origspace(Mesh *mesh)
float(* editbmesh_vert_coords_alloc(BMEditMesh *em, int *r_vert_len))[3]
void DM_init(DerivedMesh *dm, DerivedMeshType type, int numVerts, int numEdges, int numTessFaces, int numLoops, int numPolys)
static MLoop * dm_dupLoopArray(DerivedMesh *dm)
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 int dm_getNumLoopTri(DerivedMesh *dm)
void DM_interp_vert_data(DerivedMesh *source, DerivedMesh *dest, int *src_indices, float *weights, int count, int dest_index)
bool DM_release(DerivedMesh *dm)
void DM_from_template(DerivedMesh *dm, DerivedMesh *source, DerivedMeshType type, int numVerts, int numEdges, int numTessFaces, int numLoops, int numPolys)
void DM_ensure_looptri_data(DerivedMesh *dm)
static void make_vertexcos__mapFunc(void *userData, int index, const float co[3], const float UNUSED(no[3]))
static MPoly * dm_getPolyArray(DerivedMesh *dm)
Mesh * editbmesh_get_eval_cage(struct Depsgraph *depsgraph, const Scene *scene, Object *obedit, BMEditMesh *em, const CustomData_MeshMasks *dataMask)
static void editbmesh_calc_modifier_final_normals_or_defer(Mesh *mesh_final, const CustomData_MeshMasks *final_datamask)
bool editbmesh_modifier_is_enabled(const Scene *scene, const Object *ob, ModifierData *md, bool has_prev_mesh)
void * DM_get_edge_data_layer(DerivedMesh *dm, int type)
static bool mesh_has_modifier_final_normals(const Mesh *mesh_input, const CustomData_MeshMasks *final_datamask, Mesh *mesh_final)
static void mesh_build_data(struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask, const bool need_mapping)
static MPoly * dm_dupPolyArray(DerivedMesh *dm)
static void object_get_datamask(const Depsgraph *depsgraph, Object *ob, CustomData_MeshMasks *r_mask, bool *r_need_mapping)
static MVert * dm_getVertArray(DerivedMesh *dm)
void DM_DupPolys(DerivedMesh *source, DerivedMesh *target)
void DM_copy_vert_data(DerivedMesh *source, DerivedMesh *dest, int source_index, int dest_index, int count)
void DM_init_funcs(DerivedMesh *dm)
static void mesh_set_only_copy(Mesh *mesh, const CustomData_MeshMasks *mask)
static void add_orco_mesh(Object *ob, BMEditMesh *em, Mesh *mesh, Mesh *mesh_orco, int layer)
static void editbmesh_calc_modifier_final_normals(Mesh *mesh_final, const CustomData_MeshMasks *final_datamask)
static const MLoopTri * dm_getLoopTriArray(DerivedMesh *dm)
Mesh * mesh_create_eval_no_deform_render(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
#define ASSERT_IS_VALID_MESH(mesh)
static Mesh * modifier_modify_mesh_and_geometry_set(ModifierData *md, const ModifierEvalContext &mectx, Mesh *input_mesh, GeometrySet &geometry_set)
void * DM_get_vert_data_layer(DerivedMesh *dm, int type)
static MLoop * dm_getLoopArray(DerivedMesh *dm)
static Mesh * create_orco_mesh(Object *ob, Mesh *me, BMEditMesh *em, int layer)
Mesh * mesh_get_eval_final(struct Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
static void editbmesh_build_data(struct Depsgraph *depsgraph, const Scene *scene, Object *obedit, BMEditMesh *em, CustomData_MeshMasks *dataMask)
Mesh * mesh_create_eval_final(Depsgraph *depsgraph, const Scene *scene, Object *ob, const CustomData_MeshMasks *dataMask)
void BKE_mesh_wrapper_deferred_finalize_mdata(Mesh *me_eval, const CustomData_MeshMasks *cd_mask_finalize)
void DM_set_only_copy(DerivedMesh *dm, const CustomData_MeshMasks *mask)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Read Guarded memory(de)allocation.
#define BM_ITER_MESH_INDEX(ele, iter, bm, itype, indexvar)
ATTR_WARN_UNUSED_RESULT const BMLoop * l
const Mesh * get_for_read() const
void replace(Mesh *mesh, GeometryOwnershipType ownership=GeometryOwnershipType::Owned)
void ensure_owns_direct_data() override
void resize(const int64_t new_size)
GAttributeReader lookup(const AttributeIDRef &attribute_id) const
GSpanAttributeWriter lookup_or_add_for_write_only_span(const AttributeIDRef &attribute_id, const eAttrDomain domain, const eCustomDataType data_type)
const Depsgraph * depsgraph
void *(* MEM_malloc_arrayN)(size_t len, size_t size, const char *str)
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
ccl_device_inline float4 mask(const int4 &mask, const float4 &a)
INLINE Rall1d< T, V, S > cos(const Rall1d< T, V, S > &arg)
MutableAttributeAccessor mesh_attributes_for_write(Mesh &mesh)
void isolate_task(const Function &function)
vec_base< float, 3 > float3
struct CustomData_MeshMasks mask
struct ClothSimSettings * sim_parms
struct MLoop *(* getLoopArray)(DerivedMesh *dm)
void *(* getVertDataArray)(DerivedMesh *dm, int type)
struct MPoly *(* dupPolyArray)(DerivedMesh *dm)
struct MVert *(* getVertArray)(DerivedMesh *dm)
void(* copyLoopArray)(DerivedMesh *dm, struct MLoop *r_loop)
void(* copyEdgeArray)(DerivedMesh *dm, struct MEdge *r_edge)
int(* getNumVerts)(DerivedMesh *dm)
const struct MLoopTri *(* getLoopTriArray)(DerivedMesh *dm)
int(* getNumLoopTri)(DerivedMesh *dm)
void(* copyPolyArray)(DerivedMesh *dm, struct MPoly *r_poly)
int(* getNumPolys)(DerivedMesh *dm)
struct MEdge *(* dupEdgeArray)(DerivedMesh *dm)
int(* getNumEdges)(DerivedMesh *dm)
struct DerivedMesh::@16 looptris
void *(* getLoopDataArray)(DerivedMesh *dm, int type)
struct MLoop *(* dupLoopArray)(DerivedMesh *dm)
struct MVert *(* dupVertArray)(DerivedMesh *dm)
struct MLoopTri * array_wip
void(* copyVertArray)(DerivedMesh *dm, struct MVert *r_vert)
void *(* getPolyDataArray)(DerivedMesh *dm, int type)
void *(* getEdgeDataArray)(DerivedMesh *dm, int type)
struct MEdge *(* getEdgeArray)(DerivedMesh *dm)
struct MPoly *(* getPolyArray)(DerivedMesh *dm)
void(* recalcLoopTri)(DerivedMesh *dm)
int(* getNumLoops)(DerivedMesh *dm)
const float(* vertexCos)[3]
GeometryComponent & get_component_for_write(GeometryComponentType component_type)
bool has(const GeometryComponentType component_type) const
BLI_bitmap * vertex_visit
struct SubsurfRuntimeData * subsurf_runtime_data
struct EditMeshData * edit_data
char wrapper_type_finalize
struct BMEditMesh * edit_mesh
struct ModifierData * next
void(* modifyGeometrySet)(struct ModifierData *md, const struct ModifierEvalContext *ctx, struct GeometrySet *geometry_set)
void(* deformVertsEM)(struct ModifierData *md, const struct ModifierEvalContext *ctx, struct BMEditMesh *editData, struct Mesh *mesh, float(*vertexCos)[3], int numVerts)
void(* requiredDataMask)(struct Object *ob, struct ModifierData *md, struct CustomData_MeshMasks *r_cddata_masks)
bool(* dependsOnNormals)(struct ModifierData *md)
CustomData_MeshMasks last_data_mask
struct Mesh * editmesh_eval_cage
struct Mesh * mesh_deform_eval
struct GeometrySet * geometry_set_eval
struct SculptSession * sculpt
struct ToolSettings * toolsettings
MutableVArraySpan< T > span