Blender V5.0
editmesh_tools.cc File Reference
#include <cstddef>
#include <fmt/format.h>
#include "MEM_guardedalloc.h"
#include "DNA_key_types.h"
#include "DNA_material_types.h"
#include "DNA_mesh_types.h"
#include "DNA_meshdata_types.h"
#include "DNA_modifier_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "BLI_array.hh"
#include "BLI_bitmap.h"
#include "BLI_heap_simple.h"
#include "BLI_linklist.h"
#include "BLI_linklist_stack.h"
#include "BLI_listbase.h"
#include "BLI_math_bits.h"
#include "BLI_math_geom.h"
#include "BLI_math_matrix.h"
#include "BLI_math_rotation.h"
#include "BLI_math_vector.h"
#include "BLI_rand.h"
#include "BLI_sort_utils.h"
#include "BKE_attribute.h"
#include "BKE_context.hh"
#include "BKE_customdata.hh"
#include "BKE_deform.hh"
#include "BKE_editmesh.hh"
#include "BKE_key.hh"
#include "BKE_layer.hh"
#include "BKE_lib_id.hh"
#include "BKE_material.hh"
#include "BKE_mesh.hh"
#include "BKE_mesh_types.hh"
#include "BKE_object.hh"
#include "BKE_object_types.hh"
#include "BKE_report.hh"
#include "DEG_depsgraph.hh"
#include "DEG_depsgraph_build.hh"
#include "BLT_translation.hh"
#include "RNA_access.hh"
#include "RNA_define.hh"
#include "RNA_enum_types.hh"
#include "RNA_prototypes.hh"
#include "WM_api.hh"
#include "WM_types.hh"
#include "ED_mesh.hh"
#include "ED_object.hh"
#include "ED_outliner.hh"
#include "ED_screen.hh"
#include "ED_select_utils.hh"
#include "ED_transform.hh"
#include "ED_uvedit.hh"
#include "ED_view3d.hh"
#include "UI_interface.hh"
#include "UI_interface_layout.hh"
#include "UI_resources.hh"
#include "mesh_intern.hh"
#include "bmesh_tools.hh"

Go to the source code of this file.

Classes

struct  EdgeRingOpSubdProps
struct  FillGridSplitJoin
struct  BMElemSort

Macros

#define USE_FACE_CREATE_SEL_EXTEND

Functions

Edge Ring Subdivide Operator

Bridge code shares props.

