|
Blender
V2.93
|
Go to the source code of this file.
Classes | |
| struct | MLoopNorSpace |
| struct | MLoopNorSpaceArray |
Macros | |
| #define | BKE_MESH_OMP_LIMIT 10000 |
Typedefs | |
| typedef struct MLoopNorSpace | MLoopNorSpace |
| typedef struct MLoopNorSpaceArray | MLoopNorSpaceArray |
Enumerations | |
| enum | { MLNOR_SPACE_IS_SINGLE = 1 << 0 } |
| enum | { MLNOR_SPACEARR_LOOP_INDEX = 0 , MLNOR_SPACEARR_BMLOOP_PTR = 1 } |
| enum | { MESH_MERGE_VERTS_DUMP_IF_MAPPED , MESH_MERGE_VERTS_DUMP_IF_EQUAL } |
Functions | |
| struct BMesh * | BKE_mesh_to_bmesh_ex (const struct Mesh *me, const struct BMeshCreateParams *create_params, const struct BMeshFromMeshParams *convert_params) |
| struct BMesh * | BKE_mesh_to_bmesh (struct Mesh *me, struct Object *ob, const bool add_key_index, const struct BMeshCreateParams *params) |
| struct Mesh * | BKE_mesh_from_bmesh_nomain (struct BMesh *bm, const struct BMeshToMeshParams *params, const struct Mesh *me_settings) |
| struct Mesh * | BKE_mesh_from_bmesh_for_eval_nomain (struct BMesh *bm, const struct CustomData_MeshMasks *cd_mask_extra, const struct Mesh *me_settings) |
| int | poly_find_loop_from_vert (const struct MPoly *poly, const struct MLoop *loopstart, uint vert) |
| int | poly_get_adj_loops_from_vert (const struct MPoly *poly, const struct MLoop *mloop, unsigned int vert, unsigned int r_adj[2]) |
| int | BKE_mesh_edge_other_vert (const struct MEdge *e, int v) |
| void | BKE_mesh_looptri_get_real_edges (const struct Mesh *mesh, const struct MLoopTri *looptri, int r_edges[3]) |
| void | BKE_mesh_free_data (struct Mesh *me) |
| void | BKE_mesh_clear_geometry (struct Mesh *me) |
| struct Mesh * | BKE_mesh_add (struct Main *bmain, const char *name) |
| void | BKE_mesh_copy_settings (struct Mesh *me_dst, const struct Mesh *me_src) |
| void | BKE_mesh_update_customdata_pointers (struct Mesh *me, const bool do_ensure_tess_cd) |
| void | BKE_mesh_ensure_skin_customdata (struct Mesh *me) |
| struct Mesh * | BKE_mesh_new_nomain (int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len) |
| struct Mesh * | BKE_mesh_new_nomain_from_template (const struct Mesh *me_src, int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len) |
| struct Mesh * | BKE_mesh_new_nomain_from_template_ex (const struct Mesh *me_src, int verts_len, int edges_len, int tessface_len, int loops_len, int polys_len, struct CustomData_MeshMasks mask) |
| void | BKE_mesh_eval_delete (struct Mesh *mesh_eval) |
| struct Mesh * | BKE_mesh_copy_for_eval (struct Mesh *source, bool reference) |
| struct Mesh * | BKE_mesh_new_nomain_from_curve (struct Object *ob) |
| struct Mesh * | BKE_mesh_new_nomain_from_curve_displist (struct Object *ob, struct ListBase *dispbase) |
| bool | BKE_mesh_ensure_facemap_customdata (struct Mesh *me) |
| bool | BKE_mesh_clear_facemap_customdata (struct Mesh *me) |
| float(* | BKE_mesh_orco_verts_get (struct Object *ob))[3] |
| void | BKE_mesh_orco_verts_transform (struct Mesh *me, float(*orco)[3], int totvert, int invert) |
| int | test_index_face (struct MFace *mface, struct CustomData *mfdata, int mfindex, int nr) |
| struct Mesh * | BKE_mesh_from_object (struct Object *ob) |
| void | BKE_mesh_assign_object (struct Main *bmain, struct Object *ob, struct Mesh *me) |
| void | BKE_mesh_from_metaball (struct ListBase *lb, struct Mesh *me) |
| int | BKE_mesh_nurbs_to_mdata (struct Object *ob, struct MVert **r_allvert, int *r_totvert, struct MEdge **r_alledge, int *r_totedge, struct MLoop **r_allloop, struct MPoly **r_allpoly, int *r_totloop, int *r_totpoly) |
| int | BKE_mesh_nurbs_displist_to_mdata (struct Object *ob, const struct ListBase *dispbase, struct MVert **r_allvert, int *r_totvert, struct MEdge **r_alledge, int *r_totedge, struct MLoop **r_allloop, struct MPoly **r_allpoly, struct MLoopUV **r_alluv, int *r_totloop, int *r_totpoly) |
| void | BKE_mesh_from_nurbs_displist (struct Main *bmain, struct Object *ob, struct ListBase *dispbase, const char *obdata_name, bool temporary) |
| void | BKE_mesh_from_nurbs (struct Main *bmain, struct Object *ob) |
| void | BKE_mesh_to_curve_nurblist (const struct Mesh *me, struct ListBase *nurblist, const int edge_users_test) |
| void | BKE_mesh_to_curve (struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob) |
| void | BKE_pointcloud_from_mesh (struct Mesh *me, struct PointCloud *pointcloud) |
| void | BKE_mesh_to_pointcloud (struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob) |
| void | BKE_mesh_from_pointcloud (const struct PointCloud *pointcloud, struct Mesh *me) |
| void | BKE_pointcloud_to_mesh (struct Main *bmain, struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob) |
| void | BKE_mesh_material_index_remove (struct Mesh *me, short index) |
| bool | BKE_mesh_material_index_used (struct Mesh *me, short index) |
| void | BKE_mesh_material_index_clear (struct Mesh *me) |
| void | BKE_mesh_material_remap (struct Mesh *me, const unsigned int *remap, unsigned int remap_len) |
| void | BKE_mesh_smooth_flag_set (struct Mesh *me, const bool use_smooth) |
| void | BKE_mesh_edges_set_draw_render (struct Mesh *me) |
| const char * | BKE_mesh_cmp (struct Mesh *me1, struct Mesh *me2, float thresh) |
| struct BoundBox * | BKE_mesh_boundbox_get (struct Object *ob) |
| void | BKE_mesh_texspace_calc (struct Mesh *me) |
| void | BKE_mesh_texspace_ensure (struct Mesh *me) |
| void | BKE_mesh_texspace_get (struct Mesh *me, float r_loc[3], float r_size[3]) |
| void | BKE_mesh_texspace_get_reference (struct Mesh *me, short **r_texflag, float **r_loc, float **r_size) |
| void | BKE_mesh_texspace_copy_from_object (struct Mesh *me, struct Object *ob) |
| void | BKE_mesh_split_faces (struct Mesh *mesh, bool free_loop_normals) |
| struct Mesh * | BKE_mesh_new_from_object (struct Depsgraph *depsgraph, struct Object *object, const bool preserve_all_data_layers, const bool preserve_origindex) |
| struct Mesh * | BKE_mesh_new_from_object_to_bmain (struct Main *bmain, struct Depsgraph *depsgraph, struct Object *object, bool preserve_all_data_layers) |
| struct Mesh * | BKE_mesh_create_derived_for_modifier (struct Depsgraph *depsgraph, struct Scene *scene, struct Object *ob_eval, struct ModifierData *md_eval, const bool build_shapekey_layers) |
| void | BKE_mesh_nomain_to_mesh (struct Mesh *mesh_src, struct Mesh *mesh_dst, struct Object *ob, const struct CustomData_MeshMasks *mask, bool take_ownership) |
| void | BKE_mesh_nomain_to_meshkey (struct Mesh *mesh_src, struct Mesh *mesh_dst, struct KeyBlock *kb) |
| bool | BKE_mesh_minmax (const struct Mesh *me, float r_min[3], float r_max[3]) |
| void | BKE_mesh_transform (struct Mesh *me, const float mat[4][4], bool do_keys) |
| void | BKE_mesh_translate (struct Mesh *me, const float offset[3], const bool do_keys) |
| void | BKE_mesh_tessface_calc (struct Mesh *mesh) |
| void | BKE_mesh_tessface_ensure (struct Mesh *mesh) |
| void | BKE_mesh_tessface_clear (struct Mesh *mesh) |
| void | BKE_mesh_do_versions_cd_flag_init (struct Mesh *mesh) |
| void | BKE_mesh_mselect_clear (struct Mesh *me) |
| void | BKE_mesh_mselect_validate (struct Mesh *me) |
| int | BKE_mesh_mselect_find (struct Mesh *me, int index, int type) |
| int | BKE_mesh_mselect_active_get (struct Mesh *me, int type) |
| void | BKE_mesh_mselect_active_set (struct Mesh *me, int index, int type) |
| void | BKE_mesh_count_selected_items (const struct Mesh *mesh, int r_count[3]) |
| float(* | BKE_mesh_vert_coords_alloc (const struct Mesh *mesh, int *r_vert_len))[3] |
| void | BKE_mesh_vert_coords_get (const struct Mesh *mesh, float(*vert_coords)[3]) |
| void | BKE_mesh_vert_coords_apply_with_mat4 (struct Mesh *mesh, const float(*vert_coords)[3], const float mat[4][4]) |
| void | BKE_mesh_vert_coords_apply (struct Mesh *mesh, const float(*vert_coords)[3]) |
| void | BKE_mesh_vert_normals_apply (struct Mesh *mesh, const short(*vert_normals)[3]) |
| void | BKE_mesh_calc_normals_mapping_simple (struct Mesh *me) |
| void | BKE_mesh_calc_normals_mapping (struct MVert *mverts, int numVerts, const struct MLoop *mloop, const struct MPoly *mpolys, int numLoops, int numPolys, float(*r_polyNors)[3], const struct MFace *mfaces, int numFaces, const int *origIndexFace, float(*r_faceNors)[3]) |
| void | BKE_mesh_calc_normals_mapping_ex (struct MVert *mverts, int numVerts, const struct MLoop *mloop, const struct MPoly *mpolys, int numLoops, int numPolys, float(*r_polyNors)[3], const struct MFace *mfaces, int numFaces, const int *origIndexFace, float(*r_faceNors)[3], const bool only_face_normals) |
| void | BKE_mesh_calc_normals_poly (struct MVert *mverts, float(*r_vertnors)[3], int numVerts, const struct MLoop *mloop, const struct MPoly *mpolys, int numLoops, int numPolys, float(*r_polyNors)[3], const bool only_face_normals) |
| void | BKE_mesh_calc_normals (struct Mesh *me) |
| void | BKE_mesh_ensure_normals (struct Mesh *me) |
| void | BKE_mesh_ensure_normals_for_display (struct Mesh *mesh) |
| void | BKE_mesh_calc_normals_looptri (struct MVert *mverts, int numVerts, const struct MLoop *mloop, const struct MLoopTri *looptri, int looptri_num, float(*r_tri_nors)[3]) |
| void | BKE_mesh_loop_manifold_fan_around_vert_next (const struct MLoop *mloops, const struct MPoly *mpolys, const int *loop_to_poly, const int *e2lfan_curr, const uint mv_pivot_index, const struct MLoop **r_mlfan_curr, int *r_mlfan_curr_index, int *r_mlfan_vert_index, int *r_mpfan_curr_index) |
| void | BKE_edges_sharp_from_angle_set (const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, const float split_angle) |
| void | BKE_lnor_spacearr_init (MLoopNorSpaceArray *lnors_spacearr, const int numLoops, const char data_type) |
| void | BKE_lnor_spacearr_clear (MLoopNorSpaceArray *lnors_spacearr) |
| void | BKE_lnor_spacearr_free (MLoopNorSpaceArray *lnors_spacearr) |
| MLoopNorSpace * | BKE_lnor_space_create (MLoopNorSpaceArray *lnors_spacearr) |
| void | BKE_lnor_space_define (MLoopNorSpace *lnor_space, const float lnor[3], float vec_ref[3], float vec_other[3], struct BLI_Stack *edge_vectors) |
| void | BKE_lnor_space_add_loop (MLoopNorSpaceArray *lnors_spacearr, MLoopNorSpace *lnor_space, const int ml_index, void *bm_loop, const bool is_single) |
| void | BKE_lnor_space_custom_data_to_normal (MLoopNorSpace *lnor_space, const short clnor_data[2], float r_custom_lnor[3]) |
| void | BKE_lnor_space_custom_normal_to_data (MLoopNorSpace *lnor_space, const float custom_lnor[3], short r_clnor_data[2]) |
| void | BKE_mesh_normals_loop_split (const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, float(*r_loopnors)[3], const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, const bool use_split_normals, const float split_angle, MLoopNorSpaceArray *r_lnors_spacearr, short(*clnors_data)[2], int *r_loop_to_poly) |
| void | BKE_mesh_normals_loop_custom_set (const struct MVert *mverts, const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, float(*r_custom_loopnors)[3], const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, short(*r_clnors_data)[2]) |
| void | BKE_mesh_normals_loop_custom_from_vertices_set (const struct MVert *mverts, float(*r_custom_vertnors)[3], const int numVerts, struct MEdge *medges, const int numEdges, struct MLoop *mloops, const int numLoops, struct MPoly *mpolys, const float(*polynors)[3], const int numPolys, short(*r_clnors_data)[2]) |
| void | BKE_mesh_normals_loop_to_vertex (const int numVerts, const struct MLoop *mloops, const int numLoops, const float(*clnors)[3], float(*r_vert_clnors)[3]) |
| bool | BKE_mesh_has_custom_loop_normals (struct Mesh *me) |
| void | BKE_mesh_calc_normals_split (struct Mesh *mesh) |
| void | BKE_mesh_calc_normals_split_ex (struct Mesh *mesh, struct MLoopNorSpaceArray *r_lnors_spacearr) |
| void | BKE_mesh_set_custom_normals (struct Mesh *mesh, float(*r_custom_loopnors)[3]) |
| void | BKE_mesh_set_custom_normals_from_vertices (struct Mesh *mesh, float(*r_custom_vertnors)[3]) |
| 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_poly_normal_coords (const struct MPoly *mpoly, const struct MLoop *loopstart, const float(*vertex_coords)[3], float r_no[3]) |
| void | BKE_mesh_calc_poly_center (const struct MPoly *mpoly, const struct MLoop *loopstart, const struct MVert *mvarray, float r_cent[3]) |
| float | BKE_mesh_calc_poly_area (const struct MPoly *mpoly, const struct MLoop *loopstart, const struct MVert *mvarray) |
| float | BKE_mesh_calc_area (const struct Mesh *me) |
| float | BKE_mesh_calc_poly_uv_area (const struct MPoly *mpoly, const struct MLoopUV *uv_array) |
| void | BKE_mesh_calc_poly_angles (const struct MPoly *mpoly, const struct MLoop *loopstart, const struct MVert *mvarray, float angles[]) |
| void | BKE_mesh_poly_edgehash_insert (struct EdgeHash *ehash, const struct MPoly *mp, const struct MLoop *mloop) |
| void | BKE_mesh_poly_edgebitmap_insert (unsigned int *edge_bitmap, const struct MPoly *mp, const struct MLoop *mloop) |
| bool | BKE_mesh_center_median (const struct Mesh *me, float r_cent[3]) |
| bool | BKE_mesh_center_median_from_polys (const struct Mesh *me, float r_cent[3]) |
| bool | BKE_mesh_center_bounds (const struct Mesh *me, float r_cent[3]) |
| bool | BKE_mesh_center_of_surface (const struct Mesh *me, float r_cent[3]) |
| bool | BKE_mesh_center_of_volume (const struct Mesh *me, float r_cent[3]) |
| void | BKE_mesh_calc_volume (const struct MVert *mverts, const int mverts_num, const struct MLoopTri *mlooptri, const int looptri_num, const struct MLoop *mloop, float *r_volume, float r_center[3]) |
| void | BKE_mesh_loops_to_mface_corners (struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, unsigned int lindex[4], int findex, const int polyindex, const int mf_len, const int numUV, const int numCol, const bool hasPCol, const bool hasOrigSpace, const bool hasLNor) |
| void | BKE_mesh_loops_to_tessdata (struct CustomData *fdata, struct CustomData *ldata, struct MFace *mface, const int *polyindices, unsigned int(*loopindices)[4], const int num_faces) |
| void | BKE_mesh_tangent_loops_to_tessdata (struct CustomData *fdata, struct CustomData *ldata, struct MFace *mface, const int *polyindices, unsigned int(*loopindices)[4], const int num_faces, const char *layer_name) |
| int | BKE_mesh_tessface_calc_ex (struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, struct MVert *mvert, int totface, int totloop, int totpoly, const bool do_face_nor_copy) |
| void | BKE_mesh_recalc_looptri (const struct MLoop *mloop, const struct MPoly *mpoly, const struct MVert *mvert, int totloop, int totpoly, struct MLoopTri *mlooptri) |
| void | BKE_mesh_convert_mfaces_to_mpolys (struct Mesh *mesh) |
| void | BKE_mesh_do_versions_convert_mfaces_to_mpolys (struct Mesh *mesh) |
| void | BKE_mesh_convert_mfaces_to_mpolys_ex (struct ID *id, struct CustomData *fdata, struct CustomData *ldata, struct CustomData *pdata, int totedge_i, int totface_i, int totloop_i, int totpoly_i, struct MEdge *medge, struct MFace *mface, int *r_totloop, int *r_totpoly, struct MLoop **r_mloop, struct MPoly **r_mpoly) |
| void | BKE_mesh_mdisp_flip (struct MDisps *md, const bool use_loop_mdisp_flip) |
| void | BKE_mesh_polygon_flip_ex (struct MPoly *mpoly, struct MLoop *mloop, struct CustomData *ldata, float(*lnors)[3], struct MDisps *mdisp, const bool use_loop_mdisp_flip) |
| void | BKE_mesh_polygon_flip (struct MPoly *mpoly, struct MLoop *mloop, struct CustomData *ldata) |
| void | BKE_mesh_polygons_flip (struct MPoly *mpoly, struct MLoop *mloop, struct CustomData *ldata, int totpoly) |
| struct Mesh * | BKE_mesh_merge_verts (struct Mesh *mesh, const int *vtargetmap, const int tot_vtargetmap, const int merge_mode) |
| void | BKE_mesh_flush_hidden_from_verts_ex (const struct MVert *mvert, const struct MLoop *mloop, struct MEdge *medge, const int totedge, struct MPoly *mpoly, const int totpoly) |
| void | BKE_mesh_flush_hidden_from_verts (struct Mesh *me) |
| void | BKE_mesh_flush_hidden_from_polys_ex (struct MVert *mvert, const struct MLoop *mloop, struct MEdge *medge, const int totedge, const struct MPoly *mpoly, const int totpoly) |
| void | BKE_mesh_flush_hidden_from_polys (struct Mesh *me) |
| void | BKE_mesh_flush_select_from_polys_ex (struct MVert *mvert, const int totvert, const struct MLoop *mloop, struct MEdge *medge, const int totedge, const struct MPoly *mpoly, const int totpoly) |
| void | BKE_mesh_flush_select_from_polys (struct Mesh *me) |
| void | BKE_mesh_flush_select_from_verts_ex (const struct MVert *mvert, const int totvert, const struct MLoop *mloop, struct MEdge *medge, const int totedge, struct MPoly *mpoly, const int totpoly) |
| void | BKE_mesh_flush_select_from_verts (struct Mesh *me) |
| void | BKE_mesh_calc_relative_deform (const struct MPoly *mpoly, const int totpoly, const struct MLoop *mloop, const int totvert, const float(*vert_cos_src)[3], const float(*vert_cos_dst)[3], const float(*vert_cos_org)[3], float(*vert_cos_new)[3]) |
| bool | BKE_mesh_validate (struct Mesh *me, const bool do_verbose, const bool cddata_check_mask) |
| bool | BKE_mesh_is_valid (struct Mesh *me) |
| bool | BKE_mesh_validate_material_indices (struct Mesh *me) |
| bool | BKE_mesh_validate_arrays (struct Mesh *me, struct MVert *mverts, unsigned int totvert, struct MEdge *medges, unsigned int totedge, struct MFace *mfaces, unsigned int totface, struct MLoop *mloops, unsigned int totloop, struct MPoly *mpolys, unsigned int totpoly, struct MDeformVert *dverts, const bool do_verbose, const bool do_fixes, bool *r_change) |
| bool | BKE_mesh_validate_all_customdata (struct CustomData *vdata, const uint totvert, struct CustomData *edata, const uint totedge, struct CustomData *ldata, const uint totloop, struct CustomData *pdata, const uint totpoly, const bool check_meshmask, const bool do_verbose, const bool do_fixes, bool *r_change) |
| void | BKE_mesh_strip_loose_faces (struct Mesh *me) |
| void | BKE_mesh_strip_loose_polysloops (struct Mesh *me) |
| void | BKE_mesh_strip_loose_edges (struct Mesh *me) |
| void | BKE_mesh_calc_edges_legacy (struct Mesh *me, const bool use_old) |
| void | BKE_mesh_calc_edges_loose (struct Mesh *mesh) |
| void | BKE_mesh_calc_edges (struct Mesh *mesh, bool keep_existing_edges, const bool select_new_edges) |
| void | BKE_mesh_calc_edges_tessface (struct Mesh *mesh) |
| void | BKE_mesh_wrapper_deferred_finalize (struct Mesh *me_eval, const CustomData_MeshMasks *cd_mask_finalize) |
| void | BKE_mesh_eval_geometry (struct Depsgraph *depsgraph, struct Mesh *mesh) |
| void | BKE_mesh_batch_cache_dirty_tag (struct Mesh *me, eMeshBatchDirtyMode mode) |
| void | BKE_mesh_batch_cache_free (struct Mesh *me) |
| BLI_INLINE int | BKE_mesh_origindex_mface_mpoly (const int *index_mf_to_mpoly, const int *index_mp_to_orig, const int i) |
Variables | |
| void(* | BKE_mesh_batch_cache_dirty_tag_cb )(struct Mesh *me, eMeshBatchDirtyMode mode) |
| void(* | BKE_mesh_batch_cache_free_cb )(struct Mesh *me) |
| #define BKE_MESH_OMP_LIMIT 10000 |
Definition at line 67 of file BKE_mesh.h.
| typedef struct MLoopNorSpace MLoopNorSpace |
References a contiguous loop-fan with normal offset vars.
| typedef struct MLoopNorSpaceArray MLoopNorSpaceArray |
Collection of MLoopNorSpace basic storage & pre-allocation.
| anonymous enum |
| anonymous enum |
| Enumerator | |
|---|---|
| MLNOR_SPACEARR_LOOP_INDEX | |
| MLNOR_SPACEARR_BMLOOP_PTR | |
Definition at line 382 of file BKE_mesh.h.
| anonymous enum |
| Enumerator | |
|---|---|
| MESH_MERGE_VERTS_DUMP_IF_MAPPED | |
| MESH_MERGE_VERTS_DUMP_IF_EQUAL | |
Definition at line 584 of file BKE_mesh.h.
| void BKE_edges_sharp_from_angle_set | ( | const struct MVert * | mverts, |
| const int | numVerts, | ||
| struct MEdge * | medges, | ||
| const int | numEdges, | ||
| struct MLoop * | mloops, | ||
| const int | numLoops, | ||
| struct MPoly * | mpolys, | ||
| const float(*) | polynors[3], | ||
| const int | numPolys, | ||
| const float | split_angle | ||
| ) |
Referenced by mesh_customdata_custom_splitnormals_add_exec().
| void BKE_lnor_space_add_loop | ( | MLoopNorSpaceArray * | lnors_spacearr, |
| MLoopNorSpace * | lnor_space, | ||
| const int | ml_index, | ||
| void * | bm_loop, | ||
| const bool | is_single | ||
| ) |
Add a new given loop to given lnor_space. Depending on lnor_space->data_type, we expect bm_loop to be a pointer to BMLoop struct (in case of BMLOOP_PTR), or NULL (in case of LOOP_INDEX), loop index is then stored in pointer. If is_single is set, the BMLoop or loop index is directly stored in lnor_space->loops pointer (since there is only one loop in this fan), else it is added to the linked list of loops in the fan.
Definition at line 652 of file mesh_evaluate.c.
References BLI_assert, BLI_linklist_prepend_nlink(), MLoopNorSpaceArray::data_type, MLoopNorSpace::flags, MLoopNorSpace::loops, MLoopNorSpaceArray::loops_pool, MLoopNorSpaceArray::lspacearr, MLNOR_SPACE_IS_SINGLE, MLNOR_SPACEARR_BMLOOP_PTR, MLNOR_SPACEARR_LOOP_INDEX, NULL, and POINTER_FROM_INT.
Referenced by bm_mesh_loops_calc_normals(), split_loop_nor_fan_do(), and split_loop_nor_single_do().
| MLoopNorSpace* BKE_lnor_space_create | ( | MLoopNorSpaceArray * | lnors_spacearr | ) |
Definition at line 558 of file mesh_evaluate.c.
References BLI_memarena_calloc(), MLoopNorSpaceArray::mem, and MLoopNorSpaceArray::num_spaces.
Referenced by bm_mesh_loops_calc_normals(), and loop_split_generator().
| void BKE_lnor_space_custom_data_to_normal | ( | MLoopNorSpace * | lnor_space, |
| const short | clnor_data[2], | ||
| float | r_custom_lnor[3] | ||
| ) |
Definition at line 687 of file mesh_evaluate.c.
References alpha, beta(), copy_v3_v3(), cosf, float(), M_PI, madd_v3_v3fl(), mul_v3_v3fl(), MLoopNorSpace::ref_alpha, MLoopNorSpace::ref_beta, sinf, unit_short_to_float(), MLoopNorSpace::vec_lnor, MLoopNorSpace::vec_ortho, and MLoopNorSpace::vec_ref.
Referenced by BM_custom_loop_normals_to_vector_layer(), BM_lnorspace_rebuild(), bm_mesh_loops_calc_normals(), edbm_average_normals_exec(), edbm_smooth_normals_exec(), loop_normal_editdata_init(), split_loop_nor_fan_do(), and split_loop_nor_single_do().
| void BKE_lnor_space_custom_normal_to_data | ( | MLoopNorSpace * | lnor_space, |
| const float | custom_lnor[3], | ||
| short | r_clnor_data[2] | ||
| ) |
Definition at line 721 of file mesh_evaluate.c.
References add_v3_v3(), alpha, beta(), compare_v3v3(), dot_v3v3(), float(), is_zero_v3(), LNOR_SPACE_TRIGO_THRESHOLD, M_PI, mul_v3_v3fl(), normalize_v3(), MLoopNorSpace::ref_alpha, MLoopNorSpace::ref_beta, saacosf(), unit_float_to_short(), MLoopNorSpace::vec_lnor, MLoopNorSpace::vec_ortho, and MLoopNorSpace::vec_ref.
Referenced by applyNormalRotation(), bevel_harden_normals(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BM_lnorspace_rebuild(), bm_mesh_loops_assign_normal_data(), edbm_average_normals_exec(), edbm_flip_normals_exec(), edbm_normals_tools_exec(), edbm_set_normals_from_faces_exec(), edbm_smooth_normals_exec(), flip_custom_normals(), freeCustomNormalArray(), mesh_normals_loop_custom_set(), normals_merge(), normals_split(), and point_normals_apply().
| void BKE_lnor_space_define | ( | MLoopNorSpace * | lnor_space, |
| const float | lnor[3], | ||
| float | vec_ref[3], | ||
| float | vec_other[3], | ||
| struct BLI_Stack * | edge_vectors | ||
| ) |
Definition at line 572 of file mesh_evaluate.c.
References alpha, beta(), BLI_assert, BLI_stack_clear(), BLI_stack_discard(), BLI_stack_is_empty(), BLI_stack_peek(), copy_v3_v3(), cross_v3_v3v3(), dot_v3v3(), fabsf, float(), LIKELY, LNOR_SPACE_TRIGO_THRESHOLD, M_PI, mul_v3_v3fl(), normalize_v3(), normalize_v3_v3(), MLoopNorSpace::ref_alpha, MLoopNorSpace::ref_beta, saacos(), saacosf(), sub_v3_v3(), UNLIKELY, MLoopNorSpace::vec_lnor, MLoopNorSpace::vec_ortho, and MLoopNorSpace::vec_ref.
Referenced by bm_mesh_loops_calc_normals(), split_loop_nor_fan_do(), and split_loop_nor_single_do().
| void BKE_lnor_spacearr_clear | ( | MLoopNorSpaceArray * | lnors_spacearr | ) |
Definition at line 539 of file mesh_evaluate.c.
References BLI_memarena_clear(), MLoopNorSpaceArray::loops_pool, MLoopNorSpaceArray::lspacearr, MLoopNorSpaceArray::mem, NULL, and MLoopNorSpaceArray::num_spaces.
Referenced by BM_lnorspace_rebuild(), bm_mesh_loops_custom_normals_set(), mesh_customdata_custom_splitnormals_clear_exec(), and mesh_normals_loop_custom_set().
| void BKE_lnor_spacearr_free | ( | MLoopNorSpaceArray * | lnors_spacearr | ) |
Definition at line 549 of file mesh_evaluate.c.
References BLI_memarena_free(), MLoopNorSpaceArray::loops_pool, MLoopNorSpaceArray::lspacearr, MLoopNorSpaceArray::mem, NULL, and MLoopNorSpaceArray::num_spaces.
Referenced by apply_weights_vertex_normal(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_normals_loop_split(), BKE_mesh_split_faces(), BM_lnorspace_err(), BM_mesh_data_free(), bm_mesh_loops_calc_normals(), and mesh_normals_loop_custom_set().
| void BKE_lnor_spacearr_init | ( | MLoopNorSpaceArray * | lnors_spacearr, |
| const int | numLoops, | ||
| const char | data_type | ||
| ) |
Definition at line 518 of file mesh_evaluate.c.
References BLI_assert, BLI_memarena_alloc(), BLI_memarena_calloc(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, MLoopNorSpaceArray::data_type, ELEM, MLoopNorSpaceArray::loops_pool, MLoopNorSpaceArray::lspacearr, MLoopNorSpaceArray::mem, MLNOR_SPACEARR_BMLOOP_PTR, MLNOR_SPACEARR_LOOP_INDEX, and MLoopNorSpaceArray::num_spaces.
Referenced by BKE_mesh_normals_loop_split(), BM_lnorspace_err(), and bm_mesh_loops_calc_normals().
Definition at line 849 of file mesh.c.
References BKE_id_new(), and ID_ME.
Referenced by BKE_mesh_from_nurbs_displist(), BKE_mesh_new_from_object_to_bmain(), BKE_object_obdata_add_from_type(), BKE_pointcloud_to_mesh(), Freestyle::BlenderStrokeRenderer::NewMesh(), object_convert_exec(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), and MeshImporter::write_geometry().
Definition at line 1283 of file mesh.c.
References BKE_modifiers_test_object(), BKE_object_materials_test(), Object::data, Mesh::id, id_us_min(), id_us_plus(), multires_force_sculpt_rebuild(), NULL, OB_MESH, and Object::type.
Referenced by MeshImporter::create_mesh_object().
| void BKE_mesh_batch_cache_dirty_tag | ( | struct Mesh * | me, |
| eMeshBatchDirtyMode | mode | ||
| ) |
Definition at line 251 of file mesh_runtime.c.
References Mesh_Runtime::batch_cache, BKE_mesh_batch_cache_dirty_tag_cb, and Mesh::runtime.
Referenced by BKE_object_batch_cache_dirty_tag(), BKE_object_data_select_update(), geometry_extract_apply(), paint_mask_slice_exec(), paintface_flush_flags(), paintvert_flush_flags(), quadriflow_start_job(), sculpt_face_set_edit_modify_geometry(), sculpt_gesture_trim_end(), sculpt_symmetrize_exec(), shade_smooth_exec(), tag_object_after_update(), uv_select_tag_update_for_object(), uv_shortest_path_pick_ex(), voxel_remesh_exec(), vpaint_mode_toggle_exec(), vpaint_stroke_update_step(), and wpaint_stroke_update_step().
| void BKE_mesh_batch_cache_free | ( | struct Mesh * | me | ) |
Definition at line 257 of file mesh_runtime.c.
References Mesh_Runtime::batch_cache, BKE_mesh_batch_cache_free_cb, and Mesh::runtime.
Referenced by BKE_mesh_runtime_clear_cache().
Definition at line 1055 of file mesh.c.
References Object_Runtime::bb, BKE_boundbox_init_from_minmax(), BKE_mesh_wrapper_minmax(), BOUNDBOX_DIRTY, Object::data, BoundBox::flag, INIT_MINMAX, max, MEM_mallocN, min, NULL, and Object::runtime.
Referenced by BKE_object_boundbox_get(), BKE_object_minmax(), raycastMesh(), snapMesh(), and voxel_size_edit_invoke().
Referenced by quadriflow_check().
| void BKE_mesh_calc_edges | ( | Mesh * | mesh, |
| bool | keep_existing_edges, | ||
| const bool | select_new_edges | ||
| ) |
Calculate edges from polygons.
Definition at line 226 of file mesh_validate.cc.
References blender::bke::calc_edges::add_existing_edges_to_hash_maps(), blender::bke::calc_edges::add_polygon_edges_to_hash_maps(), BLI_assert, CD_ASSIGN, CD_MEDGE, blender::bke::calc_edges::clear_hash_tables(), CustomData_add_layer(), CustomData_free(), CustomData_reset(), blender::bke::calc_edges::get_parallel_maps_count(), is_power_of_2_i(), ME_EDGEDRAW, ME_EDGERENDER, Mesh::medge, MEM_calloc_arrayN, mesh, blender::bke::calc_edges::reserve_hash_maps(), SELECT, blender::bke::calc_edges::serialize_and_initialize_deduplicated_edges(), Mesh::totedge, and blender::bke::calc_edges::update_edge_indices_in_poly_loops().
Referenced by BKE_mesh_from_metaball(), BKE_mesh_validate_arrays(), ED_mesh_update(), blender::io::alembic::read_mpolys(), sculpt_gesture_trim_geometry_generate(), and MeshImporter::write_geometry().
| void BKE_mesh_calc_edges_legacy | ( | Mesh * | me, |
| const bool | use_old | ||
| ) |
If the mesh is from a very old blender version, convert mface->edcode to edge drawflags
Definition at line 1499 of file mesh_validate.c.
References BKE_mesh_strip_loose_faces(), CD_ASSIGN, CD_MEDGE, CustomData_add_layer(), Mesh::medge, mesh_calc_edges_mdata(), Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::mvert, Mesh::totedge, Mesh::totface, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by blo_do_versions_pre250().
| void BKE_mesh_calc_edges_loose | ( | struct Mesh * | mesh | ) |
Definition at line 1530 of file mesh_validate.c.
References MLoop::e, MEdge::flag, ME_EDGEDRAW, ME_LOOSEEDGE, Mesh::medge, mesh, Mesh::mloop, Mesh::totedge, and Mesh::totloop.
Referenced by blo_do_versions_280(), ED_mesh_update(), and modifyMesh().
| void BKE_mesh_calc_edges_tessface | ( | Mesh * | mesh | ) |
Calculate/create edges from tessface data
| mesh | The mesh to add edges into |
Definition at line 1554 of file mesh_validate.c.
References BLI_EDGEHASH_SIZE_GUESS_FROM_POLYS, BLI_edgeset_add(), BLI_edgeset_free(), BLI_edgeset_len(), BLI_edgeset_new_ex(), BLI_edgesetIterator_free(), BLI_edgesetIterator_getKey(), BLI_edgesetIterator_isDone(), BLI_edgesetIterator_new(), BLI_edgesetIterator_step(), CD_CALLOC, CD_MEDGE, CD_ORIGINDEX, CustomData_add_layer(), CustomData_free(), CustomData_get_layer(), CustomData_reset(), MEdge::flag, ME_EDGEDRAW, ME_EDGERENDER, Mesh::medge, mesh, Mesh::mface, NULL, ORIGINDEX_NONE, Mesh::totedge, Mesh::totface, MEdge::v1, MFace::v1, MEdge::v2, MFace::v2, MFace::v3, and MFace::v4.
Referenced by cutEdges(), and explodeMesh().
| void BKE_mesh_calc_normals | ( | struct Mesh * | me | ) |
Definition at line 442 of file mesh_evaluate.c.
References BKE_mesh_calc_normals(), BKE_mesh_calc_normals_poly(), Mesh_Runtime::cd_dirty_vert, CD_MASK_NORMAL, mesh, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, Mesh::runtime, TIMEIT_END_AVERAGED, TIMEIT_START_AVERAGED, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by apply_objects_internal(), BKE_mesh_calc_normals(), BKE_mesh_ensure_normals(), BKE_mesh_from_metaball(), BKE_mesh_from_nurbs_displist(), BKE_modifier_deform_vertsEM(), cloth_build_springs(), blender::nodes::create_cylinder_or_cone_mesh(), MeshImporter::create_mesh_object(), deformVerts(), do_versions_after_linking_280(), ED_mesh_join_objects_exec(), ED_mesh_update(), blender::nodes::geo_node_subdivide_exec(), blender::nodes::geo_node_subdivision_surface_exec(), geometry_extract_apply(), modwrap_dependsOnNormals(), multires_reshape_apply_base_refit_base_mesh(), normalEditModifier_do_radial(), paint_mask_slice_exec(), blender::io::alembic::process_no_normals(), quadriflow_start_job(), SCULPT_flush_stroke_deform(), sculpt_gesture_trim_normals_update(), sculpt_symmetrize_exec(), sculpt_undo_restore_list(), SCULPT_vertcos_to_key(), blender::nodes::transform_mesh(), and voxel_remesh_exec().
| void BKE_mesh_calc_normals_looptri | ( | struct MVert * | mverts, |
| int | numVerts, | ||
| const struct MLoop * | mloop, | ||
| const struct MLoopTri * | looptri, | ||
| int | looptri_num, | ||
| float(*) | r_tri_nors[3] | ||
| ) |
Referenced by BKE_pbvh_vert_coords_apply().
| void BKE_mesh_calc_normals_mapping | ( | struct MVert * | mverts, |
| int | numVerts, | ||
| const struct MLoop * | mloop, | ||
| const struct MPoly * | mpolys, | ||
| int | numLoops, | ||
| int | numPolys, | ||
| float(*) | r_polyNors[3], | ||
| const struct MFace * | mfaces, | ||
| int | numFaces, | ||
| const int * | origIndexFace, | ||
| float(*) | r_faceNors[3] | ||
| ) |
| void BKE_mesh_calc_normals_mapping_ex | ( | struct MVert * | mverts, |
| int | numVerts, | ||
| const struct MLoop * | mloop, | ||
| const struct MPoly * | mpolys, | ||
| int | numLoops, | ||
| int | numPolys, | ||
| float(*) | r_polyNors[3], | ||
| const struct MFace * | mfaces, | ||
| int | numFaces, | ||
| const int * | origIndexFace, | ||
| float(*) | r_faceNors[3], | ||
| const bool | only_face_normals | ||
| ) |
| void BKE_mesh_calc_normals_mapping_simple | ( | struct Mesh * | me | ) |
Definition at line 90 of file mesh_evaluate.c.
References BKE_mesh_calc_normals_mapping_ex(), CD_MVERT, CustomData_is_referenced_layer(), mesh, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, Mesh::totface, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by curve_calc_modifiers_post().
| void BKE_mesh_calc_normals_poly | ( | struct MVert * | mverts, |
| float(*) | r_vertnors[3], | ||
| int | numVerts, | ||
| const struct MLoop * | mloop, | ||
| const struct MPoly * | mpolys, | ||
| int | numLoops, | ||
| int | numPolys, | ||
| float(*) | r_polyNors[3], | ||
| const bool | only_face_normals | ||
| ) |
Referenced by BKE_keyblock_mesh_calc_normals(), BKE_mesh_calc_normals_split_ex(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), data_transfer_dtdata_type_preprocess(), editbmesh_calc_modifier_final_normals(), mesh_calc_modifier_final_normals(), mesh_customdata_custom_splitnormals_add_exec(), mesh_render_data_update_normals(), MOD_solidify_extrude_modifyMesh(), MOD_solidify_nonmanifold_modifyMesh(), modifyMesh(), and normalEditModifier_do().
| void BKE_mesh_calc_normals_split | ( | struct Mesh * | mesh | ) |
Definition at line 1865 of file mesh.c.
References BKE_mesh_calc_normals_split_ex(), mesh, and NULL.
Referenced by GeometryExporter::create_normals(), displaceModifier_do(), editbmesh_calc_modifier_final_normals(), blender::io::alembic::get_loop_normals(), Freestyle::BlenderFileLoader::insertShapeNode(), mesh_calc_modifier_final_normals(), mesh_calc_tri_tessface(), modifyMesh(), and triangulate_mesh().
| void BKE_mesh_calc_normals_split_ex | ( | Mesh * | mesh, |
| MLoopNorSpaceArray * | r_lnors_spacearr | ||
| ) |
Compute 'split' (aka loop, or per face corner's) normals.
| r_lnors_spacearr | Allows to get computed loop normal space array. That data, among other things, contains 'smooth fan' info, useful e.g. to split geometry along sharp edges... |
Definition at line 1797 of file mesh.c.
References BKE_mesh_calc_normals_poly(), BKE_mesh_normals_loop_split(), CD_CALLOC, CD_CUSTOMLOOPNORMAL, Mesh_Runtime::cd_dirty_vert, CD_FLAG_TEMPORARY, CD_MASK_NORMAL, CD_NORMAL, CustomData_add_layer(), CustomData_get_layer(), CustomData_has_layer(), CustomData_set_layer_flag(), Mesh::flag, float(), Mesh::ldata, M_PI, ME_AUTOSMOOTH, Mesh::medge, MEM_freeN, MEM_malloc_arrayN, mesh, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, Mesh::runtime, Mesh::smoothresh, Mesh::totedge, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by BKE_mesh_calc_normals_split(), and BKE_mesh_split_faces().
| void BKE_mesh_calc_poly_angles | ( | const struct MPoly * | mpoly, |
| const struct MLoop * | loopstart, | ||
| const struct MVert * | mvarray, | ||
| float | angles[] | ||
| ) |
Referenced by wn_corner_angle(), and wn_face_with_angle().
| float BKE_mesh_calc_poly_area | ( | const struct MPoly * | mpoly, |
| const struct MLoop * | loopstart, | ||
| const struct MVert * | mvarray | ||
| ) |
Referenced by mesh_edituv_stretch_area_finish(), wn_face_area(), and wn_face_with_angle().
| void BKE_mesh_calc_poly_center | ( | const struct MPoly * | mpoly, |
| const struct MLoop * | loopstart, | ||
| const struct MVert * | mvarray, | ||
| float | r_cent[3] | ||
| ) |
Referenced by BKE_mesh_foreach_mapped_face_center(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_polys_from_mesh(), BKE_remesh_reproject_sculpt_face_sets(), do_draw_face_sets_brush_task_cb_ex(), mesh_island_to_astar_graph_edge_process(), and multires_subdivide_create_object_space_linear_grids().
| void BKE_mesh_calc_poly_normal_coords | ( | const struct MPoly * | mpoly, |
| const struct MLoop * | loopstart, | ||
| const float(*) | vertex_coords[3], | ||
| float | r_no[3] | ||
| ) |
Referenced by multires_reshape_apply_base_refit_base_mesh(), and uvprojectModifier_do().
Referenced by mesh_edituv_stretch_area_finish().
| void BKE_mesh_calc_relative_deform | ( | const struct MPoly * | mpoly, |
| const int | totpoly, | ||
| const struct MLoop * | mloop, | ||
| const int | totvert, | ||
| const float(*) | vert_cos_src[3], | ||
| const float(*) | vert_cos_dst[3], | ||
| const float(*) | vert_cos_org[3], | ||
| float(*) | vert_cos_new[3] | ||
| ) |
Referenced by meshcache_do().
| void BKE_mesh_calc_volume | ( | const struct MVert * | mverts, |
| const int | mverts_num, | ||
| const struct MLoopTri * | mlooptri, | ||
| const int | looptri_num, | ||
| const struct MLoop * | mloop, | ||
| float * | r_volume, | ||
| float | r_center[3] | ||
| ) |
Referenced by object_origin_set_exec().
Referenced by object_origin_set_exec().
Referenced by object_origin_set_exec().
Referenced by object_origin_set_exec().
| bool BKE_mesh_clear_facemap_customdata | ( | struct Mesh * | me | ) |
Definition at line 732 of file mesh.c.
References BMEditMesh::bm, bm, BM_data_layer_free(), CD_FACEMAP, CustomData_free_layers(), CustomData_has_layer(), Mesh::edit_mesh, NULL, BMesh::pdata, and Mesh::totpoly.
| void BKE_mesh_clear_geometry | ( | struct Mesh * | me | ) |
Definition at line 827 of file mesh.c.
References BKE_animdata_free(), BKE_mesh_runtime_clear_cache(), Mesh::id, mesh, and mesh_clear_geometry().
Used for unit testing; compares two meshes, checking only differences we care about. should be usable with leaf's testing framework I get RNA work done, will use hackish testing code for now.
Definition at line 598 of file mesh.c.
References Freestyle::c, cmpcode_to_str(), customdata_compare(), Mesh::ldata, NULL, Mesh::totedge, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
| void BKE_mesh_convert_mfaces_to_mpolys | ( | struct Mesh * | mesh | ) |
Definition at line 3523 of file mesh_evaluate.c.
References BKE_mesh_convert_mfaces_to_mpolys_ex(), BKE_mesh_update_customdata_pointers(), Mesh::fdata, Mesh::id, Mesh::ldata, Mesh::medge, mesh, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::totedge, Mesh::totface, Mesh::totloop, and Mesh::totpoly.
Referenced by cutEdges(), and explodeMesh().
| void BKE_mesh_convert_mfaces_to_mpolys_ex | ( | struct ID * | id, |
| struct CustomData * | fdata, | ||
| struct CustomData * | ldata, | ||
| struct CustomData * | pdata, | ||
| int | totedge_i, | ||
| int | totface_i, | ||
| int | totloop_i, | ||
| int | totpoly_i, | ||
| struct MEdge * | medge, | ||
| struct MFace * | mface, | ||
| int * | r_totloop, | ||
| int * | r_totpoly, | ||
| struct MLoop ** | r_mloop, | ||
| struct MPoly ** | r_mpoly | ||
| ) |
Definition at line 3577 of file mesh_evaluate.c.
References BLI_edgehash_free(), BLI_edgehash_insert(), BLI_edgehash_new_ex(), bm_corners_to_loops_ex(), CD_ASSIGN, CD_MASK_MDISPS, CD_MCOL, CD_MLOOP, CD_MPOLY, CD_MTFACE, CD_ORIGINDEX, CustomData_add_layer(), CustomData_external_read(), CustomData_free(), CustomData_get_layer(), CustomData_number_of_layers(), CustomData_to_bmeshpoly(), MEdge::flag, MPoly::flag, MFace::flag, MPoly::loopstart, MPoly::mat_nr, MFace::mat_nr, ME_FGON, MEM_calloc_arrayN, ML, NULL, POINTER_FROM_UINT, MPoly::totloop, v1, MEdge::v1, v2, MEdge::v2, and MFace::v4.
Referenced by BKE_mesh_convert_mfaces_to_mpolys(), and BKE_mesh_do_versions_convert_mfaces_to_mpolys().
Definition at line 995 of file mesh.c.
References BKE_id_copy_ex(), Mesh::id, LIB_ID_COPY_CD_REFERENCE, LIB_ID_COPY_LOCALIZE, NULL, and result.
Referenced by BKE_crazyspace_build_sculpt(), BKE_multires_create_mesh(), BKE_sculpt_get_first_deform_matrices(), canvas_copyMesh(), cloth_make_rest_mesh(), MeshComponent::copy(), create_orco_mesh(), deformVerts(), dynamicPaint_brushMeshCalculateVelocity(), dynamicPaint_Modifier_apply(), dynamicPaint_paintMesh(), editbmesh_calc_modifiers(), MeshComponent::ensure_owns_direct_data(), MeshComponent::get_for_write(), mesh_calc_modifiers(), object_convert_exec(), quadriflow_start_job(), RE_bake_normal_world_to_tangent(), RE_bake_pixels_populate_from_objects(), and remesh_symmetry_bisect().
Referenced by BKE_mesh_wrapper_from_editmesh_with_coords(), create_empty_mesh(), geometry_extract_apply(), blender::nodes::join_mesh_topology_and_builtin_attributes(), blender::bke::join_mesh_topology_and_builtin_attributes(), modifier_modify_mesh_and_geometry_set(), modifyMesh(), and paint_mask_slice_exec().
| void BKE_mesh_count_selected_items | ( | const struct Mesh * | mesh, |
| int | r_count[3] | ||
| ) |
| struct Mesh* BKE_mesh_create_derived_for_modifier | ( | struct Depsgraph * | depsgraph, |
| struct Scene * | scene, | ||
| struct Object * | ob_eval, | ||
| struct ModifierData * | md_eval, | ||
| const bool | build_shapekey_layers | ||
| ) |
Definition at line 1426 of file mesh_convert.c.
References add_shapekey_layers(), ASSERT_IS_VALID_MESH, BKE_id_copy_ex(), BKE_id_free(), BKE_keyblock_convert_to_mesh(), BKE_mesh_vert_coords_alloc(), BKE_mesh_vert_coords_apply(), BKE_modifier_get_info(), BLI_findlink(), Key::block, Object::data, Object_Runtime::data_orig, ModifierTypeInfo::deformVerts, depsgraph, eModifierMode_Realtime, eModifierTypeType_OnlyDeform, float(), Mesh::id, ModifierTypeInfo::isDisabled, Mesh::key, LIB_ID_COPY_LOCALIZE, MEM_freeN, MOD_APPLY_TO_BASE_MESH, ModifierData::mode, ModifierTypeInfo::modifyMesh, NULL, result, Object::runtime, scene, Object::shapenr, ModifierTypeInfo::type, and ModifierData::type.
Referenced by modifier_apply_create_mesh_for_modifier().
| void BKE_mesh_do_versions_cd_flag_init | ( | struct Mesh * | mesh | ) |
Definition at line 1572 of file mesh.c.
References MEdge::bweight, Mesh::cd_flag, MEdge::crease, ME_CDFLAG_EDGE_BWEIGHT, ME_CDFLAG_EDGE_CREASE, ME_CDFLAG_VERT_BWEIGHT, Mesh::medge, mesh, Mesh::mvert, and UNLIKELY.
Referenced by blo_do_versions_260().
| void BKE_mesh_do_versions_convert_mfaces_to_mpolys | ( | Mesh * | mesh | ) |
The same as BKE_mesh_convert_mfaces_to_mpolys but oriented to be used in do_versions from readfile.c the difference is how active/render/clone/stencil indices are handled here
normally thay're being set from pdata which totally makes sense for meshes which are already converted to bmesh structures, but when loading older files indices shall be updated in other way around, so newly added pdata and ldata would have this indices set based on fdata layer
this is normally only needed when reading older files, in all other cases BKE_mesh_convert_mfaces_to_mpolys shall be always used
Definition at line 3555 of file mesh_evaluate.c.
References BKE_mesh_convert_mfaces_to_mpolys_ex(), BKE_mesh_update_customdata_pointers(), CustomData_bmesh_do_versions_update_active_layers(), Mesh::fdata, Mesh::id, Mesh::ldata, Mesh::medge, mesh, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::totedge, Mesh::totface, Mesh::totloop, and Mesh::totpoly.
Referenced by do_versions_after_linking_280().
| int BKE_mesh_edge_other_vert | ( | const struct MEdge * | e, |
| int | v | ||
| ) |
Referenced by BKE_mesh_remap_calc_edges_from_mesh(), build_edge_mats(), build_emats_stack(), and collect_hull_frames().
| void BKE_mesh_edges_set_draw_render | ( | struct Mesh * | me | ) |
Definition at line 983 of file mesh_convert.c.
References MEdge::flag, ME_EDGEDRAW, ME_EDGERENDER, Mesh::medge, mesh, and Mesh::totedge.
Referenced by object_convert_exec().
| bool BKE_mesh_ensure_facemap_customdata | ( | struct Mesh * | me | ) |
Definition at line 713 of file mesh.c.
References BMEditMesh::bm, bm, BM_data_layer_add(), CD_DEFAULT, CD_FACEMAP, CustomData_add_layer(), CustomData_has_layer(), Mesh::edit_mesh, NULL, BMesh::pdata, and Mesh::totpoly.
| void BKE_mesh_ensure_normals | ( | struct Mesh * | me | ) |
Definition at line 382 of file mesh_evaluate.c.
References BKE_mesh_calc_normals(), BLI_assert, Mesh_Runtime::cd_dirty_vert, CD_MASK_NORMAL, mesh, and Mesh::runtime.
Referenced by BKE_mesh_nomain_to_mesh(), curve_calc_modifiers_post(), and MOD_deform_mesh_eval_get().
| void BKE_mesh_ensure_normals_for_display | ( | Mesh * | mesh | ) |
Called after calculating all modifiers.
Definition at line 393 of file mesh_evaluate.c.
References BKE_editmesh_cache_ensure_poly_normals(), BKE_editmesh_cache_ensure_vert_normals(), BKE_mesh_calc_normals_poly(), CD_ASSIGN, Mesh_Runtime::cd_dirty_poly, Mesh_Runtime::cd_dirty_vert, CD_MASK_NORMAL, CD_NORMAL, CustomData_add_layer(), CustomData_get_layer(), Mesh_Runtime::edit_data, Mesh::edit_mesh, float(), ME_WRAPPER_TYPE_BMESH, ME_WRAPPER_TYPE_MDATA, MEM_malloc_arrayN, mesh, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, Mesh::runtime, Mesh::totloop, Mesh::totpoly, Mesh::totvert, EditMeshData::vertexCos, and Mesh_Runtime::wrapper_type.
Referenced by editbmesh_calc_modifier_final_normals(), mesh_calc_modifier_final_normals(), and mesh_calc_tri_tessface().
| void BKE_mesh_ensure_skin_customdata | ( | struct Mesh * | me | ) |
Definition at line 681 of file mesh.c.
References BMEditMesh::bm, bm, BM_data_layer_add(), BM_ITER_MESH, BM_VERTS_OF_MESH, CD_DEFAULT, CD_MVERT_SKIN, CustomData_add_layer(), CustomData_bmesh_get(), CustomData_has_layer(), BMHeader::data, Mesh::edit_mesh, MVertSkin::flag, BMVert::head, MVERT_SKIN_ROOT, NULL, Mesh::totvert, v, and BMesh::vdata.
Referenced by BKE_object_copy_modifier(), ED_object_modifier_add(), mesh_customdata_skin_add_exec(), and skin_root_mark_exec().
| void BKE_mesh_eval_delete | ( | struct Mesh * | mesh_eval | ) |
Definition at line 986 of file mesh.c.
References BKE_libblock_free_data(), BKE_mesh_free_data(), Mesh::edit_mesh, Mesh::id, MEM_freeN, and NULL.
Referenced by BKE_object_free_derived_caches(), and object_force_modifier_update_for_bind().
Definition at line 2146 of file mesh.c.
References BKE_id_free(), BKE_mesh_texspace_calc(), copy_v3_v3(), DEG_debug_print_eval(), DEG_get_original_id(), DEG_is_active(), depsgraph, Mesh::edit_mesh, Mesh::id, Mesh::loc, ME_AUTOSPACE_EVALUATED, mesh, Mesh_Runtime::mesh_eval, ID::name, NULL, Mesh::runtime, Mesh::size, and Mesh::texflag.
Referenced by blender::deg::DepsgraphNodeBuilder::build_object_data_geometry_datablock().
| void BKE_mesh_flush_hidden_from_polys | ( | struct Mesh * | me | ) |
Definition at line 3885 of file mesh_evaluate.c.
References BKE_mesh_flush_hidden_from_polys_ex(), Mesh::medge, Mesh::mloop, Mesh::mpoly, Mesh::mvert, Mesh::totedge, and Mesh::totpoly.
Referenced by BKE_sculpt_sync_face_sets_visibility_to_base_mesh(), paintface_hide(), and paintface_reveal().
| void BKE_mesh_flush_hidden_from_polys_ex | ( | struct MVert * | mvert, |
| const struct MLoop * | mloop, | ||
| struct MEdge * | medge, | ||
| const int | totedge, | ||
| const struct MPoly * | mpoly, | ||
| const int | totpoly | ||
| ) |
| void BKE_mesh_flush_hidden_from_verts | ( | struct Mesh * | me | ) |
Definition at line 3848 of file mesh_evaluate.c.
References BKE_mesh_flush_hidden_from_verts_ex(), Mesh::medge, Mesh::mloop, Mesh::mpoly, Mesh::mvert, Mesh::totedge, and Mesh::totpoly.
Referenced by face_set_edit_do_post_visibility_updates(), hide_show_exec(), sculpt_face_set_init_exec(), and sculpt_undo_restore_list().
| void BKE_mesh_flush_hidden_from_verts_ex | ( | const struct MVert * | mvert, |
| const struct MLoop * | mloop, | ||
| struct MEdge * | medge, | ||
| const int | totedge, | ||
| struct MPoly * | mpoly, | ||
| const int | totpoly | ||
| ) |
| void BKE_mesh_flush_select_from_polys | ( | struct Mesh * | me | ) |
Definition at line 3931 of file mesh_evaluate.c.
References BKE_mesh_flush_select_from_polys_ex(), Mesh::medge, Mesh::mloop, Mesh::mpoly, Mesh::mvert, Mesh::totedge, Mesh::totpoly, and Mesh::totvert.
Referenced by ed_vwpaintmode_exit_generic(), paint_weight_gradient_exec(), and paintface_flush_flags().
| void BKE_mesh_flush_select_from_polys_ex | ( | struct MVert * | mvert, |
| const int | totvert, | ||
| const struct MLoop * | mloop, | ||
| struct MEdge * | medge, | ||
| const int | totedge, | ||
| const struct MPoly * | mpoly, | ||
| const int | totpoly | ||
| ) |
| void BKE_mesh_flush_select_from_verts | ( | struct Mesh * | me | ) |
Definition at line 3985 of file mesh_evaluate.c.
References BKE_mesh_flush_select_from_verts_ex(), Mesh::medge, Mesh::mloop, Mesh::mpoly, Mesh::mvert, Mesh::totedge, Mesh::totpoly, and Mesh::totvert.
Referenced by ed_vwpaintmode_exit_generic(), and paintvert_flush_flags().
| void BKE_mesh_flush_select_from_verts_ex | ( | const struct MVert * | mvert, |
| const int | totvert, | ||
| const struct MLoop * | mloop, | ||
| struct MEdge * | medge, | ||
| const int | totedge, | ||
| struct MPoly * | mpoly, | ||
| const int | totpoly | ||
| ) |
| void BKE_mesh_free_data | ( | Mesh * | me | ) |
Free (or release) any data used by this mesh (does not free the mesh itself).
Definition at line 796 of file mesh.c.
References Mesh::id, and mesh_free_data().
Referenced by BKE_mesh_eval_delete(), and undomesh_free_data().
| struct Mesh* BKE_mesh_from_bmesh_for_eval_nomain | ( | struct BMesh * | bm, |
| const struct CustomData_MeshMasks * | cd_mask_extra, | ||
| const struct Mesh * | me_settings | ||
| ) |
Referenced by base_skin(), BKE_mesh_mirror_bisect_on_mirror_plane_for_modifier(), construct_param_handle_subsurfed(), create_orco_mesh(), deformVerts(), blender::io::alembic::ABCGenericMeshWriter::do_write(), doEdgeSplit(), editbmesh_calc_modifiers(), modifyMesh(), triangulate_mesh(), and WireframeModifier_do().
| struct Mesh* BKE_mesh_from_bmesh_nomain | ( | struct BMesh * | bm, |
| const struct BMeshToMeshParams * | params, | ||
| const struct Mesh * | me_settings | ||
| ) |
Definition at line 77 of file mesh_convert.c.
References Freestyle::a, BKE_mesh_calc_edges(), BKE_mesh_calc_normals(), BKE_mesh_update_customdata_pointers(), CD_CALLOC, CD_MLOOP, CD_MPOLY, CD_MVERT, MVert::co, copy_v3_v3(), count, CustomData_add_layer(), DL_INDEX4, ListBase::first, MPoly::flag, DispList::index, Mesh::ldata, MPoly::loopstart, ME_SMOOTH, Mesh::mloop, Mesh::mpoly, Mesh::mvert, MVert::no, normal_float_to_short_v3(), DispList::nors, DispList::nr, NULL, DispList::parts, Mesh::totloop, MPoly::totloop, Mesh::totpoly, Mesh::totvert, DispList::type, MLoop::v, DispList::verts, and verts.
Referenced by mesh_new_from_mball_object(), and object_convert_exec().
Definition at line 703 of file mesh_convert.c.
References Object::data, and NULL.
| void BKE_mesh_from_nurbs_displist | ( | struct Main * | bmain, |
| struct Object * | ob, | ||
| struct ListBase * | dispbase, | ||
| const char * | obdata_name, | ||
| bool | temporary | ||
| ) |
Definition at line 584 of file mesh_convert.c.
References BKE_id_free(), BKE_id_free_us(), BKE_id_new_nomain(), BKE_mesh_add(), BKE_mesh_calc_normals(), BKE_mesh_nomain_to_mesh(), BKE_mesh_nurbs_displist_to_mdata(), BKE_mesh_texspace_calc(), CD_ASSIGN, CD_MASK_MESH, CD_MEDGE, CD_MLOOP, CD_MLOOPUV, CD_MPOLY, CD_MVERT, copy_v3_v3(), CU_AUTOSPACE, CustomData_add_layer(), CustomData_add_layer_named(), Object::data, Object_Runtime::data_eval, ListBase::first, Object::id, ID_ME, id_us_min(), id_us_plus(), if(), ID::next, NULL, OB_MESH, Main::objects, Object::runtime, and Object::type.
Referenced by mesh_new_from_curve_type_object().
Definition at line 1271 of file mesh.c.
References Object::data, NULL, OB_MESH, and Object::type.
Referenced by BKE_sculpt_ensure_orig_mesh_data(), build_pbvh_from_ccg(), createTransEdge(), createTransEditVerts(), do_paintface_box_select(), ED_mesh_join_objects_exec(), ED_object_sculptmode_enter_ex(), ED_object_sculptmode_exit_ex(), ED_object_texture_paint_mode_enter_ex(), ED_object_texture_paint_mode_exit_ex(), ED_paint_proj_mesh_data_check(), ED_vpaint_color_transform(), ed_vwpaintmode_enter_generic(), ed_vwpaintmode_exit_generic(), ED_wpaint_ensure_data(), multires_force_external_reload(), multiresModifier_del_levels(), paint_proj_new_stroke(), paintface_deselect_all_visible(), paintface_flush_flags(), paintface_hide(), paintface_minmax(), paintface_mouse_select(), paintface_reveal(), paintface_select_linked(), paintvert_deselect_all_visible(), paintvert_flush_flags(), paintvert_select_ungrouped(), quadriflow_remesh_exec(), SCULPT_boundary_info_ensure(), sculpt_face_set_grow(), sculpt_face_set_shrink(), sculpt_gesture_apply_trim(), sculpt_gesture_init_face_set_properties(), SCULPT_mesh_symmetry_xyz_get(), vertex_color_set(), vertex_color_smooth(), vertex_paint_from_weight(), vertex_paint_use_fast_update_check(), vertex_weight_paint_mode_poll(), vgroup_selected_get(), vpaint_mode_toggle_exec(), vpaint_stroke_test_start(), weight_paint_sample_enum_itemf(), weight_sample_invoke(), wpaint_mode_toggle_exec(), and wpaint_stroke_test_start().
| void BKE_mesh_from_pointcloud | ( | const struct PointCloud * | pointcloud, |
| struct Mesh * | me | ||
| ) |
| bool BKE_mesh_has_custom_loop_normals | ( | struct Mesh * | me | ) |
Definition at line 786 of file mesh.c.
References BMEditMesh::bm, CD_CUSTOMLOOPNORMAL, CustomData_has_layer(), Mesh::edit_mesh, BMesh::ldata, and Mesh::ldata.
Referenced by mesh_customdata_custom_splitnormals_add_exec(), and mesh_customdata_custom_splitnormals_clear_exec().
| bool BKE_mesh_is_valid | ( | Mesh * | me | ) |
Checks if a Mesh is valid without any modification. This is always verbose.
Definition at line 1101 of file mesh_validate.c.
References BKE_mesh_validate_all_customdata(), BKE_mesh_validate_arrays(), BLI_assert, Mesh::dvert, is_valid, Mesh::ldata, Mesh::medge, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::mvert, Mesh::totedge, Mesh::totface, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by blender::nodes::create_cylinder_or_cone_mesh(), blender::nodes::create_uv_sphere_mesh(), blender::nodes::geo_node_mesh_primitive_circle_exec(), and blender::nodes::geo_node_mesh_primitive_grid_exec().
| void BKE_mesh_loop_manifold_fan_around_vert_next | ( | const struct MLoop * | mloops, |
| const struct MPoly * | mpolys, | ||
| const int * | loop_to_poly, | ||
| const int * | e2lfan_curr, | ||
| const uint | mv_pivot_index, | ||
| const struct MLoop ** | r_mlfan_curr, | ||
| int * | r_mlfan_curr_index, | ||
| int * | r_mlfan_vert_index, | ||
| int * | r_mpfan_curr_index | ||
| ) |
| void BKE_mesh_loops_to_mface_corners | ( | struct CustomData * | fdata, |
| struct CustomData * | ldata, | ||
| struct CustomData * | pdata, | ||
| unsigned int | lindex[4], | ||
| int | findex, | ||
| const int | polyindex, | ||
| const int | mf_len, | ||
| const int | numUV, | ||
| const int | numCol, | ||
| const bool | hasPCol, | ||
| const bool | hasOrigSpace, | ||
| const bool | hasLNor | ||
| ) |
| void BKE_mesh_loops_to_tessdata | ( | CustomData * | fdata, |
| CustomData * | ldata, | ||
| MFace * | mface, | ||
| const int * | polyindices, | ||
| unsigned int(*) | loopindices[4], | ||
| const int | num_faces | ||
| ) |
Convert all CD layers from loop/poly to tessface data.
| loopindices | is an array of an int[4] per tessface, mapping tessface's verts to loops indices. |
Definition at line 2872 of file mesh_evaluate.c.
References CD_MCOL, CD_MLOOPCOL, CD_MLOOPUV, CD_MTFACE, CD_NORMAL, CD_ORIGSPACE, CD_ORIGSPACE_MLOOP, CD_PREVIEW_MCOL, CD_PREVIEW_MLOOPCOL, CD_TANGENT, CD_TESSLOOPNORMAL, copy_v2_v2(), copy_v4_v4(), CustomData_get_layer(), CustomData_get_layer_n(), CustomData_has_layer(), CustomData_number_of_layers(), float(), MESH_MLOOPCOL_TO_MCOL, normal_float_to_short_v3(), MLoopUV::uv, OrigSpaceLoop::uv, OrigSpaceFace::uv, MTFace::uv, and MFace::v4.
Referenced by BKE_mesh_tessface_calc_ex().
| void BKE_mesh_looptri_get_real_edges | ( | const struct Mesh * | mesh, |
| const struct MLoopTri * | looptri, | ||
| int | r_edges[3] | ||
| ) |
Referenced by GPU_pbvh_mesh_buffers_build(), mesh_looptri_target_project(), and shrinkwrap_build_boundary_data().
| void BKE_mesh_material_index_clear | ( | struct Mesh * | me | ) |
Definition at line 1347 of file mesh.c.
References MPoly::mat_nr, MFace::mat_nr, Mesh::mface, and Mesh::mpoly.
Referenced by material_data_index_clear_id().
| void BKE_mesh_material_index_remove | ( | struct Mesh * | me, |
| short | index | ||
| ) |
Definition at line 1307 of file mesh.c.
References MPoly::mat_nr, MFace::mat_nr, Mesh::mface, and Mesh::mpoly.
Referenced by material_data_index_remove_id().
| bool BKE_mesh_material_index_used | ( | struct Mesh * | me, |
| short | index | ||
| ) |
Definition at line 1326 of file mesh.c.
References MPoly::mat_nr, MFace::mat_nr, Mesh::mface, and Mesh::mpoly.
Referenced by BKE_object_material_slot_used().
| void BKE_mesh_material_remap | ( | struct Mesh * | me, |
| const unsigned int * | remap, | ||
| unsigned int | remap_len | ||
| ) |
Definition at line 1362 of file mesh.c.
References BMEditMesh::bm, BM_FACES_OF_MESH, BM_ITER_MESH, Mesh::edit_mesh, BMFace::mat_nr, MPoly::mat_nr, MAT_NR_REMAP, Mesh::mpoly, and Mesh::totpoly.
Referenced by BKE_object_material_remap().
| void BKE_mesh_mdisp_flip | ( | MDisps * | md, |
| const bool | use_loop_mdisp_flip | ||
| ) |
Flip a single MLoop's MDisps structure, low level function to be called from face-flipping code which re-arranged the mdisps themselves.
Definition at line 3705 of file mesh_evaluate.c.
References MDisps::disps, float(), sqrt(), SWAP, swap_v3_v3(), MDisps::totdisp, UNLIKELY, x, and y.
Referenced by BKE_mesh_polygon_flip_ex(), and bmesh_kernel_loop_reverse().
| struct Mesh* BKE_mesh_merge_verts | ( | Mesh * | mesh, |
| const int * | vtargetmap, | ||
| const int | tot_vtargetmap, | ||
| const int | merge_mode | ||
| ) |
Merge Verts
This frees the given mesh and returns a new mesh.
| vtargetmap | The table that maps vertices to target vertices. a value of -1 indicates a vertex is a target, and is to be kept. This array is aligned with 'mesh->totvert' |
| tot_vtargetmap | The number of non '-1' values in vtargetmap. (not the size) |
| merge_mode | enum with two modes.
|
Definition at line 239 of file mesh_merge.c.
References BKE_mesh_vert_poly_map_create(), BLI_assert, BLI_edgehash_ensure_p(), BLI_edgehash_new_ex(), BLI_edgehash_remove(), BLI_gset_flag_set(), BLI_gset_haskey(), BLI_gset_insert(), BLI_gset_new_ex(), Freestyle::c, cddm_poly_compare(), MeshElemMap::count, MLoop::e, ELEM, GHASH_FLAG_ALLOW_DUPES, PolyKey::hash_sum, PolyKey::hash_xor, MeshElemMap::indices, LIKELY, MPoly::loopstart, ME_VERT_TMP_TAG, Mesh::medge, MEM_malloc_arrayN, mesh, MESH_MERGE_VERTS_DUMP_IF_EQUAL, MESH_MERGE_VERTS_DUMP_IF_MAPPED, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, POINTER_AS_INT, POINTER_FROM_INT, poly_gset_compare_fn(), poly_gset_hash_fn(), PolyKey::poly_index, result, STACK_DECLARE, STACK_DISCARD, STACK_INIT, STACK_PUSH, STACK_PUSH_RET_PTR, STACK_SIZE, Mesh::totedge, Mesh::totloop, MPoly::totloop, PolyKey::totloops, Mesh::totpoly, Mesh::totvert, UNLIKELY, MLoop::v, v1, MEdge::v1, v2, and MEdge::v2.
Referenced by arrayModifier_doArray(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), and mesh_remove_doubles_on_axis().
Referenced by BKE_mesh_center_bounds(), BKE_mesh_wrapper_minmax(), and modifyMesh().
| int BKE_mesh_mselect_active_get | ( | Mesh * | me, |
| int | type | ||
| ) |
Return The index of the active element.
Definition at line 1693 of file mesh.c.
References BLI_assert, ELEM, MSelect::index, ME_ESEL, ME_FSEL, ME_VSEL, Mesh::mselect, Mesh::totselect, type, and MSelect::type.
Referenced by ED_mesh_active_dvert_get_ob().
| void BKE_mesh_mselect_active_set | ( | struct Mesh * | me, |
| int | index, | ||
| int | type | ||
| ) |
Definition at line 1705 of file mesh.c.
References BKE_mesh_mselect_find(), BLI_assert, MSelect::index, MEM_reallocN, Mesh::mselect, SWAP, Mesh::totselect, type, and MSelect::type.
Referenced by ed_wpaint_vertex_select_pick().
| void BKE_mesh_mselect_clear | ( | struct Mesh * | me | ) |
Definition at line 1608 of file mesh.c.
References MEM_freeN, Mesh::mselect, NULL, and Mesh::totselect.
Referenced by paintvert_deselect_all_visible(), and SCULPT_dynamic_topology_enable_ex().
| int BKE_mesh_mselect_find | ( | Mesh * | me, |
| int | index, | ||
| int | type | ||
| ) |
Return the index within me->mselect, or -1
Definition at line 1677 of file mesh.c.
References BLI_assert, ELEM, MSelect::index, ME_ESEL, ME_FSEL, ME_VSEL, Mesh::mselect, Mesh::totselect, type, and MSelect::type.
Referenced by BKE_mesh_mselect_active_set().
| void BKE_mesh_mselect_validate | ( | struct Mesh * | me | ) |
Definition at line 1617 of file mesh.c.
References BLI_assert, MVert::flag, MEdge::flag, MPoly::flag, MSelect::index, ME_ESEL, ME_FSEL, ME_VSEL, Mesh::medge, MEM_freeN, MEM_malloc_arrayN, MEM_reallocN, Mesh::mpoly, Mesh::mselect, Mesh::mvert, NULL, SELECT, Mesh::totselect, and type.
Referenced by do_lasso_select_paintvert(), do_paintvert_box_select(), ed_wpaint_vertex_select_pick(), paint_vertsel_circle_select(), and paintvert_deselect_all_visible().
| struct Mesh* BKE_mesh_new_from_object | ( | struct Depsgraph * | depsgraph, |
| struct Object * | object, | ||
| const bool | preserve_all_data_layers, | ||
| const bool | preserve_origindex | ||
| ) |
Definition at line 1248 of file mesh_convert.c.
References BLI_assert, depsgraph, Mesh::edit_mesh, Mesh::id, mesh_new_from_curve_type_object(), mesh_new_from_mball_object(), mesh_new_from_mesh_object(), NULL, OB_CURVE, OB_FONT, OB_MBALL, OB_MESH, OB_SURF, Object::type, and ID::us.
Referenced by bake(), bake_mesh_new_from_object(), BKE_mesh_new_from_object_to_bmain(), BKE_object_to_mesh(), bpy_bmesh_from_object(), blender::io::alembic::ABCMetaballWriter::get_export_mesh(), blender::io::usd::USDMetaballWriter::get_export_mesh(), and lineart_geometry_object_load().
| struct Mesh* BKE_mesh_new_from_object_to_bmain | ( | struct Main * | bmain, |
| struct Depsgraph * | depsgraph, | ||
| struct Object * | object, | ||
| bool | preserve_all_data_layers | ||
| ) |
Definition at line 1323 of file mesh_convert.c.
References BKE_library_foreach_ID_link(), BKE_mesh_add(), BKE_mesh_new_from_object(), BKE_mesh_nomain_to_mesh(), BLI_assert, CD_MASK_MESH, Object::data, depsgraph, ELEM, Mesh::flag, foreach_libblock_make_original_callback(), foreach_libblock_make_usercounts_callback(), Mesh::id, id_us_min(), IDWALK_NOP, Mesh::mat, mesh, Main::name, ID::name, NULL, OB_CURVE, OB_FONT, OB_MBALL, OB_MESH, OB_SURF, Mesh::smoothresh, Mesh::totcol, Object::type, and ID::us.
Referenced by object_data_convert_curve_to_mesh().
| struct Mesh* BKE_mesh_new_nomain | ( | int | verts_len, |
| int | edges_len, | ||
| int | tessface_len, | ||
| int | loops_len, | ||
| int | polys_len | ||
| ) |
Definition at line 877 of file mesh.c.
References BKE_idtype_idcode_to_name(), BKE_libblock_alloc(), BKE_libblock_init_empty(), BKE_mesh_update_customdata_pointers(), CD_NUMTYPES, copy_vn_i(), Mesh::fdata, Mesh::id, ID_ME, Mesh::ldata, LIB_ID_CREATE_LOCALIZE, mesh, mesh_ensure_cdlayers_primary(), NULL, Mesh::totedge, Mesh::totface, Mesh::totloop, Mesh::totpoly, Mesh::totvert, and CustomData::typemap.
Referenced by BKE_mesh_new_nomain_from_curve_displist(), blender::nodes::create_circle_mesh(), blender::nodes::create_component_points(), blender::nodes::create_cylinder_or_cone_mesh(), create_empty_mesh(), blender::nodes::create_grid_mesh(), blender::nodes::create_line_mesh(), blender::nodes::create_uv_sphere_mesh(), get_quick_mesh(), hair_create_input_mesh(), blender::nodes::join_mesh_topology_and_builtin_attributes(), blender::bke::join_mesh_topology_and_builtin_attributes(), modifier_modify_mesh_and_geometry_set(), modifyMesh(), multires_unsubdivide_to_basemesh(), blender::io::alembic::AbcPointsReader::read_mesh(), and sculpt_gesture_trim_geometry_generate().
Definition at line 572 of file mesh_convert.c.
References BKE_mesh_new_nomain_from_curve_displist(), Object_Runtime::curve_cache, CurveCache::disp, NULL, and Object::runtime.
Referenced by blender::io::alembic::ABCCurveMeshWriter::get_export_mesh(), knifeproject_poly_from_object(), MOD_deform_mesh_eval_get(), and blender::io::alembic::AbcCurveReader::read_mesh().
| struct Mesh* BKE_mesh_new_nomain_from_curve_displist | ( | struct Object * | ob, |
| struct ListBase * | dispbase | ||
| ) |
Definition at line 526 of file mesh_convert.c.
References BKE_mesh_new_nomain(), BKE_mesh_nurbs_displist_to_mdata(), CD_ASSIGN, Mesh_Runtime::cd_dirty_vert, CD_MASK_NORMAL, CD_MLOOPUV, CustomData_add_layer_named(), Mesh::ldata, Mesh::medge, MEM_freeN, mesh, Mesh::mloop, Mesh::mpoly, Mesh::mvert, NULL, and Mesh::runtime.
Referenced by BKE_mesh_new_nomain_from_curve(), and curve_calc_modifiers_post().
| struct Mesh* BKE_mesh_new_nomain_from_template | ( | const struct Mesh * | me_src, |
| int | verts_len, | ||
| int | edges_len, | ||
| int | tessface_len, | ||
| int | loops_len, | ||
| int | polys_len | ||
| ) |
Referenced by arrayModifier_doArray(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_subdiv_to_ccg_mesh(), cutEdges(), explodeMesh(), MOD_solidify_extrude_modifyMesh(), modifyMesh(), blender::io::alembic::AbcSubDReader::read_mesh(), blender::io::alembic::AbcMeshReader::read_mesh(), subdivide_base(), and weldModifier_doWeld().
| struct Mesh* BKE_mesh_new_nomain_from_template_ex | ( | const struct Mesh * | me_src, |
| int | verts_len, | ||
| int | edges_len, | ||
| int | tessface_len, | ||
| int | loops_len, | ||
| int | polys_len, | ||
| struct CustomData_MeshMasks | mask | ||
| ) |
Referenced by subdiv_mesh_topology_info().
| void BKE_mesh_nomain_to_mesh | ( | struct Mesh * | mesh_src, |
| struct Mesh * | mesh_dst, | ||
| struct Object * | ob, | ||
| const struct CustomData_MeshMasks * | mask, | ||
| bool | take_ownership | ||
| ) |
Referenced by geometry_extract_apply(), modifier_apply_obdata(), multiresModifier_rebuild_subdiv(), object_convert_exec(), paint_mask_slice_exec(), quadriflow_start_job(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), blender::io::alembic::AbcMeshReader::readObjectData(), sculpt_gesture_apply_trim(), and voxel_remesh_exec().
| void BKE_mesh_nomain_to_meshkey | ( | struct Mesh * | mesh_src, |
| struct Mesh * | mesh_dst, | ||
| struct KeyBlock * | kb | ||
| ) |
Definition at line 1711 of file mesh_convert.c.
References Freestyle::a, BLI_assert, MVert::co, copy_v3_v3(), KeyBlock::data, Key::elemsize, Mesh::id, Mesh::key, LIB_TAG_NO_MAIN, MEM_freeN, MEM_malloc_arrayN, Mesh::mvert, ID::tag, KeyBlock::totelem, and Mesh::totvert.
Referenced by modifier_apply_shape().
| void BKE_mesh_normals_loop_custom_from_vertices_set | ( | const struct MVert * | mverts, |
| float(*) | r_custom_vertnors[3], | ||
| const int | numVerts, | ||
| struct MEdge * | medges, | ||
| const int | numEdges, | ||
| struct MLoop * | mloops, | ||
| const int | numLoops, | ||
| struct MPoly * | mpolys, | ||
| const float(*) | polynors[3], | ||
| const int | numPolys, | ||
| short(*) | r_clnors_data[2] | ||
| ) |
Referenced by apply_weights_vertex_normal().
| void BKE_mesh_normals_loop_custom_set | ( | const struct MVert * | mverts, |
| const int | numVerts, | ||
| struct MEdge * | medges, | ||
| const int | numEdges, | ||
| struct MLoop * | mloops, | ||
| float(*) | r_custom_loopnors[3], | ||
| const int | numLoops, | ||
| struct MPoly * | mpolys, | ||
| const float(*) | polynors[3], | ||
| const int | numPolys, | ||
| short(*) | r_clnors_data[2] | ||
| ) |
| void BKE_mesh_normals_loop_split | ( | const struct MVert * | mverts, |
| const int | numVerts, | ||
| struct MEdge * | medges, | ||
| const int | numEdges, | ||
| struct MLoop * | mloops, | ||
| float(*) | r_loopnors[3], | ||
| const int | numLoops, | ||
| struct MPoly * | mpolys, | ||
| const float(*) | polynors[3], | ||
| const int | numPolys, | ||
| const bool | use_split_normals, | ||
| const float | split_angle, | ||
| MLoopNorSpaceArray * | r_lnors_spacearr, | ||
| short(*) | clnors_data[2], | ||
| int * | r_loop_to_poly | ||
| ) |
Referenced by apply_weights_vertex_normal(), BKE_keyblock_mesh_calc_normals(), BKE_mesh_calc_normals_split_ex(), BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), BKE_mesh_remap_calc_loops_from_mesh(), data_transfer_dtdata_type_preprocess(), mesh_render_data_update_normals(), and normalEditModifier_do().
| void BKE_mesh_normals_loop_to_vertex | ( | const int | numVerts, |
| const struct MLoop * | mloops, | ||
| const int | numLoops, | ||
| const float(*) | clnors[3], | ||
| float(*) | r_vert_clnors[3] | ||
| ) |
Referenced by displaceModifier_do().
| int BKE_mesh_nurbs_displist_to_mdata | ( | struct Object * | ob, |
| const struct ListBase * | dispbase, | ||
| struct MVert ** | r_allvert, | ||
| int * | r_totvert, | ||
| struct MEdge ** | r_alledge, | ||
| int * | r_totedge, | ||
| struct MLoop ** | r_allloop, | ||
| struct MPoly ** | r_allpoly, | ||
| struct MLoopUV ** | r_alluv, | ||
| int * | r_totloop, | ||
| int * | r_totpoly | ||
| ) |
| int BKE_mesh_nurbs_to_mdata | ( | struct Object * | ob, |
| struct MVert ** | r_allvert, | ||
| int * | r_totvert, | ||
| struct MEdge ** | r_alledge, | ||
| int * | r_totedge, | ||
| struct MLoop ** | r_allloop, | ||
| struct MPoly ** | r_allpoly, | ||
| int * | r_totloop, | ||
| int * | r_totpoly | ||
| ) |
Definition at line 216 of file mesh_convert.c.
References BKE_mesh_nurbs_displist_to_mdata(), Object_Runtime::curve_cache, CurveCache::disp, NULL, and Object::runtime.
Definition at line 1162 of file mesh.c.
References Freestyle::a, MVert::co, copy_v3_v3(), float(), MEM_calloc_arrayN, min_ii(), Mesh::mvert, Mesh::texcomesh, and Mesh::totvert.
Referenced by get_orco_coords(), MOD_deform_mesh_eval_get(), and psys_thread_context_init_distribute().
Definition at line 1179 of file mesh.c.
References Freestyle::a, BKE_mesh_texspace_get(), invert(), madd_v3_v3v3v3(), size(), and Mesh::texcomesh.
Referenced by add_orco_mesh(), distribute_children_exec(), distribute_from_verts_exec(), extract_tan_ex(), psys_face_mat(), psys_mat_hair_to_orco(), and psys_thread_context_init_distribute().
| BLI_INLINE int BKE_mesh_origindex_mface_mpoly | ( | const int * | index_mf_to_mpoly, |
| const int * | index_mp_to_orig, | ||
| const int | i | ||
| ) |
Definition at line 701 of file BKE_mesh.h.
Referenced by psys_particle_dm_face_lookup().
| void BKE_mesh_poly_edgebitmap_insert | ( | unsigned int * | edge_bitmap, |
| const struct MPoly * | mp, | ||
| const struct MLoop * | mloop | ||
| ) |
Referenced by select_linked_tfaces_with_seams().
| void BKE_mesh_poly_edgehash_insert | ( | struct EdgeHash * | ehash, |
| const struct MPoly * | mp, | ||
| const struct MLoop * | mloop | ||
| ) |
Referenced by make_edges_mdata_extend().
| void BKE_mesh_polygon_flip | ( | struct MPoly * | mpoly, |
| struct MLoop * | mloop, | ||
| struct CustomData * | ldata | ||
| ) |
Definition at line 3792 of file mesh_evaluate.c.
References BKE_mesh_polygon_flip_ex(), CD_MDISPS, CustomData_get_layer(), and NULL.
| void BKE_mesh_polygon_flip_ex | ( | MPoly * | mpoly, |
| MLoop * | mloop, | ||
| CustomData * | ldata, | ||
| float(*) | lnors[3], | ||
| MDisps * | mdisp, | ||
| const bool | use_loop_mdisp_flip | ||
| ) |
Flip (invert winding of) the given mpoly, i.e. reverse order of its loops (keeping the same vertex as 'start point').
| mpoly | the polygon to flip. |
| mloop | the full loops array. |
| ldata | the loops custom data. |
Definition at line 3749 of file mesh_evaluate.c.
References BKE_mesh_mdisp_flip(), CD_MLOOP, CustomData_get_layer(), CustomData_swap(), e, MLoop::e, MPoly::loopstart, SWAP, swap_v3_v3(), and MPoly::totloop.
Referenced by BKE_mesh_polygon_flip(), BKE_mesh_polygons_flip(), and polygons_check_flip().
| void BKE_mesh_polygons_flip | ( | MPoly * | mpoly, |
| MLoop * | mloop, | ||
| CustomData * | ldata, | ||
| int | totpoly | ||
| ) |
Flip (invert winding of) all polygons (used to inverse their normals).
Definition at line 3803 of file mesh_evaluate.c.
References BKE_mesh_polygon_flip_ex(), CD_MDISPS, CustomData_get_layer(), and NULL.
| void BKE_mesh_recalc_looptri | ( | const struct MLoop * | mloop, |
| const struct MPoly * | mpoly, | ||
| const struct MVert * | mvert, | ||
| int | totloop, | ||
| int | totpoly, | ||
| struct MLoopTri * | mlooptri | ||
| ) |
Referenced by bake_targets_populate_pixels_vertex_colors(), BKE_mesh_runtime_looptri_recalc(), build_pbvh_from_regular_mesh(), cdDM_recalc_looptri(), heat_bone_weighting(), Freestyle::BlenderFileLoader::insertShapeNode(), mesh_calc_tri_tessface(), mesh_faces_to_scratch(), mesh_render_data_update_looptris(), and RE_bake_pixels_populate().
Higher level functions hiding most of the code needed around call to BKE_mesh_normals_loop_custom_set().
| r_custom_loopnors | is not const, since code will replace zero_v3 normals there with automatically computed vectors. |
Definition at line 2100 of file mesh_evaluate.c.
References mesh, and mesh_set_custom_normals().
Referenced by modifyMesh(), blender::io::alembic::process_loop_normals(), and triangulate_mesh().
Higher level functions hiding most of the code needed around call to BKE_mesh_normals_loop_custom_from_vertices_set().
| r_custom_vertnors | is not const, since code will replace zero_v3 normals there with automatically computed vectors. |
Definition at line 2112 of file mesh_evaluate.c.
References mesh, and mesh_set_custom_normals().
Referenced by blender::io::alembic::process_vertex_normals().
| void BKE_mesh_smooth_flag_set | ( | struct Mesh * | me, |
| const bool | use_smooth | ||
| ) |
Definition at line 1392 of file mesh.c.
References MPoly::flag, ME_SMOOTH, Mesh::mpoly, and Mesh::totpoly.
Referenced by BLO_update_defaults_startup_blend(), modifyMesh(), quadriflow_start_job(), shade_smooth_exec(), and voxel_remesh_exec().
| void BKE_mesh_split_faces | ( | struct Mesh * | mesh, |
| bool | free_loop_normals | ||
| ) |
Definition at line 2073 of file mesh.c.
References BKE_lnor_spacearr_free(), BKE_mesh_calc_normals_split_ex(), BKE_mesh_tessface_clear(), BKE_mesh_update_customdata_pointers(), BKE_mesh_validate(), CD_NORMAL, CustomData_duplicate_referenced_layers(), CustomData_free_layers(), CustomData_realloc(), Mesh::ldata, MLoopNorSpaceArray::mem, mesh, NULL, split_faces_prepare_new_edges(), split_faces_prepare_new_verts(), split_faces_split_new_edges(), split_faces_split_new_verts(), Mesh::totedge, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by bake_mesh_new_from_object().
| void BKE_mesh_strip_loose_edges | ( | struct Mesh * | me | ) |
Definition at line 1277 of file mesh_validate.c.
References Freestyle::a, CustomData_copy_data(), CustomData_free_elem(), BMLoop::e, e, INVALID_LOOP_EDGE_MARKER, l, Mesh::medge, MEM_freeN, MEM_mallocN, Mesh::mloop, and Mesh::totedge.
Referenced by BKE_mesh_validate_arrays().
| void BKE_mesh_strip_loose_faces | ( | struct Mesh * | me | ) |
Definition at line 1179 of file mesh_validate.c.
References Freestyle::a, CustomData_copy_data(), CustomData_free_elem(), Mesh::fdata, Mesh::mface, Mesh::totface, and MFace::v3.
Referenced by BKE_mesh_calc_edges_legacy(), BKE_mesh_validate_arrays(), and blo_do_versions_pre250().
| void BKE_mesh_strip_loose_polysloops | ( | Mesh * | me | ) |
Works on both loops and polys!
Definition at line 1206 of file mesh_validate.c.
References Freestyle::a, CustomData_copy_data(), CustomData_free_elem(), BMLoop::e, INVALID_LOOP_EDGE_MARKER, l, Mesh::ldata, MPoly::loopstart, MEM_freeN, MEM_mallocN, Mesh::mloop, Mesh::mpoly, Mesh::totloop, MPoly::totloop, and Mesh::totpoly.
Referenced by BKE_mesh_validate_arrays().
| void BKE_mesh_tangent_loops_to_tessdata | ( | struct CustomData * | fdata, |
| struct CustomData * | ldata, | ||
| struct MFace * | mface, | ||
| const int * | polyindices, | ||
| unsigned int(*) | loopindices[4], | ||
| const int | num_faces, | ||
| const char * | layer_name | ||
| ) |
Definition at line 2965 of file mesh_evaluate.c.
References CD_TANGENT, copy_v4_v4(), CustomData_get_layer(), CustomData_get_layer_named(), float(), NULL, and MFace::v4.
| void BKE_mesh_tessface_calc | ( | struct Mesh * | mesh | ) |
Definition at line 1544 of file mesh.c.
References BKE_mesh_tessface_calc_ex(), BKE_mesh_update_customdata_pointers(), Mesh::fdata, Mesh::ldata, mesh, Mesh::mvert, Mesh::totface, Mesh::totloop, and Mesh::totpoly.
Referenced by BKE_mesh_tessface_ensure().
| int BKE_mesh_tessface_calc_ex | ( | CustomData * | fdata, |
| CustomData * | ldata, | ||
| CustomData * | pdata, | ||
| MVert * | mvert, | ||
| int | totface, | ||
| int | totloop, | ||
| int | totpoly, | ||
| const bool | do_face_nor_copy | ||
| ) |
Recreate tessellation.
| do_face_nor_copy | Controls whether the normals from the poly are copied to the tessellated faces. |
Definition at line 3021 of file mesh_evaluate.c.
References add_newell_cross_v3_v3v3(), axis_dominant_v3_to_m3_negate(), BKE_mesh_loops_to_tessdata(), BLI_assert, BLI_memarena_alloc(), BLI_memarena_clear(), BLI_memarena_free(), BLI_memarena_new(), BLI_MEMARENA_STD_BUFSIZE, BLI_polyfill_calc_arena(), CD_ASSIGN, CD_CALLOC, CD_MFACE, CD_MLOOP, CD_MPOLY, CD_NORMAL, CD_ORIGINDEX, MVert::co, copy_v3_v3(), CustomData_add_layer(), CustomData_free(), CustomData_from_bmeshpoly(), CustomData_get_layer(), CustomData_has_layer(), MFace::edcode, MPoly::flag, MFace::flag, float(), LIKELY, MPoly::loopstart, MPoly::mat_nr, MFace::mat_nr, MEM_freeN, MEM_malloc_arrayN, MEM_reallocN, ML_TO_MF, ML_TO_MF_QUAD, mul_v2_m3v3(), normal, normalize_v3(), NULL, poly_to_tri_count(), TESSFACE_IS_QUAD, test_index_face(), MPoly::totloop, UNLIKELY, MLoop::v, MFace::v1, MFace::v2, MFace::v3, MFace::v4, and zero_v3().
Referenced by BKE_mesh_tessface_calc().
| void BKE_mesh_tessface_clear | ( | struct Mesh * | mesh | ) |
Definition at line 1567 of file mesh.c.
References mesh, and mesh_tessface_clear_intern().
Referenced by BKE_mesh_split_faces(), BKE_sculpt_ensure_orig_mesh_data(), do_versions_after_linking_280(), ED_mesh_join_objects_exec(), ED_mesh_update(), ED_vpaint_color_transform(), editbmesh_calc_modifier_final_normals(), mesh_calc_modifier_final_normals(), mesh_ensure_tessellation_customdata(), mesh_init_origspace(), vertex_color_set(), and vertex_color_smooth().
| void BKE_mesh_tessface_ensure | ( | struct Mesh * | mesh | ) |
Definition at line 1560 of file mesh.c.
References BKE_mesh_tessface_calc(), mesh, Mesh::totface, and Mesh::totpoly.
Referenced by bc_get_mesh_copy(), deformVerts(), blender::io::alembic::ABCHairWriter::do_write(), editbmesh_calc_modifier_final_normals(), mesh_calc_modifier_final_normals(), modifyMesh(), particle_batch_cache_ensure_pos_and_seg(), particle_batch_cache_ensure_procedural_strand_data(), particle_intersect_mesh(), particle_system_update(), PE_mirror_x(), psys_thread_context_init_distribute(), and remap_hair_emitter().
| void BKE_mesh_texspace_calc | ( | struct Mesh * | me | ) |
Definition at line 1079 of file mesh.c.
References Freestyle::a, BKE_mesh_wrapper_minmax(), copy_v3_v3(), INIT_MINMAX, Mesh::loc, max, ME_AUTOSPACE, ME_AUTOSPACE_EVALUATED, mid_v3_v3v3(), min, size(), Mesh::size, and Mesh::texflag.
Referenced by BKE_mesh_eval_geometry(), BKE_mesh_from_nurbs_displist(), and BKE_mesh_texspace_ensure().
Definition at line 1150 of file mesh.c.
References BKE_object_obdata_texspace_get(), copy_v3_v3(), Mesh::loc, Mesh::size, and Mesh::texflag.
Referenced by BKE_mesh_nomain_to_mesh(), and mesh_new_from_mball_object().
| void BKE_mesh_texspace_ensure | ( | struct Mesh * | me | ) |
Definition at line 1116 of file mesh.c.
References BKE_mesh_texspace_calc(), ME_AUTOSPACE, ME_AUTOSPACE_EVALUATED, and Mesh::texflag.
Referenced by BKE_mesh_texspace_get(), BKE_mesh_texspace_get_reference(), and psys_get_texture().
Definition at line 1123 of file mesh.c.
References BKE_mesh_texspace_ensure(), copy_v3_v3(), Mesh::loc, and Mesh::size.
Referenced by BKE_mesh_orco_verts_transform().
| void BKE_mesh_texspace_get_reference | ( | struct Mesh * | me, |
| short ** | r_texflag, | ||
| float ** | r_loc, | ||
| float ** | r_size | ||
| ) |
Definition at line 1135 of file mesh.c.
References BKE_mesh_texspace_ensure(), Mesh::loc, NULL, Mesh::size, and Mesh::texflag.
Referenced by BKE_object_obdata_texspace_get(), drw_call_calc_orco(), eevee_volume_object_mesh_init(), and OVERLAY_texture_space().
| struct BMesh* BKE_mesh_to_bmesh | ( | struct Mesh * | me, |
| struct Object * | ob, | ||
| const bool | add_key_index, | ||
| const struct BMeshCreateParams * | params | ||
| ) |
Definition at line 1019 of file mesh.c.
References BKE_mesh_to_bmesh_ex(), params, and Object::shapenr.
Referenced by EDBM_mesh_make().
| struct BMesh* BKE_mesh_to_bmesh_ex | ( | const struct Mesh * | me, |
| const struct BMeshCreateParams * | create_params, | ||
| const struct BMeshFromMeshParams * | convert_params | ||
| ) |
| void BKE_mesh_to_curve | ( | struct Main * | bmain, |
| struct Depsgraph * | depsgraph, | ||
| struct Scene * | scene, | ||
| struct Object * | ob | ||
| ) |
Referenced by object_convert_exec().
| void BKE_mesh_to_curve_nurblist | ( | const struct Mesh * | me, |
| struct ListBase * | nurblist, | ||
| const int | edge_users_test | ||
| ) |
Referenced by knifeproject_poly_from_object().
| void BKE_mesh_to_pointcloud | ( | struct Main * | bmain, |
| struct Depsgraph * | depsgraph, | ||
| struct Scene * | scene, | ||
| struct Object * | ob | ||
| ) |
Referenced by object_convert_exec().
Definition at line 1485 of file mesh.c.
References BKE_mesh_update_customdata_pointers(), Key::block, CD_MVERT, CD_NORMAL, MVert::co, copy_m3_m4(), CustomData_duplicate_referenced_layer(), KeyBlock::data, ListBase::first, float(), Mesh::key, Mesh::ldata, mul_m3_v3(), mul_m4_v3(), KeyBlock::next, normalize_m3(), KeyBlock::totelem, Mesh::totloop, and Mesh::totvert.
Referenced by apply_objects_internal(), and blender::nodes::transform_mesh().
Definition at line 1522 of file mesh.c.
References add_v3_v3(), BKE_mesh_update_customdata_pointers(), Key::block, CD_MVERT, MVert::co, CustomData_duplicate_referenced_layer(), KeyBlock::data, ListBase::first, Mesh::key, Mesh::mvert, KeyBlock::next, KeyBlock::totelem, and Mesh::totvert.
Referenced by blender::nodes::geo_node_mesh_primitive_cone_exec(), object_origin_set_exec(), and blender::nodes::transform_mesh().
| void BKE_mesh_update_customdata_pointers | ( | struct Mesh * | me, |
| const bool | do_ensure_tess_cd | ||
| ) |
Definition at line 766 of file mesh.c.
References CD_MCOL, CD_MDEFORMVERT, CD_MEDGE, CD_MFACE, CD_MLOOP, CD_MLOOPCOL, CD_MLOOPUV, CD_MPOLY, CD_MTFACE, CD_MVERT, CustomData_get_layer(), Mesh::dvert, Mesh::fdata, Mesh::ldata, Mesh::mcol, Mesh::medge, mesh_update_linked_customdata(), Mesh::mface, Mesh::mloop, Mesh::mloopcol, Mesh::mloopuv, Mesh::mpoly, Mesh::mtface, and Mesh::mvert.
Referenced by add_orco_mesh(), BKE_mesh_convert_mfaces_to_mpolys(), BKE_mesh_do_versions_convert_mfaces_to_mpolys(), BKE_mesh_from_metaball(), BKE_mesh_new_nomain(), BKE_mesh_new_nomain_from_template_ex(), BKE_mesh_nomain_to_mesh(), BKE_mesh_split_faces(), BKE_mesh_tessface_calc(), BKE_mesh_transform(), BKE_mesh_translate(), BKE_sculpt_color_layer_create_if_needed(), blo_do_versions_280(), BM_mesh_bm_to_me(), BM_mesh_bm_to_me_for_eval(), blender::bke::create_attribute_providers_for_mesh(), customdata_version_242(), delete_customdata_layer(), ED_mesh_color_add(), ED_mesh_color_ensure(), ED_mesh_join_objects_exec(), ED_mesh_sculpt_color_add(), ED_mesh_sculpt_color_ensure(), ED_mesh_uv_texture_add(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), hair_create_input_mesh(), mesh_add_edges(), mesh_add_loops(), mesh_add_polys(), mesh_add_verts(), mesh_clear_geometry(), mesh_copy_data(), SCULPT_dynamic_topology_disable_ex(), sculpt_undo_geometry_restore_data(), um_arraystore_compact_ex(), and um_arraystore_expand().
| bool BKE_mesh_validate | ( | Mesh * | me, |
| const bool | do_verbose, | ||
| const bool | cddata_check_mask | ||
| ) |
Validates and corrects a Mesh.
Definition at line 1048 of file mesh_validate.c.
References BKE_mesh_validate_all_customdata(), BKE_mesh_validate_arrays(), CLOG_INFO, DEG_id_tag_update(), Mesh::dvert, Mesh::id, ID_RECALC_GEOMETRY, is_valid, Mesh::ldata, LOG, Mesh::medge, Mesh::mface, Mesh::mloop, Mesh::mpoly, Mesh::mvert, ID::name, Mesh::totedge, Mesh::totface, Mesh::totloop, Mesh::totpoly, and Mesh::totvert.
Referenced by BKE_mesh_split_faces(), MeshImporter::create_mesh_object(), Freestyle::BlenderStrokeRenderer::GenerateStrokeMesh(), blender::io::alembic::read_mpolys(), blender::io::alembic::AbcSubDReader::readObjectData(), blender::io::alembic::AbcPointsReader::readObjectData(), and blender::io::alembic::AbcMeshReader::readObjectData().
| bool BKE_mesh_validate_all_customdata | ( | CustomData * | vdata, |
| const uint | totvert, | ||
| CustomData * | edata, | ||
| const uint | totedge, | ||
| CustomData * | ldata, | ||
| const uint | totloop, | ||
| CustomData * | pdata, | ||
| const uint | totpoly, | ||
| const bool | check_meshmask, | ||
| const bool | do_verbose, | ||
| const bool | do_fixes, | ||
| bool * | r_change | ||
| ) |
Definition at line 982 of file mesh_validate.c.
References CD_MASK_MESH, CD_MLOOPCOL, CD_MLOOPUV, CustomData_get_clone_layer(), CustomData_get_stencil_layer(), CustomData_number_of_layers(), CustomData_set_layer_clone(), CustomData_set_layer_stencil(), is_valid, mask(), MAX_MCOL, MAX_MTFACE, mesh_validate_customdata(), and PRINT_ERR.
Referenced by BKE_mesh_is_valid(), BKE_mesh_runtime_is_valid(), BKE_mesh_validate(), and DM_is_valid().
| bool BKE_mesh_validate_arrays | ( | Mesh * | mesh, |
| MVert * | mverts, | ||
| unsigned int | totvert, | ||
| MEdge * | medges, | ||
| unsigned int | totedge, | ||
| MFace * | mfaces, | ||
| unsigned int | totface, | ||
| MLoop * | mloops, | ||
| unsigned int | totloop, | ||
| MPoly * | mpolys, | ||
| unsigned int | totpoly, | ||
| MDeformVert * | dverts, | ||
| const bool | do_verbose, | ||
| const bool | do_fixes, | ||
| bool * | r_changed | ||
| ) |
Validate the mesh, do_fixes requires mesh to be non-null.
Definition at line 222 of file mesh_validate.c.
References BKE_defvert_remove_group(), BKE_mesh_calc_edges(), BKE_mesh_strip_loose_edges(), BKE_mesh_strip_loose_faces(), BKE_mesh_strip_loose_polysloops(), BLI_assert, BLI_edgehash_free(), BLI_edgehash_haskey(), BLI_edgehash_insert(), BLI_edgehash_lookup(), BLI_edgehash_new_ex(), CHECK_FACE_EDGE, CHECK_FACE_VERT_INDEX, CLAMP, MDeformWeight::def_nr, MDeformVert::dw, MLoop::e, edge_store_from_mface_quad(), edge_store_from_mface_tri(), SortFace::es, faces, MVert::flag, if(), SortFace::index, SortPoly::index, MSelect::index, int64_cmp(), int_cmp(), SortPoly::invalid, IS_REMOVED_EDGE, is_valid, CCL_NAMESPACE_BEGIN::isfinite(), SortPoly::loopstart, ME_ESEL, ME_FSEL, ME_VERT_TMP_TAG, ME_VSEL, MEM_callocN, MEM_freeN, MEM_mallocN, mesh, Mesh::mselect, NULL, SortPoly::numverts, POINTER_AS_INT, POINTER_FROM_INT, PRINT_ERR, PRINT_MSG, REMOVE_EDGE_TAG, REMOVE_FACE_TAG, REMOVE_LOOP_TAG, REMOVE_POLY_TAG, search_face_cmp(), search_poly_cmp(), search_polyloop_cmp(), Mesh::totedge, Mesh::totpoly, Mesh::totselect, Mesh::totvert, MSelect::type, v, MLoop::v, v1, MEdge::v1, MFace::v1, v2, MEdge::v2, MFace::v2, MFace::v3, MFace::v4, SortPoly::verts, verts, MDeformWeight::weight, and zero_v3().
Referenced by BKE_mesh_is_valid(), BKE_mesh_runtime_is_valid(), BKE_mesh_validate(), blo_do_versions_290(), and DM_is_valid().
| bool BKE_mesh_validate_material_indices | ( | Mesh * | me | ) |
Check all material indices of polygons are valid, invalid ones are set to 0.
Definition at line 1148 of file mesh_validate.c.
References DEG_id_tag_update(), Mesh::id, ID_RECALC_GEOMETRY, is_valid, MPoly::mat_nr, max_ii(), Mesh::mpoly, Mesh::totcol, and Mesh::totpoly.
Referenced by add_orco_mesh(), BKE_crazyspace_build_sculpt(), BKE_mesh_create_derived_for_modifier(), BKE_mesh_remap_calc_edges_from_mesh(), BKE_mesh_remap_calc_loops_from_mesh(), BKE_mesh_remap_calc_verts_from_mesh(), BKE_mesh_remap_find_best_match_from_mesh(), BKE_multires_create_deformed_base_mesh_vert_coords(), BKE_shrinkwrap_mesh_nearest_surface_deform(), BKE_shrinkwrap_remesh_target_project(), build_pbvh_from_regular_mesh(), correctivesmooth_modifier_do(), crazyspace_init_verts_and_matrices(), curve_calc_modifiers_post(), do_hair_dynamics(), editbmesh_calc_modifiers(), mesh_calc_modifiers(), modifyMesh(), multiresModifier_reshapeFromDeformModifier(), multiresModifier_reshapeFromObject(), sculpt_update_object(), and uvprojectModifier_do().
Definition at line 1755 of file mesh.c.
References Mesh_Runtime::cd_dirty_vert, CD_MASK_NORMAL, CD_MVERT, copy_v3_v3(), CustomData_duplicate_referenced_layer(), mesh, Mesh::mvert, Mesh::runtime, and Mesh::totvert.
Referenced by BKE_mesh_create_derived_for_modifier(), BKE_mesh_wrapper_ensure_mdata(), BKE_shrinkwrap_mesh_nearest_surface_deform(), BKE_shrinkwrap_remesh_target_project(), create_orco_mesh(), curve_calc_modifiers_post(), deformVerts(), do_hair_dynamics(), ED_object_data_xform_restore(), editbmesh_calc_modifiers(), mesh_calc_modifiers(), and MOD_deform_mesh_eval_get().
| void BKE_mesh_vert_coords_apply_with_mat4 | ( | struct Mesh * | mesh, |
| const float(*) | vert_coords[3], | ||
| const float | mat[4][4] | ||
| ) |
Definition at line 1766 of file mesh.c.
References Mesh_Runtime::cd_dirty_vert, CD_MASK_NORMAL, CD_MVERT, CustomData_duplicate_referenced_layer(), mesh, mul_v3_m4v3(), Mesh::mvert, Mesh::runtime, and Mesh::totvert.
Referenced by ED_object_data_xform_by_mat4().
Referenced by ED_object_data_xform_create_ex().
| void BKE_mesh_vert_normals_apply | ( | struct Mesh * | mesh, |
| const short(*) | vert_normals[3] | ||
| ) |
Definition at line 1779 of file mesh.c.
References Mesh_Runtime::cd_dirty_vert, CD_MASK_NORMAL, CD_MVERT, copy_v3_v3_short(), CustomData_duplicate_referenced_layer(), mesh, Mesh::mvert, Mesh::runtime, and Mesh::totvert.
| void BKE_mesh_wrapper_deferred_finalize | ( | struct Mesh * | me_eval, |
| const CustomData_MeshMasks * | cd_mask_finalize | ||
| ) |
Definition at line 878 of file DerivedMesh.cc.
References BLI_assert, editbmesh_calc_modifier_final_normals(), ME_WRAPPER_TYPE_BMESH, Mesh::runtime, and Mesh_Runtime::wrapper_type_finalize.
Referenced by BKE_mesh_wrapper_ensure_mdata().
| void BKE_pointcloud_from_mesh | ( | struct Mesh * | me, |
| struct PointCloud * | pointcloud | ||
| ) |
Definition at line 909 of file mesh_convert.c.
References BKE_pointcloud_update_customdata_pointers(), BLI_assert, CD_DUPLICATE, CD_MASK_PROP_ALL, PointCloud::co, MVert::co, copy_v3_v3(), CustomData_merge(), CustomData_realloc(), CustomData_update_typemap(), mask(), Mesh::mvert, NULL, PointCloud::pdata, PointCloud::totpoint, and Mesh::totvert.
Referenced by BKE_mesh_to_pointcloud().
| void BKE_pointcloud_to_mesh | ( | struct Main * | bmain, |
| struct Depsgraph * | depsgraph, | ||
| struct Scene * | scene, | ||
| struct Object * | ob | ||
| ) |
Referenced by object_convert_exec().
| int poly_get_adj_loops_from_vert | ( | const struct MPoly * | poly, |
| const struct MLoop * | mloop, | ||
| unsigned int | vert, | ||
| unsigned int | r_adj[2] | ||
| ) |
Referenced by sculpt_vertex_neighbors_get_faces().
| int test_index_face | ( | struct MFace * | mface, |
| struct CustomData * | mfdata, | ||
| int | mfindex, | ||
| int | nr | ||
| ) |
Definition at line 1203 of file mesh.c.
References CustomData_swap_corners(), SWAP, MFace::v1, MFace::v2, MFace::v3, and MFace::v4.
Referenced by BKE_mesh_tessface_calc_ex(), cutEdges(), and explodeMesh().
|
extern |
Definition at line 248 of file mesh_runtime.c.
Referenced by BKE_mesh_batch_cache_dirty_tag(), and DRW_engines_register().
Definition at line 249 of file mesh_runtime.c.
Referenced by BKE_mesh_batch_cache_free(), and DRW_engines_register().