Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/mesh/mesh_intern.h
| Show All 37 Lines | |||||
| /* *** editmesh_utils.c *** */ | /* *** editmesh_utils.c *** */ | ||||
| /* | /* | ||||
| * ok: the EDBM module is for editmode bmesh stuff. in contrast, the | * ok: the EDBM module is for editmode bmesh stuff. in contrast, the | ||||
| * BMEdit module is for code shared with blenkernel that concerns | * BMEdit module is for code shared with blenkernel that concerns | ||||
| * the BMEditMesh structure. */ | * the BMEditMesh structure. */ | ||||
| /* Calls a bmesh op, reporting errors to the user, etc */ | /** Calls a bmesh op, reporting errors to the user, etc. */ | ||||
| bool EDBM_op_callf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...); | bool EDBM_op_callf(struct BMEditMesh *em, struct wmOperator *op, const char *fmt, ...); | ||||
| bool EDBM_op_call_and_selectf(struct BMEditMesh *em, | bool EDBM_op_call_and_selectf(struct BMEditMesh *em, | ||||
| struct wmOperator *op, | struct wmOperator *op, | ||||
| const char *select_slot, | const char *select_slot, | ||||
| const bool select_replace, | const bool select_replace, | ||||
| const char *fmt, | const char *fmt, | ||||
| ...); | ...); | ||||
| /* Same as above, but doesn't report errors. */ | /** | ||||
| * Same as above, but doesn't report errors. | |||||
| */ | |||||
| bool EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...); | bool EDBM_op_call_silentf(struct BMEditMesh *em, const char *fmt, ...); | ||||
| /* these next two functions are the split version of EDBM_op_callf, so you can | /** | ||||
| * do stuff with a bmesh operator, after initializing it but before executing | * These next two functions are the split version of EDBM_op_callf, so you can | ||||
| * it. | * do stuff with a bmesh operator, after initializing it but before executing it. | ||||
| * | * | ||||
| * execute the operator with BM_Exec_Op */ | * execute the operator with BM_Exec_Op */ | ||||
| bool EDBM_op_init( | bool EDBM_op_init( | ||||
| struct BMEditMesh *em, struct BMOperator *bmop, struct wmOperator *op, const char *fmt, ...); | struct BMEditMesh *em, struct BMOperator *bmop, struct wmOperator *op, const char *fmt, ...); | ||||
| /* Cleans up after a bmesh operator */ | |||||
| /** | |||||
| * Cleans up after a bmesh operator. | |||||
| * | |||||
| * The return value: | |||||
| * - False on error (the mesh must not be changed). | |||||
| * - True on success, executes and finishes a #BMesh operator. | |||||
| */ | |||||
| bool EDBM_op_finish(struct BMEditMesh *em, | bool EDBM_op_finish(struct BMEditMesh *em, | ||||
| struct BMOperator *bmop, | struct BMOperator *bmop, | ||||
| struct wmOperator *op, | struct wmOperator *op, | ||||
| const bool do_report); | const bool do_report); | ||||
| void EDBM_stats_update(struct BMEditMesh *em); | void EDBM_stats_update(struct BMEditMesh *em); | ||||
| /** | |||||
| * Poll call for mesh operators requiring a view3d context. | |||||
| */ | |||||
| bool EDBM_view3d_poll(struct bContext *C); | bool EDBM_view3d_poll(struct bContext *C); | ||||
| struct BMElem *EDBM_elem_from_selectmode(struct BMEditMesh *em, | struct BMElem *EDBM_elem_from_selectmode(struct BMEditMesh *em, | ||||
| struct BMVert *eve, | struct BMVert *eve, | ||||
| struct BMEdge *eed, | struct BMEdge *eed, | ||||
| struct BMFace *efa); | struct BMFace *efa); | ||||
| /** | |||||
| * Used when we want to store a single index for any vert/edge/face. | |||||
| * | |||||
| * Intended for use with operators. | |||||
| */ | |||||
| int EDBM_elem_to_index_any(struct BMEditMesh *em, struct BMElem *ele); | int EDBM_elem_to_index_any(struct BMEditMesh *em, struct BMElem *ele); | ||||
| struct BMElem *EDBM_elem_from_index_any(struct BMEditMesh *em, uint index); | struct BMElem *EDBM_elem_from_index_any(struct BMEditMesh *em, uint index); | ||||
| int EDBM_elem_to_index_any_multi(struct ViewLayer *view_layer, | int EDBM_elem_to_index_any_multi(struct ViewLayer *view_layer, | ||||
| struct BMEditMesh *em, | struct BMEditMesh *em, | ||||
| struct BMElem *ele, | struct BMElem *ele, | ||||
| int *r_object_index); | int *r_object_index); | ||||
| struct BMElem *EDBM_elem_from_index_any_multi(struct ViewLayer *view_layer, | struct BMElem *EDBM_elem_from_index_any_multi(struct ViewLayer *view_layer, | ||||
| uint object_index, | uint object_index, | ||||
| uint elem_index, | uint elem_index, | ||||
| struct Object **r_obedit); | struct Object **r_obedit); | ||||
| /** | |||||
| * Extrudes individual edges. | |||||
| */ | |||||
| bool edbm_extrude_edges_indiv(struct BMEditMesh *em, | bool edbm_extrude_edges_indiv(struct BMEditMesh *em, | ||||
| struct wmOperator *op, | struct wmOperator *op, | ||||
| const char hflag, | const char hflag, | ||||
| const bool use_normal_flip); | const bool use_normal_flip); | ||||
| /* *** editmesh_add.c *** */ | /* *** editmesh_add.c *** */ | ||||
| void MESH_OT_primitive_plane_add(struct wmOperatorType *ot); | void MESH_OT_primitive_plane_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_cube_add(struct wmOperatorType *ot); | void MESH_OT_primitive_cube_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_circle_add(struct wmOperatorType *ot); | void MESH_OT_primitive_circle_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_cylinder_add(struct wmOperatorType *ot); | void MESH_OT_primitive_cylinder_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_cone_add(struct wmOperatorType *ot); | void MESH_OT_primitive_cone_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_grid_add(struct wmOperatorType *ot); | void MESH_OT_primitive_grid_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot); | void MESH_OT_primitive_monkey_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot); | void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot); | void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot); | ||||
| /* *** editmesh_add_gizmo.c *** */ | /* *** editmesh_add_gizmo.c *** */ | ||||
| void MESH_OT_primitive_cube_add_gizmo(struct wmOperatorType *ot); | void MESH_OT_primitive_cube_add_gizmo(struct wmOperatorType *ot); | ||||
| /* *** editmesh_bevel.c *** */ | /* *** editmesh_bevel.c *** */ | ||||
| void MESH_OT_bevel(struct wmOperatorType *ot); | void MESH_OT_bevel(struct wmOperatorType *ot); | ||||
| struct wmKeyMap *bevel_modal_keymap(struct wmKeyConfig *keyconf); | struct wmKeyMap *bevel_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| /* *** editmesh_bisect.c *** */ | /* *** editmesh_bisect.c *** */ | ||||
| void MESH_OT_bisect(struct wmOperatorType *ot); | void MESH_OT_bisect(struct wmOperatorType *ot); | ||||
| /* *** editmesh_extrude.c *** */ | /* *** editmesh_extrude.c *** */ | ||||
| void MESH_OT_extrude_repeat(struct wmOperatorType *ot); | void MESH_OT_extrude_repeat(struct wmOperatorType *ot); | ||||
| void MESH_OT_extrude_region(struct wmOperatorType *ot); | void MESH_OT_extrude_region(struct wmOperatorType *ot); | ||||
| void MESH_OT_extrude_context(struct wmOperatorType *ot); | void MESH_OT_extrude_context(struct wmOperatorType *ot); | ||||
| void MESH_OT_extrude_verts_indiv(struct wmOperatorType *ot); | void MESH_OT_extrude_verts_indiv(struct wmOperatorType *ot); | ||||
| void MESH_OT_extrude_edges_indiv(struct wmOperatorType *ot); | void MESH_OT_extrude_edges_indiv(struct wmOperatorType *ot); | ||||
| void MESH_OT_extrude_faces_indiv(struct wmOperatorType *ot); | void MESH_OT_extrude_faces_indiv(struct wmOperatorType *ot); | ||||
| void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot); | void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot); | ||||
| /* *** editmesh_extrude_screw.c *** */ | /* *** editmesh_extrude_screw.c *** */ | ||||
| void MESH_OT_screw(struct wmOperatorType *ot); | void MESH_OT_screw(struct wmOperatorType *ot); | ||||
| /* *** editmesh_extrude_spin.c *** */ | /* *** editmesh_extrude_spin.c *** */ | ||||
| void MESH_OT_spin(struct wmOperatorType *ot); | void MESH_OT_spin(struct wmOperatorType *ot); | ||||
| /* *** editmesh_extrude_spin_gizmo.c *** */ | /* *** editmesh_extrude_spin_gizmo.c *** */ | ||||
| void MESH_GGT_spin(struct wmGizmoGroupType *gzgt); | void MESH_GGT_spin(struct wmGizmoGroupType *gzgt); | ||||
| void MESH_GGT_spin_redo(struct wmGizmoGroupType *gzgt); | void MESH_GGT_spin_redo(struct wmGizmoGroupType *gzgt); | ||||
| /* *** editmesh_polybuild.c *** */ | /* *** editmesh_polybuild.c *** */ | ||||
| void MESH_OT_polybuild_face_at_cursor(struct wmOperatorType *ot); | void MESH_OT_polybuild_face_at_cursor(struct wmOperatorType *ot); | ||||
| void MESH_OT_polybuild_split_at_cursor(struct wmOperatorType *ot); | void MESH_OT_polybuild_split_at_cursor(struct wmOperatorType *ot); | ||||
| void MESH_OT_polybuild_dissolve_at_cursor(struct wmOperatorType *ot); | void MESH_OT_polybuild_dissolve_at_cursor(struct wmOperatorType *ot); | ||||
| void MESH_OT_polybuild_transform_at_cursor(struct wmOperatorType *ot); | void MESH_OT_polybuild_transform_at_cursor(struct wmOperatorType *ot); | ||||
| void MESH_OT_polybuild_delete_at_cursor(struct wmOperatorType *ot); | void MESH_OT_polybuild_delete_at_cursor(struct wmOperatorType *ot); | ||||
| /* *** editmesh_inset.c *** */ | /* *** editmesh_inset.c *** */ | ||||
| void MESH_OT_inset(struct wmOperatorType *ot); | void MESH_OT_inset(struct wmOperatorType *ot); | ||||
| /* *** editmesh_intersect.c *** */ | /* *** editmesh_intersect.c *** */ | ||||
| void MESH_OT_intersect(struct wmOperatorType *ot); | void MESH_OT_intersect(struct wmOperatorType *ot); | ||||
| void MESH_OT_intersect_boolean(struct wmOperatorType *ot); | void MESH_OT_intersect_boolean(struct wmOperatorType *ot); | ||||
| void MESH_OT_face_split_by_edges(struct wmOperatorType *ot); | void MESH_OT_face_split_by_edges(struct wmOperatorType *ot); | ||||
| /* *** editmesh_knife.c *** */ | /* *** editmesh_knife.c *** */ | ||||
| void MESH_OT_knife_tool(struct wmOperatorType *ot); | void MESH_OT_knife_tool(struct wmOperatorType *ot); | ||||
| void MESH_OT_knife_project(struct wmOperatorType *ot); | void MESH_OT_knife_project(struct wmOperatorType *ot); | ||||
| /** | |||||
| * \param use_tag: When set, tag all faces inside the polylines. | |||||
| */ | |||||
| void EDBM_mesh_knife(struct bContext *C, | void EDBM_mesh_knife(struct bContext *C, | ||||
| struct ViewContext *vc, | struct ViewContext *vc, | ||||
| struct LinkNode *polys, | struct LinkNode *polys, | ||||
| bool use_tag, | bool use_tag, | ||||
| bool cut_through); | bool cut_through); | ||||
| struct wmKeyMap *knifetool_modal_keymap(struct wmKeyConfig *keyconf); | struct wmKeyMap *knifetool_modal_keymap(struct wmKeyConfig *keyconf); | ||||
| /* *** editmesh_loopcut.c *** */ | /* *** editmesh_loopcut.c *** */ | ||||
| void MESH_OT_loopcut(struct wmOperatorType *ot); | void MESH_OT_loopcut(struct wmOperatorType *ot); | ||||
| /* *** editmesh_rip.c *** */ | /* *** editmesh_rip.c *** */ | ||||
| void MESH_OT_rip(struct wmOperatorType *ot); | void MESH_OT_rip(struct wmOperatorType *ot); | ||||
| void MESH_OT_rip_edge(struct wmOperatorType *ot); | void MESH_OT_rip_edge(struct wmOperatorType *ot); | ||||
| /* *** editmesh_select.c *** */ | /* *** editmesh_select.c *** */ | ||||
| void MESH_OT_select_similar(struct wmOperatorType *ot); | void MESH_OT_select_similar(struct wmOperatorType *ot); | ||||
| void MESH_OT_select_similar_region(struct wmOperatorType *ot); | void MESH_OT_select_similar_region(struct wmOperatorType *ot); | ||||
| void MESH_OT_select_mode(struct wmOperatorType *ot); | void MESH_OT_select_mode(struct wmOperatorType *ot); | ||||
| void MESH_OT_loop_multi_select(struct wmOperatorType *ot); | void MESH_OT_loop_multi_select(struct wmOperatorType *ot); | ||||
| void MESH_OT_loop_select(struct wmOperatorType *ot); | void MESH_OT_loop_select(struct wmOperatorType *ot); | ||||
| void MESH_OT_edgering_select(struct wmOperatorType *ot); | void MESH_OT_edgering_select(struct wmOperatorType *ot); | ||||
| void MESH_OT_select_all(struct wmOperatorType *ot); | void MESH_OT_select_all(struct wmOperatorType *ot); | ||||
| void MESH_OT_select_interior_faces(struct wmOperatorType *ot); | void MESH_OT_select_interior_faces(struct wmOperatorType *ot); | ||||
| ▲ Show 20 Lines • Show All 83 Lines • ▼ Show 20 Lines | |||||
| void MESH_OT_split_normals(struct wmOperatorType *ot); | void MESH_OT_split_normals(struct wmOperatorType *ot); | ||||
| void MESH_OT_normals_tools(struct wmOperatorType *ot); | void MESH_OT_normals_tools(struct wmOperatorType *ot); | ||||
| void MESH_OT_set_normals_from_faces(struct wmOperatorType *ot); | void MESH_OT_set_normals_from_faces(struct wmOperatorType *ot); | ||||
| void MESH_OT_average_normals(struct wmOperatorType *ot); | void MESH_OT_average_normals(struct wmOperatorType *ot); | ||||
| void MESH_OT_smooth_normals(struct wmOperatorType *ot); | void MESH_OT_smooth_normals(struct wmOperatorType *ot); | ||||
| void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot); | void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot); | ||||
| /* *** editmesh_mask_extract.c *** */ | /* *** editmesh_mask_extract.c *** */ | ||||
| void MESH_OT_paint_mask_extract(struct wmOperatorType *ot); | void MESH_OT_paint_mask_extract(struct wmOperatorType *ot); | ||||
| void MESH_OT_face_set_extract(struct wmOperatorType *ot); | void MESH_OT_face_set_extract(struct wmOperatorType *ot); | ||||
| void MESH_OT_paint_mask_slice(struct wmOperatorType *ot); | void MESH_OT_paint_mask_slice(struct wmOperatorType *ot); | ||||
| /** Called in transform_ops.c, on each regeneration of key-maps. */ | |||||
| struct wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf); | struct wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf); | ||||
| #if defined(WITH_FREESTYLE) | #if defined(WITH_FREESTYLE) | ||||
| void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot); | void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot); | ||||
| void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot); | void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot); | ||||
| #endif | #endif | ||||
| /* *** mesh_data.c *** */ | /* *** mesh_data.c *** */ | ||||
| void MESH_OT_uv_texture_add(struct wmOperatorType *ot); | void MESH_OT_uv_texture_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_uv_texture_remove(struct wmOperatorType *ot); | void MESH_OT_uv_texture_remove(struct wmOperatorType *ot); | ||||
| void MESH_OT_vertex_color_add(struct wmOperatorType *ot); | void MESH_OT_vertex_color_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_vertex_color_remove(struct wmOperatorType *ot); | void MESH_OT_vertex_color_remove(struct wmOperatorType *ot); | ||||
| void MESH_OT_sculpt_vertex_color_add(struct wmOperatorType *ot); | void MESH_OT_sculpt_vertex_color_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_sculpt_vertex_color_remove(struct wmOperatorType *ot); | void MESH_OT_sculpt_vertex_color_remove(struct wmOperatorType *ot); | ||||
| /* no create_mask yet */ | |||||
| void MESH_OT_customdata_mask_clear(struct wmOperatorType *ot); | void MESH_OT_customdata_mask_clear(struct wmOperatorType *ot); | ||||
| void MESH_OT_customdata_skin_add(struct wmOperatorType *ot); | void MESH_OT_customdata_skin_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_customdata_skin_clear(struct wmOperatorType *ot); | void MESH_OT_customdata_skin_clear(struct wmOperatorType *ot); | ||||
| void MESH_OT_customdata_custom_splitnormals_add(struct wmOperatorType *ot); | void MESH_OT_customdata_custom_splitnormals_add(struct wmOperatorType *ot); | ||||
| void MESH_OT_customdata_custom_splitnormals_clear(struct wmOperatorType *ot); | void MESH_OT_customdata_custom_splitnormals_clear(struct wmOperatorType *ot); | ||||