static void mesh_operator_edgering_props (wmOperatorType *ot, const int cuts_min, const int cuts_default)
static void mesh_operator_edgering_props_get (wmOperator *op, EdgeRingOpSubdProps *op_props)
static wmOperatorStatus edbm_subdivide_edge_ring_exec (bContext *C, wmOperator *op)
void MESH_OT_subdivide_edgering (wmOperatorType *ot)
Un-Subdivide Operator
static wmOperatorStatus edbm_unsubdivide_exec (bContext *C, wmOperator *op)
void MESH_OT_unsubdivide (wmOperatorType *ot)
Delete Loose Operator
static bool bm_face_is_loose (BMFace *f)
static wmOperatorStatus edbm_delete_loose_exec (bContext *C, wmOperator *op)
void MESH_OT_delete_loose (wmOperatorType *ot)
Collapse Edge Operator
static wmOperatorStatus edbm_collapse_edge_exec (bContext *C, wmOperator *op)
void MESH_OT_edge_collapse (wmOperatorType *ot)
Create Edge/Face Operator
static bool edbm_add_edge_face__smooth_get (BMesh *bm)
static int edbm_add_edge_face_exec__vert_edge_lookup (BMVert *v, BMEdge *e_used, BMEdge **e_arr, const int e_arr_len, bool(*func)(const BMEdge *))
static BMElemedbm_add_edge_face_exec__tricky_extend_sel (BMesh *bm)
static void edbm_add_edge_face_exec__tricky_finalize_sel (BMesh *bm, BMElem *ele_desel, BMFace *f)
static wmOperatorStatus edbm_add_edge_face_exec (bContext *C, wmOperator *op)
void MESH_OT_edge_face_add (wmOperatorType *ot)
Mark Edge (Seam) Operator
static wmOperatorStatus edbm_mark_seam_exec (bContext *C, wmOperator *op)
void MESH_OT_mark_seam (wmOperatorType *ot)
Mark Edge (Sharp) Operator
static wmOperatorStatus edbm_mark_sharp_exec (bContext *C, wmOperator *op)
void MESH_OT_mark_sharp (wmOperatorType *ot)
Connect Vertex Path Operator
static bool edbm_connect_vert_pair (BMEditMesh *em, Mesh *mesh, wmOperator *op)
static wmOperatorStatus edbm_vert_connect_exec (bContext *C, wmOperator *op)
void MESH_OT_vert_connect (wmOperatorType *ot)
static bool bm_vert_is_select_history_open (BMesh *bm)
static bool bm_vert_connect_pair (BMesh *bm, BMVert *v_a, BMVert *v_b)
static bool bm_vert_connect_select_history (BMesh *bm)
static bool bm_vert_connect_select_history_edge_to_vert_path (BMesh *bm, ListBase *r_selected)
static wmOperatorStatus edbm_vert_connect_path_exec (bContext *C, wmOperator *op)
void MESH_OT_vert_connect_path (wmOperatorType *ot)
Connect Concave Operator
static wmOperatorStatus edbm_vert_connect_concave_exec (bContext *C, wmOperator *op)
void MESH_OT_vert_connect_concave (wmOperatorType *ot)
Split Non-Planar Faces Operator
static wmOperatorStatus edbm_vert_connect_nonplaner_exec (bContext *C, wmOperator *op)
void MESH_OT_vert_connect_nonplanar (wmOperatorType *ot)
Make Planar Faces Operator
static wmOperatorStatus edbm_face_make_planar_exec (bContext *C, wmOperator *op)
void MESH_OT_face_make_planar (wmOperatorType *ot)
Split Edge Operator
static bool edbm_edge_split_selected_edges (wmOperator *op, Object *obedit, BMEditMesh *em)
static bool edbm_edge_split_selected_verts (wmOperator *op, Object *obedit, BMEditMesh *em)
static wmOperatorStatus edbm_edge_split_exec (bContext *C, wmOperator *op)
void MESH_OT_edge_split (wmOperatorType *ot)
Duplicate Operator
static wmOperatorStatus edbm_duplicate_exec (bContext *C, wmOperator *op)
static wmOperatorStatus edbm_duplicate_invoke (bContext *C, wmOperator *op, const wmEvent *)
void MESH_OT_duplicate (wmOperatorType *ot)
static BMLoopNorEditDataArrayflip_custom_normals_init_data (BMesh *bm)
static bool flip_custom_normals (BMesh *bm, BMLoopNorEditDataArray *lnors_ed_arr)
Flip Normals Operator
static void edbm_flip_normals_custom_loop_normals (Object *obedit, BMEditMesh *em)
static void edbm_flip_quad_tessellation (wmOperator *op, Object *obedit, BMEditMesh *em)
static void edbm_flip_normals_face_winding (wmOperator *op, Object *obedit, BMEditMesh *em)
static wmOperatorStatus edbm_flip_quad_tessellation_exec (bContext *C, wmOperator *op)
static wmOperatorStatus edbm_flip_normals_exec (bContext *C, wmOperator *op)
void MESH_OT_flip_normals (wmOperatorType *ot)
Rotate Edge Operator
static wmOperatorStatus edbm_edge_rotate_selected_exec (bContext *C, wmOperator *op)
void MESH_OT_edge_rotate (wmOperatorType *ot)
Hide Operator
static wmOperatorStatus edbm_hide_exec (bContext *C, wmOperator *op)
void MESH_OT_hide (wmOperatorType *ot)
Reveal Operator
static wmOperatorStatus edbm_reveal_exec (bContext *C, wmOperator *op)
void MESH_OT_reveal (wmOperatorType *ot)
Recalculate Normals Operator
static wmOperatorStatus edbm_normals_make_consistent_exec (bContext *C, wmOperator *op)
void MESH_OT_normals_make_consistent (wmOperatorType *ot)
Smooth Vertices Operator
static wmOperatorStatus edbm_do_smooth_vertex_exec (bContext *C, wmOperator *op)
void MESH_OT_vertices_smooth (wmOperatorType *ot)
Laplacian Smooth Vertices Operator
static wmOperatorStatus edbm_do_smooth_laplacian_vertex_exec (bContext *C, wmOperator *op)
void MESH_OT_vertices_smooth_laplacian (wmOperatorType *ot)
Set Faces Smooth Shading Operator
static void mesh_set_smooth_faces (BMEditMesh *em, short smooth)
static wmOperatorStatus edbm_faces_shade_smooth_exec (bContext *C, wmOperator *)
void MESH_OT_faces_shade_smooth (wmOperatorType *ot)
Set Faces Flat Shading Operator
static wmOperatorStatus edbm_faces_shade_flat_exec (bContext *C, wmOperator *)
void MESH_OT_faces_shade_flat (wmOperatorType *ot)
UV/Color Rotate/Reverse Operator
static wmOperatorStatus edbm_rotate_uvs_exec (bContext *C, wmOperator *op)
static wmOperatorStatus edbm_reverse_uvs_exec (bContext *C, wmOperator *op)
static wmOperatorStatus edbm_rotate_colors_exec (bContext *C, wmOperator *op)
static wmOperatorStatus edbm_reverse_colors_exec (bContext *C, wmOperator *op)
void MESH_OT_uvs_rotate (wmOperatorType *ot)
void MESH_OT_uvs_reverse (wmOperatorType *ot)
void MESH_OT_colors_rotate (wmOperatorType *ot)
void MESH_OT_colors_reverse (wmOperatorType *ot)
Merge By Distance Operator
static wmOperatorStatus edbm_remove_doubles_exec (bContext *C, wmOperator *op)
void MESH_OT_remove_doubles (wmOperatorType *ot)
Shape Key Propagate Operator
static bool shape_propagate (BMEditMesh *em, bool use_symmetry)
static wmOperatorStatus edbm_shape_propagate_to_all_exec (bContext *C, wmOperator *op)
void MESH_OT_shape_propagate_to_all (wmOperatorType *ot)
Blend from Shape Operator
static wmOperatorStatus edbm_blend_from_shape_exec (bContext *C, wmOperator *op)
static const EnumPropertyItemshape_itemf (bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
static void edbm_blend_from_shape_ui (bContext *C, wmOperator *op)
void MESH_OT_blend_from_shape (wmOperatorType *ot)
Solidify Mesh Operator
static wmOperatorStatus edbm_solidify_exec (bContext *C, wmOperator *op)
void MESH_OT_solidify (wmOperatorType *ot)
Triangle Fill Operator
static wmOperatorStatus edbm_fill_exec (bContext *C, wmOperator *op)
void MESH_OT_fill (wmOperatorType *ot)
Grid Fill Operator
static bool bm_edge_test_fill_grid_cb (BMEdge *e, void *)
static float edbm_fill_grid_vert_tag_angle (BMVert *v)
static bool edbm_fill_grid_prepare (BMesh *bm, int offset, int *span_p, const bool span_calc)
static FillGridSplitJoinedbm_fill_grid_split_join_init (BMEditMesh *em)
static void edbm_fill_grid_split_join_finish (BMEditMesh *em, wmOperator *op, FillGridSplitJoin *split_join, bool changed)
static wmOperatorStatus edbm_fill_grid_exec (bContext *C, wmOperator *op)
void MESH_OT_fill_grid (wmOperatorType *ot)
Hole Fill Operator
static wmOperatorStatus edbm_fill_holes_exec (bContext *C, wmOperator *op)
void MESH_OT_fill_holes (wmOperatorType *ot)
Beauty Fill Operator
static wmOperatorStatus edbm_beautify_fill_exec (bContext *C, wmOperator *op)
void MESH_OT_beautify_fill (wmOperatorType *ot)
Poke Face Operator
static wmOperatorStatus edbm_poke_face_exec (bContext *C, wmOperator *op)
void MESH_OT_poke (wmOperatorType *ot)
Triangulate Face Operator
static wmOperatorStatus edbm_quads_convert_to_tris_exec (bContext *C, wmOperator *op)
void MESH_OT_quads_convert_to_tris (wmOperatorType *ot)
Convert to Quads Operator
static wmOperatorStatus edbm_tris_convert_to_quads_exec (bContext *C, wmOperator *op)
static void join_triangle_props (wmOperatorType *ot)
void MESH_OT_tris_convert_to_quads (wmOperatorType *ot)
Decimate Operator
Note
The function to decimate is intended for use as a modifier, while its handy allow access as a tool - this does cause access to be a little awkward (passing selection as weights for eg).
static wmOperatorStatus edbm_decimate_exec (bContext *C, wmOperator *op)
static bool edbm_decimate_check (bContext *, wmOperator *)
static void edbm_decimate_ui (bContext *, wmOperator *op)
void MESH_OT_decimate (wmOperatorType *ot)
Dissolve Vertices Operator
static void edbm_dissolve_prop__use_verts (wmOperatorType *ot, bool value, int flag)
static void edbm_dissolve_prop__use_face_split (wmOperatorType *ot)
static void edbm_dissolve_prop__use_boundary_tear (wmOperatorType *ot)
static void edbm_dissolve_prop__use_angle_threshold (wmOperatorType *ot, int flag)
static wmOperatorStatus edbm_dissolve_verts_exec (bContext *C, wmOperator *op)
void MESH_OT_dissolve_verts (wmOperatorType *ot)
Dissolve Edges Operator
static wmOperatorStatus edbm_dissolve_edges_exec (bContext *C, wmOperator *op)
void MESH_OT_dissolve_edges (wmOperatorType *ot)
Dissolve Faces Operator
static wmOperatorStatus edbm_dissolve_faces_exec (bContext *C, wmOperator *op)
void MESH_OT_dissolve_faces (wmOperatorType *ot)
Dissolve (Context Sensitive) Operator
static wmOperatorStatus edbm_dissolve_mode_exec (bContext *C, wmOperator *op)
static bool dissolve_mode_poll_property (const bContext *C, wmOperator *op, const PropertyRNA *prop)
void MESH_OT_dissolve_mode (wmOperatorType *ot)
Limited Dissolve Operator
static wmOperatorStatus edbm_dissolve_limited_exec (bContext *C, wmOperator *op)
void MESH_OT_dissolve_limited (wmOperatorType *ot)
Degenerate Dissolve Operator
static wmOperatorStatus edbm_dissolve_degenerate_exec (bContext *C, wmOperator *op)
void MESH_OT_dissolve_degenerate (wmOperatorType *ot)
Delete Edge-Loop Operator
static wmOperatorStatus edbm_delete_edgeloop_exec (bContext *C, wmOperator *op)
void MESH_OT_delete_edgeloop (wmOperatorType *ot)
Split Geometry Operator
static wmOperatorStatus edbm_split_exec (bContext *C, wmOperator *op)
void MESH_OT_split (wmOperatorType *ot)
Wire-Frame Operator
static wmOperatorStatus edbm_wireframe_exec (bContext *C, wmOperator *op)
void MESH_OT_wireframe (wmOperatorType *ot)
Offset Edge-Loop Operator
static wmOperatorStatus edbm_offset_edgeloop_exec (bContext *C, wmOperator *op)
void MESH_OT_offset_edge_loops (wmOperatorType *ot)
Symmetrize Operator
static wmOperatorStatus mesh_symmetrize_exec (bContext *C, wmOperator *op)
void MESH_OT_symmetrize (wmOperatorType *ot)
Snap to Symmetry Operator
static wmOperatorStatus mesh_symmetry_snap_exec (bContext *C, wmOperator *op)
void MESH_OT_symmetry_snap (wmOperatorType *ot)
Split/Merge Loop Normals Operator
static void normals_merge (BMesh *bm, BMLoopNorEditDataArray *lnors_ed_arr)
static void normals_split (BMesh *bm)
static wmOperatorStatus normals_split_merge (bContext *C, const bool do_merge)
static wmOperatorStatus edbm_merge_normals_exec (bContext *C, wmOperator *)
void MESH_OT_merge_normals (wmOperatorType *ot)
static wmOperatorStatus edbm_split_normals_exec (bContext *C, wmOperator *)
void MESH_OT_split_normals (wmOperatorType *ot)
Set Normals from Faces Operator
static wmOperatorStatus edbm_set_normals_from_faces_exec (bContext *C, wmOperator *op)
void MESH_OT_set_normals_from_faces (wmOperatorType *ot)
Smooth Normal Vectors Operator
static wmOperatorStatus edbm_smooth_normals_exec (bContext *C, wmOperator *op)
void MESH_OT_smooth_normals (wmOperatorType *ot)

Loop Normals Editing Tools Modal Map

#define CLNORS_VALID_VEC_LEN   (1e-4f)
enum  {
  EDBM_CLNOR_MODAL_CANCEL = 1 , EDBM_CLNOR_MODAL_CONFIRM = 2 , EDBM_CLNOR_MODAL_POINTTO_RESET = 101 , EDBM_CLNOR_MODAL_POINTTO_INVERT = 102 ,
  EDBM_CLNOR_MODAL_POINTTO_SPHERIZE = 103 , EDBM_CLNOR_MODAL_POINTTO_ALIGN = 104 , EDBM_CLNOR_MODAL_POINTTO_USE_MOUSE = 110 , EDBM_CLNOR_MODAL_POINTTO_USE_PIVOT = 111 ,
  EDBM_CLNOR_MODAL_POINTTO_USE_OBJECT = 112 , EDBM_CLNOR_MODAL_POINTTO_SET_USE_3DCURSOR = 113 , EDBM_CLNOR_MODAL_POINTTO_SET_USE_SELECTED = 114
}
wmKeyMappoint_normals_modal_keymap (wmKeyConfig *keyconf)

Delete Operator

enum  {
  MESH_DELETE_VERT = 0 , MESH_DELETE_EDGE = 1 , MESH_DELETE_FACE = 2 , MESH_DELETE_EDGE_FACE = 3 ,
  MESH_DELETE_ONLY_FACE = 4
}
static void edbm_report_delete_info (ReportList *reports, const int totelem_old[3], const int totelem_new[3])
static wmOperatorStatus edbm_delete_exec (bContext *C, wmOperator *op)
void MESH_OT_delete (wmOperatorType *ot)

Merge Vertices Operator

enum  {
  MESH_MERGE_LAST = 1 , MESH_MERGE_CENTER = 3 , MESH_MERGE_CURSOR = 4 , MESH_MERGE_COLLAPSE = 5 ,
  MESH_MERGE_FIRST = 6
}
static const EnumPropertyItem merge_type_items []
static bool merge_firstlast (BMEditMesh *em, const bool use_first, const bool use_uvmerge, wmOperator *wmop)
static bool merge_target (BMEditMesh *em, Scene *scene, Object *ob, const bool use_cursor, const bool use_uvmerge, wmOperator *wmop)
static wmOperatorStatus edbm_merge_exec (bContext *C, wmOperator *op)
static const EnumPropertyItemmerge_type_itemf (bContext *C, PointerRNA *, PropertyRNA *, bool *r_free)
void MESH_OT_merge (wmOperatorType *ot)

Separate Parts Operator

enum  { MESH_SEPARATE_SELECTED = 0 , MESH_SEPARATE_MATERIAL = 1 , MESH_SEPARATE_LOOSE = 2 }
static Basemesh_separate_tagged (Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base_old, BMesh *bm_old)
static Basemesh_separate_arrays (Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base_old, BMesh *bm_old, BMVert **verts, uint verts_len, BMEdge **edges, uint edges_len, BMFace **faces, uint faces_len)
static bool mesh_separate_selected (Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base_old, BMesh *bm_old)
static void mesh_separate_material_assign_mat_nr (Main *bmain, Object *ob, const short mat_nr)
static bool mesh_separate_material (Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base_old, BMesh *bm_old)
static bool mesh_separate_loose (Main *bmain, Scene *scene, ViewLayer *view_layer, Base *base_old, BMesh *bm_old)
static wmOperatorStatus edbm_separate_exec (bContext *C, wmOperator *op)
void MESH_OT_separate (wmOperatorType *ot)

Sort Geometry Elements Operator

Unified for vertices/edges/faces.

enum  {
  SRT_VIEW_ZAXIS = 1 , SRT_VIEW_XAXIS , SRT_CURSOR_DISTANCE , SRT_MATERIAL ,
  SRT_SELECTED , SRT_RANDOMIZE , SRT_REVERSE
}
static int bmelemsort_comp (const void *v1, const void *v2)
static void sort_bmelem_flag (bContext *C, Scene *scene, Object *ob, RegionView3D *rv3d, const int types, const int flag, const int action, const int reverse, const uint seed)
static wmOperatorStatus edbm_sort_elements_exec (bContext *C, wmOperator *op)
static bool edbm_sort_elements_poll_property (const bContext *, wmOperator *op, const PropertyRNA *prop)
void MESH_OT_sort_elements (wmOperatorType *ot)

Bridge Operator

enum  { MESH_BRIDGELOOP_SINGLE = 0 , MESH_BRIDGELOOP_CLOSED = 1 , MESH_BRIDGELOOP_PAIRS = 2 }
static int edbm_bridge_tag_boundary_edges (BMesh *bm)
static int edbm_bridge_edge_loops_for_single_editmesh (wmOperator *op, BMEditMesh *em, Mesh *mesh, const bool use_pairs, const bool use_cyclic, const bool use_merge, const float merge_factor, const int twist_offset)
static wmOperatorStatus edbm_bridge_edge_loops_exec (bContext *C, wmOperator *op)
void MESH_OT_bridge_edge_loops (wmOperatorType *ot)

Loop Normals 'Point To' Operator

enum  { EDBM_CLNOR_POINTTO_MODE_COORDINATES = 1 , EDBM_CLNOR_POINTTO_MODE_MOUSE = 2 }
static EnumPropertyItem clnors_pointto_mode_items []
static bool point_normals_init (bContext *C, wmOperator *op)
static bool point_normals_ensure (bContext *C, wmOperator *op)
static void point_normals_free (wmOperator *op)
static void point_normals_cancel (bContext *C, wmOperator *op)
static void point_normals_update_statusbar (bContext *C, wmOperator *op)
static void bmesh_selected_verts_center_calc (BMesh *bm, float *r_center)
static void point_normals_apply (bContext *C, wmOperator *op, float target[3], const bool do_reset)
static wmOperatorStatus edbm_point_normals_modal (bContext *C, wmOperator *op, const wmEvent *event)
static wmOperatorStatus edbm_point_normals_invoke (bContext *C, wmOperator *op, const wmEvent *)
static wmOperatorStatus edbm_point_normals_exec (bContext *C, wmOperator *op)
static bool point_normals_draw_check_prop (PointerRNA *ptr, PropertyRNA *prop, void *)
static void edbm_point_normals_ui (bContext *C, wmOperator *op)
void MESH_OT_point_normals (wmOperatorType *ot)

Average Loop Normals Operator

enum  { EDBM_CLNOR_AVERAGE_LOOP = 1 , EDBM_CLNOR_AVERAGE_FACE_AREA = 2 , EDBM_CLNOR_AVERAGE_ANGLE = 3 }
static EnumPropertyItem average_method_items []
static wmOperatorStatus edbm_average_normals_exec (bContext *C, wmOperator *op)
static bool average_normals_draw_check_prop (PointerRNA *ptr, PropertyRNA *prop, void *)
static void edbm_average_normals_ui (bContext *C, wmOperator *op)
void MESH_OT_average_normals (wmOperatorType *ot)

Custom Normal Interface Tools Operator

enum  {
  EDBM_CLNOR_TOOLS_COPY = 1 , EDBM_CLNOR_TOOLS_PASTE = 2 , EDBM_CLNOR_TOOLS_MULTIPLY = 3 , EDBM_CLNOR_TOOLS_ADD = 4 ,
  EDBM_CLNOR_TOOLS_RESET = 5
}
static EnumPropertyItem normal_vector_tool_items []
static wmOperatorStatus edbm_normals_tools_exec (bContext *C, wmOperator *op)
static bool normals_tools_draw_check_prop (PointerRNA *ptr, PropertyRNA *prop, void *)
static void edbm_normals_tools_ui (bContext *C, wmOperator *op)
void MESH_OT_normals_tools (wmOperatorType *ot)

Subdivide Operator

static const EnumPropertyItem prop_mesh_cornervert_types []
static wmOperatorStatus edbm_subdivide_exec (bContext *C, wmOperator *op)
void MESH_OT_subdivide (wmOperatorType *ot)

Weighted Normal Modifier Face Strength

static const EnumPropertyItem prop_mesh_face_strength_types []
static wmOperatorStatus edbm_mod_weighted_strength_exec (bContext *C, wmOperator *op)
void MESH_OT_mod_weighted_strength (wmOperatorType *ot)
void MESH_OT_flip_quad_tessellation (wmOperatorType *ot)

Macro Definition Documentation

◆ CLNORS_VALID_VEC_LEN

◆ USE_FACE_CREATE_SEL_EXTEND

#define USE_FACE_CREATE_SEL_EXTEND

Definition at line 83 of file editmesh_tools.cc.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
MESH_DELETE_VERT 
MESH_DELETE_EDGE 
MESH_DELETE_FACE 
MESH_DELETE_EDGE_FACE 
MESH_DELETE_ONLY_FACE 

Definition at line 422 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
MESH_MERGE_LAST 
MESH_MERGE_CENTER 
MESH_MERGE_CURSOR 
MESH_MERGE_COLLAPSE 
MESH_MERGE_FIRST 

Definition at line 3298 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
EDBM_CLNOR_TOOLS_COPY 
EDBM_CLNOR_TOOLS_PASTE 
EDBM_CLNOR_TOOLS_MULTIPLY 
EDBM_CLNOR_TOOLS_ADD 
EDBM_CLNOR_TOOLS_RESET 

Definition at line 9292 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
MESH_BRIDGELOOP_SINGLE 
MESH_BRIDGELOOP_CLOSED 
MESH_BRIDGELOOP_PAIRS 

Definition at line 7192 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
EDBM_CLNOR_POINTTO_MODE_COORDINATES 
EDBM_CLNOR_POINTTO_MODE_MOUSE 

Definition at line 8309 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
SRT_VIEW_ZAXIS 

Use view Z (deep) axis.

SRT_VIEW_XAXIS 

Use view X (left to right) axis.

SRT_CURSOR_DISTANCE 

Use distance from element to 3D cursor.

SRT_MATERIAL 

Face only: use mat number.

SRT_SELECTED 

Move selected elements in first, without modifying relative order of selected and unselected elements.

SRT_RANDOMIZE 

Randomize selected elements.

SRT_REVERSE 

Reverse current order of selected elements.

Definition at line 6529 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
MESH_SEPARATE_SELECTED 
MESH_SEPARATE_MATERIAL 
MESH_SEPARATE_LOOSE 

Definition at line 4108 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
EDBM_CLNOR_MODAL_CANCEL 
EDBM_CLNOR_MODAL_CONFIRM 
EDBM_CLNOR_MODAL_POINTTO_RESET 
EDBM_CLNOR_MODAL_POINTTO_INVERT 
EDBM_CLNOR_MODAL_POINTTO_SPHERIZE 
EDBM_CLNOR_MODAL_POINTTO_ALIGN 
EDBM_CLNOR_MODAL_POINTTO_USE_MOUSE 
EDBM_CLNOR_MODAL_POINTTO_USE_PIVOT 
EDBM_CLNOR_MODAL_POINTTO_USE_OBJECT 
EDBM_CLNOR_MODAL_POINTTO_SET_USE_3DCURSOR 
EDBM_CLNOR_MODAL_POINTTO_SET_USE_SELECTED 

Definition at line 8220 of file editmesh_tools.cc.

◆ anonymous enum

anonymous enum
Enumerator
EDBM_CLNOR_AVERAGE_LOOP 
EDBM_CLNOR_AVERAGE_FACE_AREA 
EDBM_CLNOR_AVERAGE_ANGLE 

Definition at line 9040 of file editmesh_tools.cc.

Function Documentation

◆ average_normals_draw_check_prop()

bool average_normals_draw_check_prop ( PointerRNA * ptr,
PropertyRNA * prop,
void *  )
static

◆ bm_edge_test_fill_grid_cb()

bool bm_edge_test_fill_grid_cb ( BMEdge * e,
void *  )
static

Definition at line 4656 of file editmesh_tools.cc.

References BM_elem_flag_test_bool, BM_ELEM_SELECT, and e.

Referenced by edbm_fill_grid_prepare().

◆ bm_face_is_loose()

bool bm_face_is_loose ( BMFace * f)
static

Definition at line 567 of file editmesh_tools.cc.

References BM_edge_is_boundary(), BM_FACE_FIRST_LOOP, BMLoop::e, and BMLoop::next.

Referenced by edbm_delete_loose_exec().

◆ bm_vert_connect_pair()

◆ bm_vert_connect_select_history()

◆ bm_vert_connect_select_history_edge_to_vert_path()

bool bm_vert_connect_select_history_edge_to_vert_path ( BMesh * bm,
ListBase * r_selected )
static

Convert an edge selection to a temp vertex selection (which must be cleared after use as a path to connect).

Definition at line 1479 of file editmesh_tools.cc.

References bm, BM_EDGE, BM_edge_pair_share_face_by_len(), BM_select_history_store_head_notest, BM_select_history_store_notest, BMVert::co, is_quad_flip_v3(), LISTBASE_FOREACH, BMLoop::v, v, BMEdge::v1, and BMEdge::v2.

Referenced by edbm_vert_connect_path_exec().

◆ bm_vert_is_select_history_open()

bool bm_vert_is_select_history_open ( BMesh * bm)
static

check that endpoints are verts and only have a single selected edge connected.

Definition at line 1335 of file editmesh_tools.cc.

References bm, BM_EDGES_OF_VERT, BM_ELEM_SELECT, BM_iter_elem_count_flag(), BM_VERT, BMEditSelection::ele, and BMEditSelection::htype.

Referenced by bm_vert_connect_select_history().

◆ bmelemsort_comp()

int bmelemsort_comp ( const void * v1,
const void * v2 )
static

Definition at line 6554 of file editmesh_tools.cc.

References BMElemSort::srt, and v2.

Referenced by sort_bmelem_flag().

◆ bmesh_selected_verts_center_calc()

void bmesh_selected_verts_center_calc ( BMesh * bm,
float * r_center )
static

◆ dissolve_mode_poll_property()

bool dissolve_mode_poll_property ( const bContext * C,
wmOperator * op,
const PropertyRNA * prop )
static

◆ edbm_add_edge_face__smooth_get()

bool edbm_add_edge_face__smooth_get ( BMesh * bm)
static

◆ edbm_add_edge_face_exec()

◆ edbm_add_edge_face_exec__tricky_extend_sel()

◆ edbm_add_edge_face_exec__tricky_finalize_sel()

◆ edbm_add_edge_face_exec__vert_edge_lookup()

int edbm_add_edge_face_exec__vert_edge_lookup ( BMVert * v,
BMEdge * e_used,
BMEdge ** e_arr,
const int e_arr_len,
bool(* func )(const BMEdge *) )
static

Function used to get a fixed number of edges linked to a vertex that passes a test function. This is used so we can request all boundary edges connected to a vertex for eg.

Definition at line 756 of file editmesh_tools.cc.

References BM_EDGES_OF_VERT, BM_elem_flag_test, BM_ELEM_HIDDEN, BM_ITER_ELEM, i, and v.

Referenced by edbm_add_edge_face_exec__tricky_extend_sel().

◆ edbm_average_normals_exec()

wmOperatorStatus edbm_average_normals_exec ( bContext * C,
wmOperator * op )
static

◆ edbm_average_normals_ui()

◆ edbm_beautify_fill_exec()

◆ edbm_blend_from_shape_exec()

◆ edbm_blend_from_shape_ui()

◆ edbm_bridge_edge_loops_exec()

◆ edbm_bridge_edge_loops_for_single_editmesh()

◆ edbm_bridge_tag_boundary_edges()

◆ edbm_collapse_edge_exec()

◆ edbm_connect_vert_pair()

◆ edbm_decimate_check()

bool edbm_decimate_check ( bContext * ,
wmOperator *  )
static

Definition at line 5786 of file editmesh_tools.cc.

Referenced by MESH_OT_decimate().

◆ edbm_decimate_exec()

◆ edbm_decimate_ui()

◆ edbm_delete_edgeloop_exec()

◆ edbm_delete_exec()

◆ edbm_delete_loose_exec()

◆ edbm_dissolve_degenerate_exec()

◆ edbm_dissolve_edges_exec()

◆ edbm_dissolve_faces_exec()

◆ edbm_dissolve_limited_exec()

◆ edbm_dissolve_mode_exec()

◆ edbm_dissolve_prop__use_angle_threshold()

void edbm_dissolve_prop__use_angle_threshold ( wmOperatorType * ot,
int flag )
static

◆ edbm_dissolve_prop__use_boundary_tear()

void edbm_dissolve_prop__use_boundary_tear ( wmOperatorType * ot)
static

Definition at line 5881 of file editmesh_tools.cc.

References ot, and RNA_def_boolean().

Referenced by MESH_OT_dissolve_mode(), and MESH_OT_dissolve_verts().

◆ edbm_dissolve_prop__use_face_split()

void edbm_dissolve_prop__use_face_split ( wmOperatorType * ot)
static

Definition at line 5873 of file editmesh_tools.cc.

References ot, and RNA_def_boolean().

Referenced by MESH_OT_dissolve_edges(), MESH_OT_dissolve_mode(), and MESH_OT_dissolve_verts().

◆ edbm_dissolve_prop__use_verts()

void edbm_dissolve_prop__use_verts ( wmOperatorType * ot,
bool value,
int flag )
static

◆ edbm_dissolve_verts_exec()

◆ edbm_do_smooth_laplacian_vertex_exec()

◆ edbm_do_smooth_vertex_exec()

◆ edbm_duplicate_exec()

◆ edbm_duplicate_invoke()

wmOperatorStatus edbm_duplicate_invoke ( bContext * C,
wmOperator * op,
const wmEvent *  )
static

Definition at line 2062 of file editmesh_tools.cc.

References C, edbm_duplicate_exec(), and WM_cursor_wait().

Referenced by MESH_OT_duplicate().

◆ edbm_edge_rotate_selected_exec()

◆ edbm_edge_split_exec()

◆ edbm_edge_split_selected_edges()

◆ edbm_edge_split_selected_verts()

◆ edbm_face_make_planar_exec()

◆ edbm_faces_shade_flat_exec()

◆ edbm_faces_shade_smooth_exec()

◆ edbm_fill_exec()

◆ edbm_fill_grid_exec()

◆ edbm_fill_grid_prepare()

◆ edbm_fill_grid_split_join_finish()

void edbm_fill_grid_split_join_finish ( BMEditMesh * em,
wmOperator * op,
FillGridSplitJoin * split_join,
bool changed )
static

Restore the mesh after split and fill_grid.

Parameters
emThe editmesh to work on
opthe wmOperator being run
split_jointhe saved split join state.
changedtrue, if the fill_grid that was run worked.

Definition at line 4920 of file editmesh_tools.cc.

References BMEditMesh::bm, BM_ALL_NOLOOP, BM_ELEM_SELECT, BM_loop_normal_editdata_array_free(), BMO_op_exec(), BMO_op_finish(), BMO_slot_buffer_hflag_enable(), FillGridSplitJoin::delete_op, EDBM_op_callf(), flip_custom_normals(), flip_custom_normals_init_data(), MEM_freeN(), BMOperator::slots_in, and FillGridSplitJoin::weld_op.

Referenced by edbm_fill_grid_exec().

◆ edbm_fill_grid_split_join_init()

FillGridSplitJoin * edbm_fill_grid_split_join_init ( BMEditMesh * em)
static

Split the current selection into a separate island and prepare to rejoin it.

This is done only when there are faces selected. Once split this way, fill_grid will interpolate using only the data from the selected faces, not the data from the surrounding faces. This matters for UV edges and face corner colors - the data from the faces being replaced is the right data to use for the interpolation. This relies on the fact that the "exterior" edge of an island is topologically the same as the "interior" edge around a hole.

Parameters
emThe edit-mesh to operate on.
Returns
the split join state.

Definition at line 4846 of file editmesh_tools.cc.

References BLI_assert, BMEditMesh::bm, BM_EDGE, BM_elem_flag_disable, BM_elem_flag_enable, BM_elem_flag_test, BM_ELEM_SELECT, BM_FACE, BM_VERT, BMO_ITER, BMO_iter_map_value_ptr(), BMO_op_exec(), BMO_op_finish(), BMO_op_init(), BMO_slot_buffer_from_enabled_hflag(), BMO_slot_buffer_hflag_enable(), BMO_slot_get(), BMO_slot_int_set(), BMO_slot_map_elem_insert(), DEL_FACES, FillGridSplitJoin::delete_op, e, MEM_callocN(), BMOperator::slots_in, BMOperator::slots_out, BMEdge::v1, BMEdge::v2, and FillGridSplitJoin::weld_op.

Referenced by edbm_fill_grid_exec().

◆ edbm_fill_grid_vert_tag_angle()

float edbm_fill_grid_vert_tag_angle ( BMVert * v)
static

◆ edbm_fill_holes_exec()

◆ edbm_flip_normals_custom_loop_normals()

◆ edbm_flip_normals_exec()

◆ edbm_flip_normals_face_winding()

◆ edbm_flip_quad_tessellation()

void edbm_flip_quad_tessellation ( wmOperator * op,
Object * obedit,
BMEditMesh * em )
static

◆ edbm_flip_quad_tessellation_exec()

◆ edbm_hide_exec()

◆ edbm_mark_seam_exec()

◆ edbm_mark_sharp_exec()

◆ edbm_merge_exec()

◆ edbm_merge_normals_exec()

wmOperatorStatus edbm_merge_normals_exec ( bContext * C,
wmOperator *  )
static

Definition at line 8994 of file editmesh_tools.cc.

References C, and normals_split_merge().

Referenced by MESH_OT_merge_normals().

◆ edbm_mod_weighted_strength_exec()

◆ edbm_normals_make_consistent_exec()

◆ edbm_normals_tools_exec()

◆ edbm_normals_tools_ui()

◆ edbm_offset_edgeloop_exec()

◆ edbm_point_normals_exec()

◆ edbm_point_normals_invoke()

◆ edbm_point_normals_modal()

wmOperatorStatus edbm_point_normals_modal ( bContext * C,
wmOperator * op,
const wmEvent * event )
static

Definition at line 8467 of file editmesh_tools.cc.

References add_v3_v3(), BKE_editmesh_from_object(), BKE_report(), bm, BMEditMesh::bm, BM_elem_flag_test, BM_ELEM_SELECT, BM_ITER_MESH, BM_VERTS_OF_MESH, bmesh_selected_verts_center_calc(), C, blender::ed::object::calc_active_center_for_editmode(), copy_v3_v3(), CTX_data_edit_object(), CTX_data_scene(), CTX_wm_region(), CTX_wm_view3d(), Scene::cursor, Object::data, ED_view3d_cursor3d_update(), ED_view3d_win_to_3d_int(), EDBM_CLNOR_MODAL_CANCEL, EDBM_CLNOR_MODAL_CONFIRM, EDBM_CLNOR_MODAL_POINTTO_ALIGN, EDBM_CLNOR_MODAL_POINTTO_INVERT, EDBM_CLNOR_MODAL_POINTTO_RESET, EDBM_CLNOR_MODAL_POINTTO_SET_USE_3DCURSOR, EDBM_CLNOR_MODAL_POINTTO_SET_USE_SELECTED, EDBM_CLNOR_MODAL_POINTTO_SPHERIZE, EDBM_CLNOR_MODAL_POINTTO_USE_MOUSE, EDBM_CLNOR_MODAL_POINTTO_USE_OBJECT, EDBM_CLNOR_MODAL_POINTTO_USE_PIVOT, EDBM_CLNOR_POINTTO_MODE_COORDINATES, EDBM_CLNOR_POINTTO_MODE_MOUSE, EDBM_select_pick(), EDBM_update(), ELEM, EVT_MODAL_MAP, i, ISMOUSE_MOTION, Object::loc, View3DCursor::location, max, mid_v3_v3v3(), min, minmax_v3v3_v3(), MOUSEMOVE, wmEvent::mval, OPERATOR_CANCELLED, OPERATOR_FINISHED, OPERATOR_PASS_THROUGH, OPERATOR_RUNNING_MODAL, params, point_normals_apply(), point_normals_cancel(), point_normals_ensure(), point_normals_free(), point_normals_update_statusbar(), wmOperator::ptr, wmOperator::reports, ret, RNA_enum_get(), RNA_enum_set(), RNA_property_boolean_get(), RNA_property_boolean_set(), RNA_property_float_get_array(), RNA_property_float_set_array(), RNA_struct_find_property(), RPT_WARNING, SEL_OP_SET, Scene::toolsettings, ToolSettings::transform_pivot_point, wmEvent::type, wmOperator::type, v, V3D_AROUND_ACTIVE, V3D_AROUND_CENTER_BOUNDS, V3D_AROUND_CENTER_MEDIAN, V3D_AROUND_CURSOR, V3D_CURSOR_ORIENT_NONE, wmEvent::val, view3d_operator_needs_gpu(), WM_operator_poll(), and zero_v3().

Referenced by MESH_OT_point_normals().

◆ edbm_point_normals_ui()

◆ edbm_poke_face_exec()

◆ edbm_quads_convert_to_tris_exec()

◆ edbm_remove_doubles_exec()

◆ edbm_report_delete_info()

void edbm_report_delete_info ( ReportList * reports,
const int totelem_old[3],
const int totelem_new[3] )
static

Definition at line 430 of file editmesh_tools.cc.

References BKE_reportf(), and RPT_INFO.

Referenced by edbm_delete_loose_exec(), and edbm_dissolve_degenerate_exec().

◆ edbm_reveal_exec()

◆ edbm_reverse_colors_exec()

◆ edbm_reverse_uvs_exec()

◆ edbm_rotate_colors_exec()

◆ edbm_rotate_uvs_exec()

◆ edbm_separate_exec()

◆ edbm_set_normals_from_faces_exec()

◆ edbm_shape_propagate_to_all_exec()

◆ edbm_smooth_normals_exec()

◆ edbm_solidify_exec()

◆ edbm_sort_elements_exec()

◆ edbm_sort_elements_poll_property()

bool edbm_sort_elements_poll_property ( const bContext * ,
wmOperator * op,
const PropertyRNA * prop )
static

◆ edbm_split_exec()

◆ edbm_split_normals_exec()

wmOperatorStatus edbm_split_normals_exec ( bContext * C,
wmOperator *  )
static

Definition at line 9014 of file editmesh_tools.cc.

References C, and normals_split_merge().

Referenced by MESH_OT_split_normals().

◆ edbm_subdivide_edge_ring_exec()

◆ edbm_subdivide_exec()

◆ edbm_tris_convert_to_quads_exec()

◆ edbm_unsubdivide_exec()

◆ edbm_vert_connect_concave_exec()

◆ edbm_vert_connect_exec()

◆ edbm_vert_connect_nonplaner_exec()

◆ edbm_vert_connect_path_exec()

◆ edbm_wireframe_exec()

◆ flip_custom_normals()

◆ flip_custom_normals_init_data()

◆ join_triangle_props()

◆ merge_firstlast()

bool merge_firstlast ( BMEditMesh * em,
const bool use_first,
const bool use_uvmerge,
wmOperator * wmop )
static

◆ merge_target()

bool merge_target ( BMEditMesh * em,
Scene * scene,
Object * ob,
const bool use_cursor,
const bool use_uvmerge,
wmOperator * wmop )
static

◆ merge_type_itemf()

◆ mesh_operator_edgering_props()

◆ mesh_operator_edgering_props_get()

◆ MESH_OT_average_normals()

◆ MESH_OT_beautify_fill()

◆ MESH_OT_blend_from_shape()

◆ MESH_OT_bridge_edge_loops()

◆ MESH_OT_colors_reverse()

void MESH_OT_colors_reverse ( wmOperatorType * ot)

◆ MESH_OT_colors_rotate()

void MESH_OT_colors_rotate ( wmOperatorType * ot)

◆ MESH_OT_decimate()

◆ MESH_OT_delete()

◆ MESH_OT_delete_edgeloop()

void MESH_OT_delete_edgeloop ( wmOperatorType * ot)

◆ MESH_OT_delete_loose()

void MESH_OT_delete_loose ( wmOperatorType * ot)

◆ MESH_OT_dissolve_degenerate()

void MESH_OT_dissolve_degenerate ( wmOperatorType * ot)

◆ MESH_OT_dissolve_edges()

◆ MESH_OT_dissolve_faces()

void MESH_OT_dissolve_faces ( wmOperatorType * ot)

◆ MESH_OT_dissolve_limited()

◆ MESH_OT_dissolve_mode()

◆ MESH_OT_dissolve_verts()

◆ MESH_OT_duplicate()

◆ MESH_OT_edge_collapse()

void MESH_OT_edge_collapse ( wmOperatorType * ot)

◆ MESH_OT_edge_face_add()

void MESH_OT_edge_face_add ( wmOperatorType * ot)

◆ MESH_OT_edge_rotate()

void MESH_OT_edge_rotate ( wmOperatorType * ot)

◆ MESH_OT_edge_split()

void MESH_OT_edge_split ( wmOperatorType * ot)

◆ MESH_OT_face_make_planar()

void MESH_OT_face_make_planar ( wmOperatorType * ot)

◆ MESH_OT_faces_shade_flat()

void MESH_OT_faces_shade_flat ( wmOperatorType * ot)

◆ MESH_OT_faces_shade_smooth()

void MESH_OT_faces_shade_smooth ( wmOperatorType * ot)

◆ MESH_OT_fill()

◆ MESH_OT_fill_grid()

◆ MESH_OT_fill_holes()

void MESH_OT_fill_holes ( wmOperatorType * ot)

◆ MESH_OT_flip_normals()

void MESH_OT_flip_normals ( wmOperatorType * ot)

◆ MESH_OT_flip_quad_tessellation()

void MESH_OT_flip_quad_tessellation ( wmOperatorType * ot)

◆ MESH_OT_hide()

void MESH_OT_hide ( wmOperatorType * ot)

◆ MESH_OT_mark_seam()

◆ MESH_OT_mark_sharp()

◆ MESH_OT_merge()

◆ MESH_OT_merge_normals()

void MESH_OT_merge_normals ( wmOperatorType * ot)

◆ MESH_OT_mod_weighted_strength()

◆ MESH_OT_normals_make_consistent()

void MESH_OT_normals_make_consistent ( wmOperatorType * ot)

◆ MESH_OT_normals_tools()

◆ MESH_OT_offset_edge_loops()

void MESH_OT_offset_edge_loops ( wmOperatorType * ot)

◆ MESH_OT_point_normals()

◆ MESH_OT_poke()

◆ MESH_OT_quads_convert_to_tris()

◆ MESH_OT_remove_doubles()

◆ MESH_OT_reveal()

void MESH_OT_reveal ( wmOperatorType * ot)

◆ MESH_OT_separate()

◆ MESH_OT_set_normals_from_faces()

void MESH_OT_set_normals_from_faces ( wmOperatorType * ot)

◆ MESH_OT_shape_propagate_to_all()

void MESH_OT_shape_propagate_to_all ( wmOperatorType * ot)

◆ MESH_OT_smooth_normals()

void MESH_OT_smooth_normals ( wmOperatorType * ot)

◆ MESH_OT_solidify()

◆ MESH_OT_sort_elements()

◆ MESH_OT_split()

void MESH_OT_split ( wmOperatorType * ot)

◆ MESH_OT_split_normals()

void MESH_OT_split_normals ( wmOperatorType * ot)

◆ MESH_OT_subdivide()

◆ MESH_OT_subdivide_edgering()

void MESH_OT_subdivide_edgering ( wmOperatorType * ot)

◆ MESH_OT_symmetrize()

◆ MESH_OT_symmetry_snap()

◆ MESH_OT_tris_convert_to_quads()

void MESH_OT_tris_convert_to_quads ( wmOperatorType * ot)

◆ MESH_OT_unsubdivide()

void MESH_OT_unsubdivide ( wmOperatorType * ot)

◆ MESH_OT_uvs_reverse()

void MESH_OT_uvs_reverse ( wmOperatorType * ot)

◆ MESH_OT_uvs_rotate()

void MESH_OT_uvs_rotate ( wmOperatorType * ot)

◆ MESH_OT_vert_connect()

void MESH_OT_vert_connect ( wmOperatorType * ot)

◆ MESH_OT_vert_connect_concave()

void MESH_OT_vert_connect_concave ( wmOperatorType * ot)

◆ MESH_OT_vert_connect_nonplanar()

◆ MESH_OT_vert_connect_path()

void MESH_OT_vert_connect_path ( wmOperatorType * ot)

◆ MESH_OT_vertices_smooth()

◆ MESH_OT_vertices_smooth_laplacian()

◆ MESH_OT_wireframe()

◆ mesh_separate_arrays()

◆ mesh_separate_loose()

◆ mesh_separate_material()

◆ mesh_separate_material_assign_mat_nr()

void mesh_separate_material_assign_mat_nr ( Main * bmain,
Object * ob,
const short mat_nr )
static

Sets an object to a single material. from one of its slots.

Note
This could be used for split-by-material for non mesh types.
This could take material data from another object or args.

Definition at line 4255 of file editmesh_tools.cc.

References BKE_id_material_array_p(), BKE_id_material_clear(), BKE_id_material_len_p(), BKE_id_material_resize(), BKE_objects_materials_sync_length_all(), BLI_assert, Object::data, id_us_plus(), Object::mat, and Object::matbits.

Referenced by mesh_separate_material().

◆ mesh_separate_selected()

bool mesh_separate_selected ( Main * bmain,
Scene * scene,
ViewLayer * view_layer,
Base * base_old,
BMesh * bm_old )
static

◆ mesh_separate_tagged()

◆ mesh_set_smooth_faces()

void mesh_set_smooth_faces ( BMEditMesh * em,
short smooth )
static

◆ mesh_symmetrize_exec()

◆ mesh_symmetry_snap_exec()

◆ normals_merge()

◆ normals_split()

◆ normals_split_merge()

◆ normals_tools_draw_check_prop()

bool normals_tools_draw_check_prop ( PointerRNA * ptr,
PropertyRNA * prop,
void *  )
static

◆ point_normals_apply()

◆ point_normals_cancel()

void point_normals_cancel ( bContext * C,
wmOperator * op )
static

◆ point_normals_draw_check_prop()

bool point_normals_draw_check_prop ( PointerRNA * ptr,
PropertyRNA * prop,
void *  )
static

Definition at line 8727 of file editmesh_tools.cc.

References ptr, RNA_boolean_get(), RNA_property_identifier(), and STREQ.

Referenced by edbm_point_normals_ui().

◆ point_normals_ensure()

bool point_normals_ensure ( bContext * C,
wmOperator * op )
static

Definition at line 8339 of file editmesh_tools.cc.

References C, wmOperator::customdata, and point_normals_init().

Referenced by edbm_point_normals_modal().

◆ point_normals_free()

void point_normals_free ( wmOperator * op)
static

◆ point_normals_init()

◆ point_normals_modal_keymap()

◆ point_normals_update_statusbar()

◆ shape_itemf()

◆ shape_propagate()

◆ sort_bmelem_flag()

Variable Documentation

◆ average_method_items

EnumPropertyItem average_method_items[]
static
Initial value:
= {
"CUSTOM_NORMAL",
0,
"Custom Normal",
"Take average of vertex normals"},
"FACE_AREA",
0,
"Face Area",
"Set all vertex normals by face area"},
"CORNER_ANGLE",
0,
"Corner Angle",
"Set all vertex normals by corner angle"},
{0, nullptr, 0, nullptr, nullptr},
}
@ EDBM_CLNOR_AVERAGE_LOOP
@ EDBM_CLNOR_AVERAGE_FACE_AREA
@ EDBM_CLNOR_AVERAGE_ANGLE

