Blender  V3.3
ED_mesh.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2008 Blender Foundation. All rights reserved. */
3 
8 #pragma once
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 #include "BLI_compiler_attrs.h"
15 
16 struct ARegion;
17 struct BMBVHTree;
18 struct BMEdge;
19 struct BMEditMesh;
20 struct BMElem;
21 struct BMFace;
22 struct BMLoop;
23 struct BMVert;
24 struct BMesh;
26 struct Base;
27 struct Depsgraph;
28 struct ID;
29 struct MDeformVert;
30 struct Mesh;
31 struct Object;
32 struct ReportList;
33 struct Scene;
34 struct SelectPick_Params;
35 struct UndoType;
36 struct UvMapVert;
37 struct UvVertMap;
38 struct View3D;
39 struct ViewContext;
40 struct bContext;
41 struct bDeformGroup;
42 struct wmKeyConfig;
43 struct wmOperator;
44 
45 /* editmesh_utils.c */
46 
58  int axis,
59  bool use_self,
60  bool use_select,
61  bool respecthide,
62  bool use_topology,
63  float maxdist,
64  int *r_index);
66  int axis,
67  bool use_self,
68  bool use_select,
69  bool respecthide,
70  bool use_topology);
71 void EDBM_verts_mirror_apply(struct BMEditMesh *em, int sel_from, int sel_to);
72 struct BMVert *EDBM_verts_mirror_get(struct BMEditMesh *em, struct BMVert *v);
73 struct BMEdge *EDBM_verts_mirror_get_edge(struct BMEditMesh *em, struct BMEdge *e);
74 struct BMFace *EDBM_verts_mirror_get_face(struct BMEditMesh *em, struct BMFace *f);
75 void EDBM_verts_mirror_cache_clear(struct BMEditMesh *em, struct BMVert *v);
77 
79  const struct BMeshNormalsUpdate_Params *params);
80 void EDBM_mesh_normals_update(struct BMEditMesh *em);
81 void EDBM_mesh_clear(struct BMEditMesh *em);
82 
83 void EDBM_selectmode_to_scene(struct bContext *C);
84 void EDBM_mesh_make(struct Object *ob, int select_mode, bool add_key_index);
88 void EDBM_mesh_free_data(struct BMEditMesh *em);
94 void EDBM_mesh_load_ex(struct Main *bmain, struct Object *ob, bool free_data);
95 void EDBM_mesh_load(struct Main *bmain, struct Object *ob);
96 
103 void EDBM_select_more(struct BMEditMesh *em, bool use_face_step);
104 void EDBM_select_less(struct BMEditMesh *em, bool use_face_step);
105 
106 void EDBM_selectmode_flush_ex(struct BMEditMesh *em, short selectmode);
107 void EDBM_selectmode_flush(struct BMEditMesh *em);
108 
109 void EDBM_deselect_flush(struct BMEditMesh *em);
110 void EDBM_select_flush(struct BMEditMesh *em);
111 
112 bool EDBM_vert_color_check(struct BMEditMesh *em);
113 
117 bool EDBM_mesh_hide(struct BMEditMesh *em, bool swap);
118 bool EDBM_mesh_reveal(struct BMEditMesh *em, bool select);
119 
124 };
125 
129 void EDBM_update(struct Mesh *me, const struct EDBMUpdate_Params *params);
133 void EDBM_update_extern(struct Mesh *me, bool do_tessellation, bool is_destructive);
134 
139  const struct Scene *scene,
140  bool uv_selected,
141  bool use_winding,
142  bool do_islands);
143 void BM_uv_element_map_free(struct UvElementMap *element_map);
145  struct BMFace *efa,
146  struct BMLoop *l);
147 
151 bool EDBM_uv_check(struct BMEditMesh *em);
156 struct BMFace *EDBM_uv_active_face_get(struct BMEditMesh *em, bool sloppy, bool selected);
157 
158 void BM_uv_vert_map_free(struct UvVertMap *vmap);
159 struct UvMapVert *BM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v);
163 struct UvVertMap *BM_uv_vert_map_create(struct BMesh *bm, bool use_select, bool use_winding);
164 
165 void EDBM_flag_enable_all(struct BMEditMesh *em, char hflag);
166 void EDBM_flag_disable_all(struct BMEditMesh *em, char hflag);
167 
168 bool BMBVH_EdgeVisible(struct BMBVHTree *tree,
169  struct BMEdge *e,
170  struct Depsgraph *depsgraph,
171  struct ARegion *region,
172  struct View3D *v3d,
173  struct Object *obedit);
174 
175 void EDBM_project_snap_verts(struct bContext *C,
176  struct Depsgraph *depsgraph,
177  struct ARegion *region,
178  struct Object *obedit,
179  struct BMEditMesh *em);
180 
181 /* editmesh_automerge.c */
182 
183 void EDBM_automerge(struct Object *ob, bool update, char hflag, float dist);
185  struct Object *ob, bool split_edges, bool split_faces, bool update, char hflag, float dist);
186 
187 /* editmesh_undo.c */
188 
190 void ED_mesh_undosys_type(struct UndoType *ut);
191 
192 /* editmesh_select.c */
193 
195  const struct Mesh *me,
196  int axis,
197  bool extend,
198  int *r_totmirr,
199  int *r_totfail);
200 
212 struct BMVert *EDBM_vert_find_nearest_ex(struct ViewContext *vc,
213  float *dist_px_manhattan_p,
214  bool use_select_bias,
215  bool use_cycle,
216  struct Base **bases,
217  uint bases_len,
218  uint *r_base_index);
219 struct BMVert *EDBM_vert_find_nearest(struct ViewContext *vc, float *dist_px_manhattan_p);
220 
221 struct BMEdge *EDBM_edge_find_nearest_ex(struct ViewContext *vc,
222  float *dist_px_manhattan,
223  float *r_dist_center,
224  bool use_select_bias,
225  bool use_cycle,
226  struct BMEdge **r_eed_zbuf,
227  struct Base **bases,
228  uint bases_len,
229  uint *r_base_index);
230 struct BMEdge *EDBM_edge_find_nearest(struct ViewContext *vc, float *dist_px_manhattan_p);
231 
239 struct BMFace *EDBM_face_find_nearest_ex(struct ViewContext *vc,
240  float *dist_px_manhattan,
241  float *r_dist_center,
242  bool use_zbuf_single_px,
243  bool use_select_bias,
244  bool use_cycle,
245  struct BMFace **r_efa_zbuf,
246  struct Base **bases,
247  uint bases_len,
248  uint *r_base_index);
249 struct BMFace *EDBM_face_find_nearest(struct ViewContext *vc, float *dist_px_manhattan_p);
250 
251 bool EDBM_unified_findnearest(struct ViewContext *vc,
252  struct Base **bases,
253  uint bases_len,
254  int *r_base_index,
255  struct BMVert **r_eve,
256  struct BMEdge **r_eed,
257  struct BMFace **r_efa);
258 
260  struct Base **bases,
261  uint bases_len,
262  bool use_boundary_vertices,
263  bool use_boundary_edges,
264  int *r_base_index_vert,
265  int *r_base_index_edge,
266  int *r_base_index_face,
267  struct BMVert **r_eve,
268  struct BMEdge **r_eed,
269  struct BMFace **r_efa);
270 
271 bool EDBM_select_pick(struct bContext *C,
272  const int mval[2],
273  const struct SelectPick_Params *params);
274 
279 void EDBM_selectmode_set(struct BMEditMesh *em);
294 void EDBM_selectmode_convert(struct BMEditMesh *em, short selectmode_old, short selectmode_new);
295 
299 bool EDBM_selectmode_set_multi(struct bContext *C, short selectmode);
304  struct bContext *C, short selectmode_new, int action, bool use_extend, bool use_expand);
305 
312 bool EDBM_selectmode_disable(struct Scene *scene,
313  struct BMEditMesh *em,
314  short selectmode_disable,
315  short selectmode_fallback);
316 
317 bool EDBM_deselect_by_material(struct BMEditMesh *em, short index, bool select);
318 
319 void EDBM_select_toggle_all(struct BMEditMesh *em);
320 
321 void EDBM_select_swap(struct BMEditMesh *em); /* exported for UV */
322 bool EDBM_select_interior_faces(struct BMEditMesh *em);
323 void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc); /* rename? */
324 
325 bool EDBM_mesh_deselect_all_multi_ex(struct Base **bases, uint bases_len);
328  struct Base **bases,
329  uint bases_len,
330  short selectmode_disable,
331  short selectmode_fallback);
333  short selectmode_disable,
334  short selectmode_fallback);
335 
336 /* editmesh_preselect_edgering.c */
337 
342 void EDBM_preselect_edgering_draw(struct EditMesh_PreSelEdgeRing *psel, const float matrix[4][4]);
344  struct BMesh *bm,
345  struct BMEdge *eed_start,
346  int previewlines,
347  const float (*coords)[3]);
348 
349 /* editmesh_preselect_elem.c */
350 
351 struct EditMesh_PreSelElem;
357 
362 void EDBM_preselect_elem_draw(struct EditMesh_PreSelElem *psel, const float matrix[4][4]);
364  struct BMesh *bm,
365  struct BMElem *ele,
366  const float (*coords)[3]);
367 
369  struct ViewContext *vc,
370  struct BMesh *bm,
371  struct BMElem *ele,
372  const int mval[2]);
376 
377 /* mesh_ops.c */
378 
379 void ED_operatortypes_mesh(void);
380 void ED_operatormacros_mesh(void);
384 void ED_keymap_mesh(struct wmKeyConfig *keyconf);
385 
386 /* editface.cc */
387 
392 void paintface_flush_flags(struct bContext *C, struct Object *ob, short flag);
397  const int mval[2],
398  const struct SelectPick_Params *params,
399  struct Object *ob);
401  struct Object *ob,
402  int action,
403  bool flush_flags);
404 void paintface_select_linked(struct bContext *C,
405  struct Object *ob,
406  const int mval[2],
407  bool select);
408 bool paintface_minmax(struct Object *ob, float r_min[3], float r_max[3]);
409 
410 void paintface_hide(struct bContext *C, struct Object *ob, bool unselected);
411 void paintface_reveal(struct bContext *C, struct Object *ob, bool select);
412 
417 bool paintvert_deselect_all_visible(struct Object *ob, int action, bool flush_flags);
418 void paintvert_select_ungrouped(struct Object *ob, bool extend, bool flush_flags);
424 void paintvert_flush_flags(struct Object *ob);
425 void paintvert_tag_select_update(struct bContext *C, struct Object *ob);
426 
427 void paintvert_hide(struct bContext *C, struct Object *ob, bool unselected);
428 void paintvert_reveal(struct bContext *C, struct Object *ob, bool select);
429 
430 /* mirrtopo */
431 typedef struct MirrTopoStore_t {
437 
439  struct Mesh *me,
441 void ED_mesh_mirrtopo_init(struct BMEditMesh *em,
442  struct Mesh *me,
444  bool skip_em_vert_array_init);
446 
447 /* object_vgroup.c */
448 
449 #define WEIGHT_REPLACE 1
450 #define WEIGHT_ADD 2
451 #define WEIGHT_SUBTRACT 3
452 
453 bool ED_vgroup_sync_from_pose(struct Object *ob);
454 void ED_vgroup_select_by_name(struct Object *ob, const char *name);
458 void ED_vgroup_data_clamp_range(struct ID *id, int total);
462 bool ED_vgroup_array_copy(struct Object *ob, struct Object *ob_from);
463 bool ED_vgroup_parray_alloc(struct ID *id,
464  struct MDeformVert ***dvert_arr,
465  int *dvert_tot,
466  bool use_vert_sel);
474 void ED_vgroup_parray_mirror_sync(struct Object *ob,
475  struct MDeformVert **dvert_array,
476  int dvert_tot,
477  const bool *vgroup_validmap,
478  int vgroup_tot);
484 void ED_vgroup_parray_mirror_assign(struct Object *ob,
485  struct MDeformVert **dvert_array,
486  int dvert_tot);
487 void ED_vgroup_parray_remove_zero(struct MDeformVert **dvert_array,
488  int dvert_tot,
489  const bool *vgroup_validmap,
490  int vgroup_tot,
491  float epsilon,
492  bool keep_single);
493 void ED_vgroup_parray_to_weight_array(const struct MDeformVert **dvert_array,
494  int dvert_tot,
495  float *dvert_weights,
496  int def_nr);
497 void ED_vgroup_parray_from_weight_array(struct MDeformVert **dvert_array,
498  int dvert_tot,
499  const float *dvert_weights,
500  int def_nr,
501  bool remove_zero);
502 void ED_vgroup_mirror(struct Object *ob,
503  bool mirror_weights,
504  bool flip_vgroups,
505  bool all_vgroups,
506  bool use_topology,
507  int *r_totmirr,
508  int *r_totfail);
509 
513 void ED_vgroup_vert_add(
514  struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode);
518 void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum);
519 float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum);
523 void ED_vgroup_vert_active_mirror(struct Object *ob, int def_nr);
524 
525 /* mesh_data.cc */
526 
527 void ED_mesh_verts_add(struct Mesh *mesh, struct ReportList *reports, int count);
528 void ED_mesh_edges_add(struct Mesh *mesh, struct ReportList *reports, int count);
529 void ED_mesh_loops_add(struct Mesh *mesh, struct ReportList *reports, int count);
530 void ED_mesh_polys_add(struct Mesh *mesh, struct ReportList *reports, int count);
531 
532 void ED_mesh_verts_remove(struct Mesh *mesh, struct ReportList *reports, int count);
533 void ED_mesh_edges_remove(struct Mesh *mesh, struct ReportList *reports, int count);
534 void ED_mesh_loops_remove(struct Mesh *mesh, struct ReportList *reports, int count);
535 void ED_mesh_polys_remove(struct Mesh *mesh, struct ReportList *reports, int count);
536 
537 void ED_mesh_geometry_clear(struct Mesh *mesh);
538 
539 void ED_mesh_update(struct Mesh *mesh, struct bContext *C, bool calc_edges, bool calc_edges_loose);
540 
541 void ED_mesh_uv_ensure(struct Mesh *me, const char *name);
542 int ED_mesh_uv_add(
543  struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports);
544 bool ED_mesh_uv_remove_index(struct Mesh *me, int n);
545 bool ED_mesh_uv_remove_active(struct Mesh *me);
546 bool ED_mesh_uv_remove_named(struct Mesh *me, const char *name);
547 void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me);
551 void ED_mesh_uv_loop_reset_ex(struct Mesh *me, int layernum);
552 bool ED_mesh_color_ensure(struct Mesh *me, const char *name);
554  struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports);
555 bool ED_mesh_color_remove_index(struct Mesh *me, int n);
556 bool ED_mesh_color_remove_active(struct Mesh *me);
557 bool ED_mesh_color_remove_named(struct Mesh *me, const char *name);
558 
559 bool ED_mesh_sculpt_color_ensure(struct Mesh *me, const char *name);
561  struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports);
562 bool ED_mesh_sculpt_color_remove_index(struct Mesh *me, int n);
564 bool ED_mesh_sculpt_color_remove_named(struct Mesh *me, const char *name);
565 
566 void ED_mesh_report_mirror(struct wmOperator *op, int totmirr, int totfail);
567 void ED_mesh_report_mirror_ex(struct wmOperator *op, int totmirr, int totfail, char selectmode);
568 
572 struct Mesh *ED_mesh_context(struct bContext *C);
573 
574 /* mesh backup */
575 typedef struct BMBackup {
576  struct BMesh *bmcopy;
578 
582 struct BMBackup EDBM_redo_state_store(struct BMEditMesh *em);
586 void EDBM_redo_state_restore(struct BMBackup *backup, struct BMEditMesh *em, bool recalc_looptri)
587  ATTR_NONNULL(1, 2);
592  struct BMEditMesh *em,
593  bool recalc_looptri) ATTR_NONNULL(1, 2);
595 
596 /* *** meshtools.cc *** */
597 
598 int ED_mesh_join_objects_exec(struct bContext *C, struct wmOperator *op);
599 int ED_mesh_shapes_join_objects_exec(struct bContext *C, struct wmOperator *op);
600 
601 /* mirror lookup api */
602 
603 /* Spatial Mirror */
605  struct BMEditMesh *em,
606  struct Mesh *me_eval);
609  struct BMEditMesh *em,
610  struct Mesh *me_eval,
611  const float co[3]);
612 
613 /* Topology Mirror */
614 
620 void ED_mesh_mirror_topo_table_begin(struct Object *ob, struct Mesh *me_eval);
622 
627 int mesh_get_x_mirror_vert(struct Object *ob, struct Mesh *me_eval, int index, bool use_topology);
628 struct BMVert *editbmesh_get_x_mirror_vert(struct Object *ob,
629  struct BMEditMesh *em,
630  struct BMVert *eve,
631  const float co[3],
632  int index,
633  bool use_topology);
637 int *mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em, struct Mesh *me_eval);
638 
644 int ED_mesh_mirror_get_vert(struct Object *ob, int index);
645 
646 bool ED_mesh_pick_vert(struct bContext *C,
647  struct Object *ob,
648  const int mval[2],
649  uint dist_px,
650  bool use_zbuf,
651  uint *r_index);
658 bool ED_mesh_pick_face(
659  struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, uint *r_index);
665  struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, uint *r_index);
666 
667 struct MDeformVert *ED_mesh_active_dvert_get_em(struct Object *ob, struct BMVert **r_eve);
668 struct MDeformVert *ED_mesh_active_dvert_get_ob(struct Object *ob, int *r_index);
670 
671 void EDBM_mesh_stats_multi(struct Object **objects,
672  uint objects_len,
673  int totelem[3],
674  int totelem_sel[3]);
675 void EDBM_mesh_elem_index_ensure_multi(struct Object **objects, uint objects_len, char htype);
676 
677 #define ED_MESH_PICK_DEFAULT_VERT_DIST 25
678 #define ED_MESH_PICK_DEFAULT_FACE_DIST 1
679 
680 #define USE_LOOPSLIDE_HACK
681 
682 #ifdef __cplusplus
683 }
684 #endif
#define ATTR_NONNULL(...)
unsigned int uint
Definition: BLI_sys_types.h:67
void swap(T &a, T &b)
Definition: Common.h:19
struct Depsgraph Depsgraph
Definition: DEG_depsgraph.h:35
void ED_mesh_uv_ensure(struct Mesh *me, const char *name)
Definition: mesh_data.cc:310
void EDBM_selectmode_to_scene(struct bContext *C)
void paintface_reveal(struct bContext *C, struct Object *ob, bool select)
Definition: editface.cc:141
bool ED_mesh_pick_face_vert(struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, uint *r_index)
Definition: meshtools.cc:1241
bool EDBM_select_interior_faces(struct BMEditMesh *em)
void ED_mesh_undosys_type(struct UndoType *ut)
bool ED_mesh_sculpt_color_remove_named(struct Mesh *me, const char *name)
Definition: mesh_data.cc:605
int ED_mesh_sculpt_color_add(struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports)
void ED_vgroup_mirror(struct Object *ob, bool mirror_weights, bool flip_vgroups, bool all_vgroups, bool use_topology, int *r_totmirr, int *r_totfail)
void void EDBM_redo_state_restore_and_free(struct BMBackup *backup, struct BMEditMesh *em, bool recalc_looptri) ATTR_NONNULL(1
void EDBM_mesh_load(struct Main *bmain, struct Object *ob)
void EDBM_preselect_elem_update_preview(struct EditMesh_PreSelElem *psel, struct ViewContext *vc, struct BMesh *bm, struct BMElem *ele, const int mval[2])
void EDBM_preselect_elem_destroy(struct EditMesh_PreSelElem *psel)
bool EDBM_unified_findnearest_from_raycast(struct ViewContext *vc, struct Base **bases, uint bases_len, bool use_boundary_vertices, bool use_boundary_edges, int *r_base_index_vert, int *r_base_index_edge, int *r_base_index_face, struct BMVert **r_eve, struct BMEdge **r_eed, struct BMFace **r_efa)
void EDBM_mesh_clear(struct BMEditMesh *em)
bool ED_mesh_color_remove_active(struct Mesh *me)
Definition: mesh_data.cc:461
bool EDBM_selectmode_disable_multi(struct bContext *C, short selectmode_disable, short selectmode_fallback)
void EDBM_verts_mirror_cache_clear(struct BMEditMesh *em, struct BMVert *v)
bool ED_mesh_color_remove_index(struct Mesh *me, int n)
Definition: mesh_data.cc:442
bool ED_mesh_uv_remove_named(struct Mesh *me, const char *name)
Definition: mesh_data.cc:361
void ED_mesh_mirror_topo_table_end(struct Object *ob)
bool paintvert_deselect_all_visible(struct Object *ob, int action, bool flush_flags)
Definition: editface.cc:464
void ED_operatortypes_mesh(void)
Definition: mesh_ops.c:22
struct UvVertMap * BM_uv_vert_map_create(struct BMesh *bm, bool use_select, bool use_winding)
void ED_vgroup_vert_add(struct Object *ob, struct bDeformGroup *dg, int vertnum, float weight, int assignmode)
struct BMVert * EDBM_vert_find_nearest(struct ViewContext *vc, float *dist_px_manhattan_p)
void ED_vgroup_parray_from_weight_array(struct MDeformVert **dvert_array, int dvert_tot, const float *dvert_weights, int def_nr, bool remove_zero)
struct MirrTopoStore_t MirrTopoStore_t
void EDBM_preselect_elem_draw(struct EditMesh_PreSelElem *psel, const float matrix[4][4])
bool EDBM_select_pick(struct bContext *C, const int mval[2], const struct SelectPick_Params *params)
int ED_mesh_color_add(struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports)
void ED_vgroup_parray_mirror_sync(struct Object *ob, struct MDeformVert **dvert_array, int dvert_tot, const bool *vgroup_validmap, int vgroup_tot)
void EDBM_verts_mirror_apply(struct BMEditMesh *em, int sel_from, int sel_to)
int ED_mesh_uv_add(struct Mesh *me, const char *name, bool active_set, bool do_init, struct ReportList *reports)
Definition: mesh_data.cc:244
void ED_vgroup_parray_to_weight_array(const struct MDeformVert **dvert_array, int dvert_tot, float *dvert_weights, int def_nr)
struct BMFace * EDBM_uv_active_face_get(struct BMEditMesh *em, bool sloppy, bool selected)
void ED_keymap_mesh(struct wmKeyConfig *keyconf)
Definition: mesh_ops.c:359
void ED_mesh_verts_remove(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1312
void EDBM_preselect_edgering_destroy(struct EditMesh_PreSelEdgeRing *psel)
struct UvElementMap * BM_uv_element_map_create(struct BMesh *bm, const struct Scene *scene, bool uv_selected, bool use_winding, bool do_islands)
void EDBM_mesh_stats_multi(struct Object **objects, uint objects_len, int totelem[3], int totelem_sel[3])
Definition: meshtools.cc:1483
void EDBM_selectmode_convert(struct BMEditMesh *em, short selectmode_old, short selectmode_new)
struct UvElement * BM_uv_element_get(struct UvElementMap *map, struct BMFace *efa, struct BMLoop *l)
void EDBM_update(struct Mesh *me, const struct EDBMUpdate_Params *params)
struct MDeformVert * ED_mesh_active_dvert_get_ob(struct Object *ob, int *r_index)
Definition: meshtools.cc:1459
eEditMesh_PreSelPreviewAction
Definition: ED_mesh.h:352
@ PRESELECT_ACTION_CREATE
Definition: ED_mesh.h:354
@ PRESELECT_ACTION_DELETE
Definition: ED_mesh.h:355
@ PRESELECT_ACTION_TRANSFORM
Definition: ED_mesh.h:353
bool EDBM_mesh_deselect_all_multi_ex(struct Base **bases, uint bases_len)
void EDBM_redo_state_restore(struct BMBackup *backup, struct BMEditMesh *em, bool recalc_looptri) ATTR_NONNULL(1
void ED_vgroup_parray_mirror_assign(struct Object *ob, struct MDeformVert **dvert_array, int dvert_tot)
void EDBM_preselect_edgering_clear(struct EditMesh_PreSelEdgeRing *psel)
void EDBM_preselect_action_set(struct EditMesh_PreSelElem *psel, eEditMesh_PreSelPreviewAction action)
struct BMFace * EDBM_face_find_nearest_ex(struct ViewContext *vc, float *dist_px_manhattan, float *r_dist_center, bool use_zbuf_single_px, bool use_select_bias, bool use_cycle, struct BMFace **r_efa_zbuf, struct Base **bases, uint bases_len, uint *r_base_index)
void ED_mesh_geometry_clear(struct Mesh *mesh)
Definition: mesh_data.cc:1368
bool paintface_deselect_all_visible(struct bContext *C, struct Object *ob, int action, bool flush_flags)
Definition: editface.cc:255
void ED_mesh_verts_add(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1230
struct BMFace * EDBM_verts_mirror_get_face(struct BMEditMesh *em, struct BMFace *f)
void EDBM_project_snap_verts(struct bContext *C, struct Depsgraph *depsgraph, struct ARegion *region, struct Object *obedit, struct BMEditMesh *em)
struct BMVert * editbmesh_get_x_mirror_vert(struct Object *ob, struct BMEditMesh *em, struct BMVert *eve, const float co[3], int index, bool use_topology)
Definition: meshtools.cc:977
bool ED_mesh_sculpt_color_remove_active(struct Mesh *me)
Definition: mesh_data.cc:596
void ED_mesh_polys_remove(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1354
void ED_mesh_mirror_topo_table_begin(struct Object *ob, struct Mesh *me_eval)
Definition: meshtools.cc:863
void ED_mesh_edges_add(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1239
void ED_mesh_uv_loop_reset(struct bContext *C, struct Mesh *me)
Definition: mesh_data.cc:234
void EDBM_mesh_load_ex(struct Main *bmain, struct Object *ob, bool free_data)
void EDBM_mesh_free_data(struct BMEditMesh *em)
bool ED_mesh_mirrtopo_recalc_check(struct BMEditMesh *em, struct Mesh *me, MirrTopoStore_t *mesh_topo_store)
struct BMEdge * EDBM_edge_find_nearest(struct ViewContext *vc, float *dist_px_manhattan_p)
eEditMesh_PreSelPreviewAction EDBM_preselect_action_get(struct EditMesh_PreSelElem *psel)
void em_setup_viewcontext(struct bContext *C, struct ViewContext *vc)
bool EDBM_mesh_hide(struct BMEditMesh *em, bool swap)
void paintface_select_linked(struct bContext *C, struct Object *ob, const int mval[2], bool select)
Definition: editface.cc:235
int * mesh_get_x_mirror_faces(struct Object *ob, struct BMEditMesh *em, struct Mesh *me_eval)
Definition: meshtools.cc:1115
bool ED_vgroup_sync_from_pose(struct Object *ob)
struct BMBackup EDBM_redo_state_store(struct BMEditMesh *em)
void EDBM_automerge_and_split(struct Object *ob, bool split_edges, bool split_faces, bool update, char hflag, float dist)
struct BMBackup BMBackup
struct MDeformVert * ED_mesh_active_dvert_get_em(struct Object *ob, struct BMVert **r_eve)
Definition: meshtools.cc:1432
struct UvMapVert * BM_uv_vert_map_at_index(struct UvVertMap *vmap, unsigned int v)
bool EDBM_unified_findnearest(struct ViewContext *vc, struct Base **bases, uint bases_len, int *r_base_index, struct BMVert **r_eve, struct BMEdge **r_eed, struct BMFace **r_efa)
struct Mesh * ED_mesh_context(struct bContext *C)
Definition: mesh_data.cc:1406
void EDBM_flag_enable_all(struct BMEditMesh *em, char hflag)
struct BMFace * EDBM_face_find_nearest(struct ViewContext *vc, float *dist_px_manhattan_p)
bool EDBM_selectmode_disable_multi_ex(struct Scene *scene, struct Base **bases, uint bases_len, short selectmode_disable, short selectmode_fallback)
void ED_mesh_loops_remove(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1340
void ED_mesh_loops_add(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1248
void paintface_flush_flags(struct bContext *C, struct Object *ob, short flag)
Definition: editface.cc:39
void paintvert_flush_flags(struct Object *ob)
Definition: editface.cc:412
bool EDBM_selectmode_toggle_multi(struct bContext *C, short selectmode_new, int action, bool use_extend, bool use_expand)
int ED_mesh_shapes_join_objects_exec(struct bContext *C, struct wmOperator *op)
Definition: meshtools.cc:747
void EDBM_verts_mirror_cache_begin_ex(struct BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology, float maxdist, int *r_index)
void ED_mesh_polys_add(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1257
struct BMEdge * EDBM_edge_find_nearest_ex(struct ViewContext *vc, float *dist_px_manhattan, float *r_dist_center, bool use_select_bias, bool use_cycle, struct BMEdge **r_eed_zbuf, struct Base **bases, uint bases_len, uint *r_base_index)
bool paintface_mouse_select(struct bContext *C, const int mval[2], const struct SelectPick_Params *params, struct Object *ob)
void EDBM_preselect_elem_clear(struct EditMesh_PreSelElem *psel)
bool EDBM_deselect_by_material(struct BMEditMesh *em, short index, bool select)
void ED_mesh_mirrtopo_free(MirrTopoStore_t *mesh_topo_store)
void EDBM_select_flush(struct BMEditMesh *em)
bool ED_mesh_color_remove_named(struct Mesh *me, const char *name)
Definition: mesh_data.cc:470
float ED_vgroup_vert_weight(struct Object *ob, struct bDeformGroup *dg, int vertnum)
struct EditMesh_PreSelEdgeRing * EDBM_preselect_edgering_create(void)
struct BMVert * EDBM_verts_mirror_get(struct BMEditMesh *em, struct BMVert *v)
void ED_mesh_edges_remove(struct Mesh *mesh, struct ReportList *reports, int count)
Definition: mesh_data.cc:1326
void ED_vgroup_parray_remove_zero(struct MDeformVert **dvert_array, int dvert_tot, const bool *vgroup_validmap, int vgroup_tot, float epsilon, bool keep_single)
void EDBM_automerge(struct Object *ob, bool update, char hflag, float dist)
bool EDBM_selectmode_disable(struct Scene *scene, struct BMEditMesh *em, short selectmode_disable, short selectmode_fallback)
bool ED_mesh_uv_remove_index(struct Mesh *me, int n)
Definition: mesh_data.cc:331
void EDBM_preselect_elem_update_from_single(struct EditMesh_PreSelElem *psel, struct BMesh *bm, struct BMElem *ele, const float(*coords)[3])
void EDBM_verts_mirror_cache_end(struct BMEditMesh *em)
struct BMVert * EDBM_vert_find_nearest_ex(struct ViewContext *vc, float *dist_px_manhattan_p, bool use_select_bias, bool use_cycle, struct Base **bases, uint bases_len, uint *r_base_index)
bool ED_mesh_color_ensure(struct Mesh *me, const char *name)
Definition: mesh_data.cc:423
void ED_mesh_report_mirror(struct wmOperator *op, int totmirr, int totfail)
Definition: mesh_data.cc:1401
struct MDeformVert * ED_mesh_active_dvert_get_only(struct Object *ob)
Definition: meshtools.cc:1472
bool ED_mesh_uv_remove_active(struct Mesh *me)
Definition: mesh_data.cc:351
bool ED_vgroup_array_copy(struct Object *ob, struct Object *ob_from)
void ED_vgroup_select_by_name(struct Object *ob, const char *name)
int ED_mesh_join_objects_exec(struct bContext *C, struct wmOperator *op)
Definition: meshtools.cc:314
void EDBM_select_mirrored(struct BMEditMesh *em, const struct Mesh *me, int axis, bool extend, int *r_totmirr, int *r_totfail)
void EDBM_selectmode_set(struct BMEditMesh *em)
bool ED_mesh_pick_face(struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, uint *r_index)
Definition: meshtools.cc:1179
bool ED_vgroup_parray_alloc(struct ID *id, struct MDeformVert ***dvert_arr, int *dvert_tot, bool use_vert_sel)
void EDBM_select_more(struct BMEditMesh *em, bool use_face_step)
void ED_mesh_update(struct Mesh *mesh, struct bContext *C, bool calc_edges, bool calc_edges_loose)
Definition: mesh_data.cc:1075
void ED_mesh_uv_loop_reset_ex(struct Mesh *me, int layernum)
Definition: mesh_data.cc:200
void paintvert_hide(struct bContext *C, struct Object *ob, bool unselected)
Definition: editface.cc:555
void EDBM_flag_disable_all(struct BMEditMesh *em, char hflag)
void EDBM_select_toggle_all(struct BMEditMesh *em)
int ED_mesh_mirror_get_vert(struct Object *ob, int index)
Definition: meshtools.cc:986
void EDBM_deselect_flush(struct BMEditMesh *em)
void EDBM_select_less(struct BMEditMesh *em, bool use_face_step)
void EDBM_preselect_preview_clear(struct EditMesh_PreSelElem *psel)
void paintface_hide(struct bContext *C, struct Object *ob, bool unselected)
Definition: editface.cc:116
void EDBM_mesh_elem_index_ensure_multi(struct Object **objects, uint objects_len, char htype)
Definition: meshtools.cc:1516
void EDBM_select_swap(struct BMEditMesh *em)
void ED_vgroup_vert_remove(struct Object *ob, struct bDeformGroup *dg, int vertnum)
bool EDBM_mesh_reveal(struct BMEditMesh *em, bool select)
void EDBM_verts_mirror_cache_begin(struct BMEditMesh *em, int axis, bool use_self, bool use_select, bool respecthide, bool use_topology)
void ED_mesh_mirror_spatial_table_begin(struct Object *ob, struct BMEditMesh *em, struct Mesh *me_eval)
bool ED_mesh_sculpt_color_remove_index(struct Mesh *me, int n)
Definition: mesh_data.cc:577
void EDBM_preselect_edgering_draw(struct EditMesh_PreSelEdgeRing *psel, const float matrix[4][4])
bool ED_mesh_sculpt_color_ensure(struct Mesh *me, const char *name)
Definition: mesh_data.cc:563
void EDBM_selectmode_flush_ex(struct BMEditMesh *em, short selectmode)
void ED_mesh_report_mirror_ex(struct wmOperator *op, int totmirr, int totfail, char selectmode)
Definition: mesh_data.cc:1378
struct BMEdge * EDBM_verts_mirror_get_edge(struct BMEditMesh *em, struct BMEdge *e)
bool BMBVH_EdgeVisible(struct BMBVHTree *tree, struct BMEdge *e, struct Depsgraph *depsgraph, struct ARegion *region, struct View3D *v3d, struct Object *obedit)
bool paintface_minmax(struct Object *ob, float r_min[3], float r_max[3])
Definition: editface.cc:308
bool ED_mesh_pick_vert(struct bContext *C, struct Object *ob, const int mval[2], uint dist_px, bool use_zbuf, uint *r_index)
Definition: meshtools.cc:1359
void EDBM_update_extern(struct Mesh *me, bool do_tessellation, bool is_destructive)
bool EDBM_mesh_deselect_all_multi(struct bContext *C)
void paintvert_reveal(struct bContext *C, struct Object *ob, bool select)
Definition: editface.cc:583
bool EDBM_uv_check(struct BMEditMesh *em)
struct EditMesh_PreSelElem * EDBM_preselect_elem_create(void)
void ED_mesh_mirror_spatial_table_end(struct Object *ob)
int ED_mesh_mirror_spatial_table_lookup(struct Object *ob, struct BMEditMesh *em, struct Mesh *me_eval, const float co[3])
bool EDBM_selectmode_set_multi(struct bContext *C, short selectmode)
void void void EDBM_redo_state_free(struct BMBackup *backup) ATTR_NONNULL(1)
void ED_operatormacros_mesh(void)
Definition: mesh_ops.c:208
void ED_mesh_mirrtopo_init(struct BMEditMesh *em, struct Mesh *me, MirrTopoStore_t *mesh_topo_store, bool skip_em_vert_array_init)
void BM_uv_element_map_free(struct UvElementMap *element_map)
void EDBM_mesh_make(struct Object *ob, int select_mode, bool add_key_index)
int mesh_get_x_mirror_vert(struct Object *ob, struct Mesh *me_eval, int index, bool use_topology)
Definition: meshtools.cc:916
void ED_vgroup_data_clamp_range(struct ID *id, int total)
bool EDBM_vert_color_check(struct BMEditMesh *em)
void EDBM_mesh_normals_update_ex(struct BMEditMesh *em, const struct BMeshNormalsUpdate_Params *params)
void paintvert_tag_select_update(struct bContext *C, struct Object *ob)
Definition: editface.cc:458
void paintvert_select_ungrouped(struct Object *ob, bool extend, bool flush_flags)
Definition: editface.cc:527
void EDBM_preselect_edgering_update_from_edge(struct EditMesh_PreSelEdgeRing *psel, struct BMesh *bm, struct BMEdge *eed_start, int previewlines, const float(*coords)[3])
void ED_vgroup_vert_active_mirror(struct Object *ob, int def_nr)
void EDBM_selectmode_flush(struct BMEditMesh *em)
void EDBM_mesh_normals_update(struct BMEditMesh *em)
void BM_uv_vert_map_free(struct UvVertMap *vmap)
#define C
Definition: RandGen.cpp:25
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
Definition: avxb.h:154
ATTR_WARN_UNUSED_RESULT BMesh * bm
ATTR_WARN_UNUSED_RESULT const BMLoop * l
ATTR_WARN_UNUSED_RESULT const BMVert const BMEdge * e
ATTR_WARN_UNUSED_RESULT const BMVert * v
Scene scene
const Depsgraph * depsgraph
AnimationBackup * backup
void * tree
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
int count
static MirrTopoStore_t mesh_topo_store
Definition: meshtools.cc:838
static double epsilon
static void update(bNodeTree *ntree)
SocketIndexByIdentifierMap * map
_W64 int intptr_t
Definition: stdint.h:118
struct BMesh * bmcopy
Definition: ED_mesh.h:576
float co[3]
Definition: bmesh_class.h:87
uint is_destructive
Definition: ED_mesh.h:123
Definition: DNA_ID.h:368
Definition: BKE_main.h:121
intptr_t * index_lookup
Definition: ED_mesh.h:432
int prev_edge_tot
Definition: ED_mesh.h:434
int prev_vert_tot
Definition: ED_mesh.h:433
bool prev_is_editmode
Definition: ED_mesh.h:435