svn merge ^/trunk/blender -r55815:55840
[blender-staging.git] / source / blender / bmesh / intern / bmesh_operators.h
1 /*
2  * ***** BEGIN GPL LICENSE BLOCK *****
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software Foundation,
16  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17  *
18  * Contributor(s): Joseph Eagar.
19  *
20  * ***** END GPL LICENSE BLOCK *****
21  */
22
23 #ifndef __BMESH_OPERATORS_H__
24 #define __BMESH_OPERATORS_H__
25
26 /** \file blender/bmesh/intern/bmesh_operators.h
27  *  \ingroup bmesh
28  */
29
30 /*see comments in intern/bmesh_opdefines.c for documentation of specific operators*/
31
32 /*--------defines/enumerations for specific operators-------*/
33
34 /*quad innervert values*/
35 enum {
36         SUBD_INNERVERT,
37         SUBD_PATH,
38         SUBD_FAN,
39         SUBD_STRAIGHT_CUT
40 };
41
42 enum {
43         SUBDIV_SELECT_ORIG,
44         SUBDIV_SELECT_INNER,
45         SUBDIV_SELECT_INNER_SEL,
46         SUBDIV_SELECT_LOOPCUT
47 };
48
49 enum {
50         SIM_CMP_EQ = 0,
51         SIM_CMP_GT,
52         SIM_CMP_LT
53 };
54
55 /* similar face selection slot values */
56 enum {
57         SIMFACE_MATERIAL = 201,
58         SIMFACE_IMAGE,
59         SIMFACE_AREA,
60         SIMFACE_SIDES,
61         SIMFACE_PERIMETER,
62         SIMFACE_NORMAL,
63         SIMFACE_COPLANAR,
64 #ifdef WITH_FREESTYLE
65         SIMFACE_FREESTYLE
66 #endif
67 };
68
69 /* similar edge selection slot values */
70 enum {
71         SIMEDGE_LENGTH = 101,
72         SIMEDGE_DIR,
73         SIMEDGE_FACE,
74         SIMEDGE_FACE_ANGLE,
75         SIMEDGE_CREASE,
76         SIMEDGE_BEVEL,
77         SIMEDGE_SEAM,
78         SIMEDGE_SHARP,
79 #ifdef WITH_FREESTYLE
80         SIMEDGE_FREESTYLE
81 #endif
82 };
83
84 /* similar vertex selection slot values */
85 enum {
86         SIMVERT_NORMAL = 0,
87         SIMVERT_FACE,
88         SIMVERT_VGROUP,
89         SIMVERT_EDGE
90 };
91
92 /* vertex path selection values */
93 enum {
94         VPATH_SELECT_EDGE_LENGTH = 0,
95         VPATH_SELECT_TOPOLOGICAL
96 };
97
98 /* Poke face center calculation */
99 enum {
100         BMOP_POKE_MEAN_WEIGHTED = 0,
101         BMOP_POKE_MEAN,
102         BMOP_POKE_BOUNDS
103 };
104
105 extern const BMOpDefine *bmo_opdefines[];
106 extern const int         bmo_opdefines_total;
107
108 /*------specific operator helper functions-------*/
109 void BM_mesh_esubdivide(BMesh *bm, const char edge_hflag,
110                         float smooth, float fractal, float along_normal,
111                         int numcuts,
112                         int seltype, int cornertype,
113                         const short use_single_edge, const short use_grid_fill,
114                         const short use_only_quads,
115                         int seed);
116
117 #include "intern/bmesh_operator_api_inline.h"
118
119 #endif /* __BMESH_OPERATORS_H__ */