Definition at line 9046 of file editmesh_tools.cc.

Referenced by MESH_OT_average_normals().

◆ clnors_pointto_mode_items

EnumPropertyItem clnors_pointto_mode_items[]
static
Initial value:
= {
"COORDINATES",
0,
"Coordinates",
"Use static coordinates (defined by various means)"},
{EDBM_CLNOR_POINTTO_MODE_MOUSE, "MOUSE", 0, "Mouse", "Follow mouse cursor"},
{0, nullptr, 0, nullptr, nullptr},
}
@ EDBM_CLNOR_POINTTO_MODE_MOUSE
@ EDBM_CLNOR_POINTTO_MODE_COORDINATES

Definition at line 8314 of file editmesh_tools.cc.

Referenced by MESH_OT_point_normals().

◆ merge_type_items

const EnumPropertyItem merge_type_items[]
static
Initial value:
= {
{MESH_MERGE_CENTER, "CENTER", 0, "At Center", ""},
{MESH_MERGE_CURSOR, "CURSOR", 0, "At Cursor", ""},
{MESH_MERGE_COLLAPSE, "COLLAPSE", 0, "Collapse", ""},
{MESH_MERGE_FIRST, "FIRST", 0, "At First", ""},
{MESH_MERGE_LAST, "LAST", 0, "At Last", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ MESH_MERGE_LAST
@ MESH_MERGE_CENTER
@ MESH_MERGE_CURSOR
@ MESH_MERGE_FIRST
@ MESH_MERGE_COLLAPSE

Definition at line 3478 of file editmesh_tools.cc.

Referenced by merge_type_itemf(), and MESH_OT_merge().

◆ normal_vector_tool_items

EnumPropertyItem normal_vector_tool_items[]
static
Initial value:
= {
{EDBM_CLNOR_TOOLS_COPY, "COPY", 0, "Copy Normal", "Copy normal to the internal clipboard"},
"PASTE",
0,
"Paste Normal",
"Paste normal from the internal clipboard"},
{EDBM_CLNOR_TOOLS_ADD, "ADD", 0, "Add Normal", "Add normal vector with selection"},
"MULTIPLY",
0,
"Multiply Normal",
"Multiply normal vector with selection"},
"RESET",
0,
"Reset Normal",
"Reset the internal clipboard and/or normal of selected element"},
{0, nullptr, 0, nullptr, nullptr},
}
@ EDBM_CLNOR_TOOLS_RESET
@ EDBM_CLNOR_TOOLS_COPY
@ EDBM_CLNOR_TOOLS_ADD
@ EDBM_CLNOR_TOOLS_MULTIPLY
@ EDBM_CLNOR_TOOLS_PASTE

