Cleanup: Move mesh_intern.hh to C++
This commit is contained in:
@@ -57,7 +57,7 @@ set(SRC
|
||||
mesh_ops.cc
|
||||
meshtools.cc
|
||||
|
||||
mesh_intern.h
|
||||
mesh_intern.hh
|
||||
)
|
||||
|
||||
set(LIB
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "ED_object.hh"
|
||||
#include "ED_screen.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#define MESH_ADD_VERTS_MAXI 10000000
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
|
||||
#include "BLT_translation.h"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Helper Functions
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
#include "mesh_intern.h"
|
||||
#include "mesh_intern.hh"
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Delete Operator
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
#include "ED_util.hh"
|
||||
#include "ED_view3d.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#define MVAL_PIXEL_MARGIN 5.0f
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "UI_resources.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#define USE_GIZMO
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Extrude Internal Utilities
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "ED_screen.hh"
|
||||
#include "ED_view3d.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Screw Operator
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#define USE_GIZMO
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#include "ED_transform.hh"
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "ED_util.hh"
|
||||
#include "ED_view3d.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
struct InsetObjectStore {
|
||||
/** Must have a valid edit-mesh. */
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "intern/bmesh_private.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#include "tools/bmesh_boolean.hh"
|
||||
#include "tools/bmesh_intersect.hh"
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
#include "mesh_intern.h" /* Own include. */
|
||||
#include "mesh_intern.hh" /* Own include. */
|
||||
|
||||
using namespace blender;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
#include "ED_screen.hh"
|
||||
#include "ED_view3d.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
static LinkNode *knifeproject_poly_from_object(const bContext *C, Object *ob, LinkNode *polys)
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "DEG_depsgraph.hh"
|
||||
#include "DEG_depsgraph_query.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#define SUBD_SMOOTH_MAX 4.0f
|
||||
#define SUBD_CUTS_MAX 500
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
#include "MEM_guardedalloc.h"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
static bool geometry_extract_poll(bContext *C)
|
||||
{
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include "DEG_depsgraph.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Path Select Struct & Properties
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
#include "bmesh.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#include "RNA_access.hh"
|
||||
#include "RNA_define.hh"
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
#include "bmesh.hh"
|
||||
#include "bmesh_tools.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
using blender::float2;
|
||||
using blender::float3;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "bmesh.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
using blender::float2;
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
#include "DRW_select_buffer.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/* use bmesh operator flags for a few operators */
|
||||
#define BMO_ELE_TAG 1
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
#include "ED_screen.hh"
|
||||
#include "ED_select_utils.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Select Similar (Vert/Edge/Face) Operator - common
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
#include "UI_interface.hh"
|
||||
#include "UI_resources.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
#include "bmesh_tools.hh"
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "ED_uvedit.hh"
|
||||
#include "ED_view3d.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/** \name Redo API
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
#include "GEO_mesh_split_edges.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
using blender::Array;
|
||||
using blender::float2;
|
||||
|
||||
@@ -1,332 +0,0 @@
|
||||
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/** \file
|
||||
* \ingroup edmesh
|
||||
*/
|
||||
|
||||
/* Internal for editmesh_xxxx.c functions */
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
struct BMEditMesh;
|
||||
struct BMElem;
|
||||
struct BMOperator;
|
||||
struct EnumPropertyItem;
|
||||
struct LinkNode;
|
||||
struct Object;
|
||||
struct bContext;
|
||||
struct wmKeyConfig;
|
||||
struct wmKeyMap;
|
||||
struct wmOperator;
|
||||
struct wmOperatorType;
|
||||
|
||||
/* *** editmesh_utils.cc *** */
|
||||
|
||||
/*
|
||||
* ok: the EDBM module is for editmode bmesh stuff. in contrast, the
|
||||
* BMEdit module is for code shared with blenkernel that concerns
|
||||
* the BMEditMesh structure. */
|
||||
|
||||
/** 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_call_and_selectf(struct BMEditMesh *em,
|
||||
struct wmOperator *op,
|
||||
const char *select_slot,
|
||||
bool select_replace,
|
||||
const char *fmt,
|
||||
...);
|
||||
/**
|
||||
* Same as above, but doesn't report errors.
|
||||
*/
|
||||
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 it.
|
||||
*
|
||||
* execute the operator with #BMO_op_exec.
|
||||
*/
|
||||
bool EDBM_op_init(
|
||||
struct BMEditMesh *em, struct BMOperator *bmop, struct wmOperator *op, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* 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,
|
||||
struct BMOperator *bmop,
|
||||
struct wmOperator *op,
|
||||
bool do_report);
|
||||
|
||||
void EDBM_stats_update(struct BMEditMesh *em);
|
||||
|
||||
/**
|
||||
* Poll call for mesh operators requiring a view3d context.
|
||||
*/
|
||||
bool EDBM_view3d_poll(struct bContext *C);
|
||||
|
||||
struct BMElem *EDBM_elem_from_selectmode(struct BMEditMesh *em,
|
||||
struct BMVert *eve,
|
||||
struct BMEdge *eed,
|
||||
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);
|
||||
struct BMElem *EDBM_elem_from_index_any(struct BMEditMesh *em, uint index);
|
||||
|
||||
int EDBM_elem_to_index_any_multi(const struct Scene *scene,
|
||||
struct ViewLayer *view_layer,
|
||||
struct BMEditMesh *em,
|
||||
struct BMElem *ele,
|
||||
int *r_object_index);
|
||||
struct BMElem *EDBM_elem_from_index_any_multi(const struct Scene *scene,
|
||||
struct ViewLayer *view_layer,
|
||||
uint object_index,
|
||||
uint elem_index,
|
||||
struct Object **r_obedit);
|
||||
|
||||
/**
|
||||
* Extrudes individual edges.
|
||||
*/
|
||||
bool edbm_extrude_edges_indiv(struct BMEditMesh *em,
|
||||
struct wmOperator *op,
|
||||
char hflag,
|
||||
bool use_normal_flip);
|
||||
|
||||
/* *** `editmesh_add.cc` *** */
|
||||
|
||||
void MESH_OT_primitive_plane_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_cylinder_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_monkey_add(struct wmOperatorType *ot);
|
||||
void MESH_OT_primitive_uv_sphere_add(struct wmOperatorType *ot);
|
||||
void MESH_OT_primitive_ico_sphere_add(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_add_gizmo.cc` *** */
|
||||
|
||||
void MESH_OT_primitive_cube_add_gizmo(struct wmOperatorType *ot);
|
||||
|
||||
/* *** editmesh_attribute.cc *** */
|
||||
|
||||
void MESH_OT_attribute_set(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_bevel.cc` *** */
|
||||
|
||||
void MESH_OT_bevel(struct wmOperatorType *ot);
|
||||
struct wmKeyMap *bevel_modal_keymap(struct wmKeyConfig *keyconf);
|
||||
|
||||
/* *** `editmesh_bisect.cc` *** */
|
||||
|
||||
void MESH_OT_bisect(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude.cc` *** */
|
||||
|
||||
void MESH_OT_extrude_repeat(struct wmOperatorType *ot);
|
||||
void MESH_OT_extrude_region(struct wmOperatorType *ot);
|
||||
void MESH_OT_extrude_context(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_faces_indiv(struct wmOperatorType *ot);
|
||||
void MESH_OT_dupli_extrude_cursor(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude_screw.cc` *** */
|
||||
|
||||
void MESH_OT_screw(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude_spin.cc` *** */
|
||||
|
||||
void MESH_OT_spin(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude_spin_gizmo.cc` *** */
|
||||
|
||||
void MESH_GGT_spin(struct wmGizmoGroupType *gzgt);
|
||||
void MESH_GGT_spin_redo(struct wmGizmoGroupType *gzgt);
|
||||
|
||||
/* *** `editmesh_polybuild.cc` *** */
|
||||
|
||||
void MESH_OT_polybuild_face_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_transform_at_cursor(struct wmOperatorType *ot);
|
||||
void MESH_OT_polybuild_delete_at_cursor(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_inset.cc` *** */
|
||||
|
||||
void MESH_OT_inset(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_intersect.cc` *** */
|
||||
|
||||
void MESH_OT_intersect(struct wmOperatorType *ot);
|
||||
void MESH_OT_intersect_boolean(struct wmOperatorType *ot);
|
||||
void MESH_OT_face_split_by_edges(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_knife.cc` *** */
|
||||
|
||||
void MESH_OT_knife_tool(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 ViewContext *vc,
|
||||
struct Object **objects,
|
||||
int objects_len,
|
||||
struct LinkNode *polys,
|
||||
bool use_tag,
|
||||
bool cut_through);
|
||||
|
||||
struct wmKeyMap *knifetool_modal_keymap(struct wmKeyConfig *keyconf);
|
||||
|
||||
/* *** `editmesh_loopcut.cc` *** */
|
||||
|
||||
void MESH_OT_loopcut(struct wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_rip.cc` *** */
|
||||
|
||||
void MESH_OT_rip(struct wmOperatorType *ot);
|
||||
void MESH_OT_rip_edge(struct wmOperatorType *ot);
|
||||
|
||||
/* *** editmesh_select.cc *** */
|
||||
|
||||
void MESH_OT_select_similar(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_similar_region(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_mode(struct wmOperatorType *ot);
|
||||
void MESH_OT_loop_multi_select(struct wmOperatorType *ot);
|
||||
void MESH_OT_loop_select(struct wmOperatorType *ot);
|
||||
void MESH_OT_edgering_select(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_all(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_interior_faces(struct wmOperatorType *ot);
|
||||
void MESH_OT_shortest_path_pick(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_linked(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_linked_pick(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_face_by_sides(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_loose(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_mirror(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_more(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_less(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_nth(struct wmOperatorType *ot);
|
||||
void MESH_OT_edges_select_sharp(struct wmOperatorType *ot);
|
||||
void MESH_OT_faces_select_linked_flat(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_non_manifold(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_random(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_ungrouped(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_axis(struct wmOperatorType *ot);
|
||||
void MESH_OT_region_to_loop(struct wmOperatorType *ot);
|
||||
void MESH_OT_loop_to_region(struct wmOperatorType *ot);
|
||||
void MESH_OT_select_by_attribute(struct wmOperatorType *ot);
|
||||
void MESH_OT_shortest_path_select(struct wmOperatorType *ot);
|
||||
|
||||
extern struct EnumPropertyItem *corner_type_items;
|
||||
|
||||
/* *** editmesh_tools.cc *** */
|
||||
void MESH_OT_subdivide(struct wmOperatorType *ot);
|
||||
void MESH_OT_subdivide_edgering(struct wmOperatorType *ot);
|
||||
void MESH_OT_unsubdivide(struct wmOperatorType *ot);
|
||||
void MESH_OT_normals_make_consistent(struct wmOperatorType *ot);
|
||||
void MESH_OT_vertices_smooth(struct wmOperatorType *ot);
|
||||
void MESH_OT_vertices_smooth_laplacian(struct wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect(struct wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect_path(struct wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect_concave(struct wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect_nonplanar(struct wmOperatorType *ot);
|
||||
void MESH_OT_face_make_planar(struct wmOperatorType *ot);
|
||||
void MESH_OT_edge_split(struct wmOperatorType *ot);
|
||||
void MESH_OT_bridge_edge_loops(struct wmOperatorType *ot);
|
||||
void MESH_OT_offset_edge_loops(struct wmOperatorType *ot);
|
||||
void MESH_OT_wireframe(struct wmOperatorType *ot);
|
||||
void MESH_OT_convex_hull(struct wmOperatorType *ot);
|
||||
void MESH_OT_symmetrize(struct wmOperatorType *ot);
|
||||
void MESH_OT_symmetry_snap(struct wmOperatorType *ot);
|
||||
void MESH_OT_shape_propagate_to_all(struct wmOperatorType *ot);
|
||||
void MESH_OT_blend_from_shape(struct wmOperatorType *ot);
|
||||
void MESH_OT_sort_elements(struct wmOperatorType *ot);
|
||||
void MESH_OT_uvs_rotate(struct wmOperatorType *ot);
|
||||
void MESH_OT_uvs_reverse(struct wmOperatorType *ot);
|
||||
void MESH_OT_colors_rotate(struct wmOperatorType *ot);
|
||||
void MESH_OT_colors_reverse(struct wmOperatorType *ot);
|
||||
void MESH_OT_delete(struct wmOperatorType *ot);
|
||||
void MESH_OT_delete_loose(struct wmOperatorType *ot);
|
||||
void MESH_OT_edge_collapse(struct wmOperatorType *ot);
|
||||
void MESH_OT_faces_shade_smooth(struct wmOperatorType *ot);
|
||||
void MESH_OT_faces_shade_flat(struct wmOperatorType *ot);
|
||||
void MESH_OT_split(struct wmOperatorType *ot);
|
||||
void MESH_OT_edge_rotate(struct wmOperatorType *ot);
|
||||
void MESH_OT_hide(struct wmOperatorType *ot);
|
||||
void MESH_OT_reveal(struct wmOperatorType *ot);
|
||||
void MESH_OT_mark_seam(struct wmOperatorType *ot);
|
||||
void MESH_OT_mark_sharp(struct wmOperatorType *ot);
|
||||
void MESH_OT_flip_normals(struct wmOperatorType *ot);
|
||||
void MESH_OT_solidify(struct wmOperatorType *ot);
|
||||
void MESH_OT_knife_cut(struct wmOperatorType *ot);
|
||||
void MESH_OT_separate(struct wmOperatorType *ot);
|
||||
void MESH_OT_fill(struct wmOperatorType *ot);
|
||||
void MESH_OT_fill_grid(struct wmOperatorType *ot);
|
||||
void MESH_OT_fill_holes(struct wmOperatorType *ot);
|
||||
void MESH_OT_beautify_fill(struct wmOperatorType *ot);
|
||||
void MESH_OT_quads_convert_to_tris(struct wmOperatorType *ot);
|
||||
void MESH_OT_tris_convert_to_quads(struct wmOperatorType *ot);
|
||||
void MESH_OT_decimate(struct wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_verts(struct wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_edges(struct wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_faces(struct wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_mode(struct wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_limited(struct wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_degenerate(struct wmOperatorType *ot);
|
||||
void MESH_OT_delete_edgeloop(struct wmOperatorType *ot);
|
||||
void MESH_OT_edge_face_add(struct wmOperatorType *ot);
|
||||
void MESH_OT_duplicate(struct wmOperatorType *ot);
|
||||
void MESH_OT_merge(struct wmOperatorType *ot);
|
||||
void MESH_OT_remove_doubles(struct wmOperatorType *ot);
|
||||
void MESH_OT_poke(struct wmOperatorType *ot);
|
||||
void MESH_OT_point_normals(struct wmOperatorType *ot);
|
||||
void MESH_OT_merge_normals(struct wmOperatorType *ot);
|
||||
void MESH_OT_split_normals(struct wmOperatorType *ot);
|
||||
void MESH_OT_normals_tools(struct wmOperatorType *ot);
|
||||
void MESH_OT_set_normals_from_faces(struct wmOperatorType *ot);
|
||||
void MESH_OT_average_normals(struct wmOperatorType *ot);
|
||||
void MESH_OT_smooth_normals(struct wmOperatorType *ot);
|
||||
void MESH_OT_mod_weighted_strength(struct wmOperatorType *ot);
|
||||
void MESH_OT_flip_quad_tessellation(struct wmOperatorType *ot);
|
||||
|
||||
/* *** editmesh_mask_extract.cc *** */
|
||||
|
||||
void MESH_OT_paint_mask_extract(struct wmOperatorType *ot);
|
||||
void MESH_OT_face_set_extract(struct wmOperatorType *ot);
|
||||
void MESH_OT_paint_mask_slice(struct wmOperatorType *ot);
|
||||
|
||||
/** Called in `transform_ops.cc`, on each regeneration of key-maps. */
|
||||
struct wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf);
|
||||
|
||||
#if defined(WITH_FREESTYLE)
|
||||
void MESH_OT_mark_freestyle_edge(struct wmOperatorType *ot);
|
||||
void MESH_OT_mark_freestyle_face(struct wmOperatorType *ot);
|
||||
#endif
|
||||
|
||||
/* *** mesh_data.cc *** */
|
||||
|
||||
void MESH_OT_uv_texture_add(struct wmOperatorType *ot);
|
||||
void MESH_OT_uv_texture_remove(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_clear(struct wmOperatorType *ot);
|
||||
void MESH_OT_customdata_custom_splitnormals_add(struct wmOperatorType *ot);
|
||||
void MESH_OT_customdata_custom_splitnormals_clear(struct wmOperatorType *ot);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
320
source/blender/editors/mesh/mesh_intern.hh
Normal file
320
source/blender/editors/mesh/mesh_intern.hh
Normal file
@@ -0,0 +1,320 @@
|
||||
/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-or-later */
|
||||
|
||||
/** \file
|
||||
* \ingroup edmesh
|
||||
*/
|
||||
|
||||
/* Internal for editmesh_xxxx.c functions */
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "BLI_sys_types.h"
|
||||
|
||||
struct bContext;
|
||||
struct BMEditMesh;
|
||||
struct BMEdge;
|
||||
struct BMElem;
|
||||
struct BMFace;
|
||||
struct BMVert;
|
||||
struct BMOperator;
|
||||
struct EnumPropertyItem;
|
||||
struct LinkNode;
|
||||
struct Object;
|
||||
struct Scene;
|
||||
struct wmGizmoGroupType;
|
||||
struct wmKeyConfig;
|
||||
struct wmKeyMap;
|
||||
struct wmOperator;
|
||||
struct wmOperatorType;
|
||||
struct ViewContext;
|
||||
struct ViewLayer;
|
||||
|
||||
/* *** editmesh_utils.cc *** */
|
||||
|
||||
/*
|
||||
* ok: the EDBM module is for editmode bmesh stuff. in contrast, the
|
||||
* BMEdit module is for code shared with blenkernel that concerns
|
||||
* the BMEditMesh structure. */
|
||||
|
||||
/** Calls a bmesh op, reporting errors to the user, etc. */
|
||||
bool EDBM_op_callf(BMEditMesh *em, wmOperator *op, const char *fmt, ...);
|
||||
bool EDBM_op_call_and_selectf(BMEditMesh *em,
|
||||
wmOperator *op,
|
||||
const char *select_slot,
|
||||
bool select_replace,
|
||||
const char *fmt,
|
||||
...);
|
||||
/**
|
||||
* Same as above, but doesn't report errors.
|
||||
*/
|
||||
bool EDBM_op_call_silentf(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 it.
|
||||
*
|
||||
* execute the operator with #BMO_op_exec.
|
||||
*/
|
||||
bool EDBM_op_init(BMEditMesh *em, BMOperator *bmop, wmOperator *op, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* 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(BMEditMesh *em, BMOperator *bmop, wmOperator *op, bool do_report);
|
||||
|
||||
void EDBM_stats_update(BMEditMesh *em);
|
||||
|
||||
/**
|
||||
* Poll call for mesh operators requiring a view3d context.
|
||||
*/
|
||||
bool EDBM_view3d_poll(bContext *C);
|
||||
|
||||
BMElem *EDBM_elem_from_selectmode(BMEditMesh *em, BMVert *eve, BMEdge *eed, 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(BMEditMesh *em, BMElem *ele);
|
||||
BMElem *EDBM_elem_from_index_any(BMEditMesh *em, uint index);
|
||||
|
||||
int EDBM_elem_to_index_any_multi(
|
||||
const Scene *scene, ViewLayer *view_layer, BMEditMesh *em, BMElem *ele, int *r_object_index);
|
||||
BMElem *EDBM_elem_from_index_any_multi(const Scene *scene,
|
||||
ViewLayer *view_layer,
|
||||
uint object_index,
|
||||
uint elem_index,
|
||||
Object **r_obedit);
|
||||
|
||||
/**
|
||||
* Extrudes individual edges.
|
||||
*/
|
||||
bool edbm_extrude_edges_indiv(BMEditMesh *em, wmOperator *op, char hflag, bool use_normal_flip);
|
||||
|
||||
/* *** `editmesh_add.cc` *** */
|
||||
|
||||
void MESH_OT_primitive_plane_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_cube_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_circle_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_cylinder_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_cone_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_grid_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_monkey_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_uv_sphere_add(wmOperatorType *ot);
|
||||
void MESH_OT_primitive_ico_sphere_add(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_add_gizmo.cc` *** */
|
||||
|
||||
void MESH_OT_primitive_cube_add_gizmo(wmOperatorType *ot);
|
||||
|
||||
/* *** editmesh_attribute.cc *** */
|
||||
|
||||
void MESH_OT_attribute_set(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_bevel.cc` *** */
|
||||
|
||||
void MESH_OT_bevel(wmOperatorType *ot);
|
||||
wmKeyMap *bevel_modal_keymap(wmKeyConfig *keyconf);
|
||||
|
||||
/* *** `editmesh_bisect.cc` *** */
|
||||
|
||||
void MESH_OT_bisect(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude.cc` *** */
|
||||
|
||||
void MESH_OT_extrude_repeat(wmOperatorType *ot);
|
||||
void MESH_OT_extrude_region(wmOperatorType *ot);
|
||||
void MESH_OT_extrude_context(wmOperatorType *ot);
|
||||
void MESH_OT_extrude_verts_indiv(wmOperatorType *ot);
|
||||
void MESH_OT_extrude_edges_indiv(wmOperatorType *ot);
|
||||
void MESH_OT_extrude_faces_indiv(wmOperatorType *ot);
|
||||
void MESH_OT_dupli_extrude_cursor(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude_screw.cc` *** */
|
||||
|
||||
void MESH_OT_screw(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude_spin.cc` *** */
|
||||
|
||||
void MESH_OT_spin(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_extrude_spin_gizmo.cc` *** */
|
||||
|
||||
void MESH_GGT_spin(wmGizmoGroupType *gzgt);
|
||||
void MESH_GGT_spin_redo(wmGizmoGroupType *gzgt);
|
||||
|
||||
/* *** `editmesh_polybuild.cc` *** */
|
||||
|
||||
void MESH_OT_polybuild_face_at_cursor(wmOperatorType *ot);
|
||||
void MESH_OT_polybuild_split_at_cursor(wmOperatorType *ot);
|
||||
void MESH_OT_polybuild_dissolve_at_cursor(wmOperatorType *ot);
|
||||
void MESH_OT_polybuild_transform_at_cursor(wmOperatorType *ot);
|
||||
void MESH_OT_polybuild_delete_at_cursor(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_inset.cc` *** */
|
||||
|
||||
void MESH_OT_inset(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_intersect.cc` *** */
|
||||
|
||||
void MESH_OT_intersect(wmOperatorType *ot);
|
||||
void MESH_OT_intersect_boolean(wmOperatorType *ot);
|
||||
void MESH_OT_face_split_by_edges(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_knife.cc` *** */
|
||||
|
||||
void MESH_OT_knife_tool(wmOperatorType *ot);
|
||||
void MESH_OT_knife_project(wmOperatorType *ot);
|
||||
/**
|
||||
* \param use_tag: When set, tag all faces inside the polylines.
|
||||
*/
|
||||
void EDBM_mesh_knife(ViewContext *vc,
|
||||
Object **objects,
|
||||
int objects_len,
|
||||
LinkNode *polys,
|
||||
bool use_tag,
|
||||
bool cut_through);
|
||||
|
||||
wmKeyMap *knifetool_modal_keymap(wmKeyConfig *keyconf);
|
||||
|
||||
/* *** `editmesh_loopcut.cc` *** */
|
||||
|
||||
void MESH_OT_loopcut(wmOperatorType *ot);
|
||||
|
||||
/* *** `editmesh_rip.cc` *** */
|
||||
|
||||
void MESH_OT_rip(wmOperatorType *ot);
|
||||
void MESH_OT_rip_edge(wmOperatorType *ot);
|
||||
|
||||
/* *** editmesh_select.cc *** */
|
||||
|
||||
void MESH_OT_select_similar(wmOperatorType *ot);
|
||||
void MESH_OT_select_similar_region(wmOperatorType *ot);
|
||||
void MESH_OT_select_mode(wmOperatorType *ot);
|
||||
void MESH_OT_loop_multi_select(wmOperatorType *ot);
|
||||
void MESH_OT_loop_select(wmOperatorType *ot);
|
||||
void MESH_OT_edgering_select(wmOperatorType *ot);
|
||||
void MESH_OT_select_all(wmOperatorType *ot);
|
||||
void MESH_OT_select_interior_faces(wmOperatorType *ot);
|
||||
void MESH_OT_shortest_path_pick(wmOperatorType *ot);
|
||||
void MESH_OT_select_linked(wmOperatorType *ot);
|
||||
void MESH_OT_select_linked_pick(wmOperatorType *ot);
|
||||
void MESH_OT_select_face_by_sides(wmOperatorType *ot);
|
||||
void MESH_OT_select_loose(wmOperatorType *ot);
|
||||
void MESH_OT_select_mirror(wmOperatorType *ot);
|
||||
void MESH_OT_select_more(wmOperatorType *ot);
|
||||
void MESH_OT_select_less(wmOperatorType *ot);
|
||||
void MESH_OT_select_nth(wmOperatorType *ot);
|
||||
void MESH_OT_edges_select_sharp(wmOperatorType *ot);
|
||||
void MESH_OT_faces_select_linked_flat(wmOperatorType *ot);
|
||||
void MESH_OT_select_non_manifold(wmOperatorType *ot);
|
||||
void MESH_OT_select_random(wmOperatorType *ot);
|
||||
void MESH_OT_select_ungrouped(wmOperatorType *ot);
|
||||
void MESH_OT_select_axis(wmOperatorType *ot);
|
||||
void MESH_OT_region_to_loop(wmOperatorType *ot);
|
||||
void MESH_OT_loop_to_region(wmOperatorType *ot);
|
||||
void MESH_OT_select_by_attribute(wmOperatorType *ot);
|
||||
void MESH_OT_shortest_path_select(wmOperatorType *ot);
|
||||
|
||||
extern EnumPropertyItem *corner_type_items;
|
||||
|
||||
/* *** editmesh_tools.cc *** */
|
||||
void MESH_OT_subdivide(wmOperatorType *ot);
|
||||
void MESH_OT_subdivide_edgering(wmOperatorType *ot);
|
||||
void MESH_OT_unsubdivide(wmOperatorType *ot);
|
||||
void MESH_OT_normals_make_consistent(wmOperatorType *ot);
|
||||
void MESH_OT_vertices_smooth(wmOperatorType *ot);
|
||||
void MESH_OT_vertices_smooth_laplacian(wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect(wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect_path(wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect_concave(wmOperatorType *ot);
|
||||
void MESH_OT_vert_connect_nonplanar(wmOperatorType *ot);
|
||||
void MESH_OT_face_make_planar(wmOperatorType *ot);
|
||||
void MESH_OT_edge_split(wmOperatorType *ot);
|
||||
void MESH_OT_bridge_edge_loops(wmOperatorType *ot);
|
||||
void MESH_OT_offset_edge_loops(wmOperatorType *ot);
|
||||
void MESH_OT_wireframe(wmOperatorType *ot);
|
||||
void MESH_OT_convex_hull(wmOperatorType *ot);
|
||||
void MESH_OT_symmetrize(wmOperatorType *ot);
|
||||
void MESH_OT_symmetry_snap(wmOperatorType *ot);
|
||||
void MESH_OT_shape_propagate_to_all(wmOperatorType *ot);
|
||||
void MESH_OT_blend_from_shape(wmOperatorType *ot);
|
||||
void MESH_OT_sort_elements(wmOperatorType *ot);
|
||||
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);
|
||||
void MESH_OT_delete(wmOperatorType *ot);
|
||||
void MESH_OT_delete_loose(wmOperatorType *ot);
|
||||
void MESH_OT_edge_collapse(wmOperatorType *ot);
|
||||
void MESH_OT_faces_shade_smooth(wmOperatorType *ot);
|
||||
void MESH_OT_faces_shade_flat(wmOperatorType *ot);
|
||||
void MESH_OT_split(wmOperatorType *ot);
|
||||
void MESH_OT_edge_rotate(wmOperatorType *ot);
|
||||
void MESH_OT_hide(wmOperatorType *ot);
|
||||
void MESH_OT_reveal(wmOperatorType *ot);
|
||||
void MESH_OT_mark_seam(wmOperatorType *ot);
|
||||
void MESH_OT_mark_sharp(wmOperatorType *ot);
|
||||
void MESH_OT_flip_normals(wmOperatorType *ot);
|
||||
void MESH_OT_solidify(wmOperatorType *ot);
|
||||
void MESH_OT_knife_cut(wmOperatorType *ot);
|
||||
void MESH_OT_separate(wmOperatorType *ot);
|
||||
void MESH_OT_fill(wmOperatorType *ot);
|
||||
void MESH_OT_fill_grid(wmOperatorType *ot);
|
||||
void MESH_OT_fill_holes(wmOperatorType *ot);
|
||||
void MESH_OT_beautify_fill(wmOperatorType *ot);
|
||||
void MESH_OT_quads_convert_to_tris(wmOperatorType *ot);
|
||||
void MESH_OT_tris_convert_to_quads(wmOperatorType *ot);
|
||||
void MESH_OT_decimate(wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_verts(wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_edges(wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_faces(wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_mode(wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_limited(wmOperatorType *ot);
|
||||
void MESH_OT_dissolve_degenerate(wmOperatorType *ot);
|
||||
void MESH_OT_delete_edgeloop(wmOperatorType *ot);
|
||||
void MESH_OT_edge_face_add(wmOperatorType *ot);
|
||||
void MESH_OT_duplicate(wmOperatorType *ot);
|
||||
void MESH_OT_merge(wmOperatorType *ot);
|
||||
void MESH_OT_remove_doubles(wmOperatorType *ot);
|
||||
void MESH_OT_poke(wmOperatorType *ot);
|
||||
void MESH_OT_point_normals(wmOperatorType *ot);
|
||||
void MESH_OT_merge_normals(wmOperatorType *ot);
|
||||
void MESH_OT_split_normals(wmOperatorType *ot);
|
||||
void MESH_OT_normals_tools(wmOperatorType *ot);
|
||||
void MESH_OT_set_normals_from_faces(wmOperatorType *ot);
|
||||
void MESH_OT_average_normals(wmOperatorType *ot);
|
||||
void MESH_OT_smooth_normals(wmOperatorType *ot);
|
||||
void MESH_OT_mod_weighted_strength(wmOperatorType *ot);
|
||||
void MESH_OT_flip_quad_tessellation(wmOperatorType *ot);
|
||||
|
||||
/* *** editmesh_mask_extract.cc *** */
|
||||
|
||||
void MESH_OT_paint_mask_extract(wmOperatorType *ot);
|
||||
void MESH_OT_face_set_extract(wmOperatorType *ot);
|
||||
void MESH_OT_paint_mask_slice(wmOperatorType *ot);
|
||||
|
||||
/** Called in `transform_ops.cc`, on each regeneration of key-maps. */
|
||||
wmKeyMap *point_normals_modal_keymap(wmKeyConfig *keyconf);
|
||||
|
||||
#if defined(WITH_FREESTYLE)
|
||||
void MESH_OT_mark_freestyle_edge(wmOperatorType *ot);
|
||||
void MESH_OT_mark_freestyle_face(wmOperatorType *ot);
|
||||
#endif
|
||||
|
||||
/* *** mesh_data.cc *** */
|
||||
|
||||
void MESH_OT_uv_texture_add(wmOperatorType *ot);
|
||||
void MESH_OT_uv_texture_remove(wmOperatorType *ot);
|
||||
void MESH_OT_customdata_mask_clear(wmOperatorType *ot);
|
||||
void MESH_OT_customdata_skin_add(wmOperatorType *ot);
|
||||
void MESH_OT_customdata_skin_clear(wmOperatorType *ot);
|
||||
void MESH_OT_customdata_custom_splitnormals_add(wmOperatorType *ot);
|
||||
void MESH_OT_customdata_custom_splitnormals_clear(wmOperatorType *ot);
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "ED_mesh.hh"
|
||||
#include "ED_screen.hh"
|
||||
|
||||
#include "mesh_intern.h" /* own include */
|
||||
#include "mesh_intern.hh" /* own include */
|
||||
|
||||
/**************************** registration **********************************/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user