Definition at line 9300 of file editmesh_tools.cc.

Referenced by MESH_OT_normals_tools().

◆ prop_mesh_cornervert_types

const EnumPropertyItem prop_mesh_cornervert_types[]
static
Initial value:
= {
{SUBD_CORNER_INNERVERT, "INNERVERT", 0, "Inner Vert", ""},
{SUBD_CORNER_PATH, "PATH", 0, "Path", ""},
{SUBD_CORNER_STRAIGHT_CUT, "STRAIGHT_CUT", 0, "Straight Cut", ""},
{SUBD_CORNER_FAN, "FAN", 0, "Fan", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ SUBD_CORNER_FAN
@ SUBD_CORNER_STRAIGHT_CUT
@ SUBD_CORNER_PATH
@ SUBD_CORNER_INNERVERT

Definition at line 141 of file editmesh_tools.cc.

Referenced by MESH_OT_subdivide().

◆ prop_mesh_face_strength_types

const EnumPropertyItem prop_mesh_face_strength_types[]
static
Initial value:
= {
{FACE_STRENGTH_WEAK, "WEAK", 0, "Weak", ""},
{FACE_STRENGTH_MEDIUM, "MEDIUM", 0, "Medium", ""},
{FACE_STRENGTH_STRONG, "STRONG", 0, "Strong", ""},
{0, nullptr, 0, nullptr, nullptr},
}
@ FACE_STRENGTH_STRONG
@ FACE_STRENGTH_WEAK
@ FACE_STRENGTH_MEDIUM

Definition at line 9832 of file editmesh_tools.cc.

Referenced by MESH_OT_mod_weighted_strength().