coded little vert connect tool. connects selected verts within the same face. curre...
[blender.git] / source / blender / bmesh / intern / bmesh_opdefines.c
1 #include "bmesh.h"
2 #include "bmesh_private.h"
3
4 #include <stdio.h>
5
6 BMOpDefine def_connectverts = {
7         {BMOP_OPSLOT_PNT_BUF,
8          BMOP_OPSLOT_PNT_BUF},
9         connectverts_exec,
10         BM_CONVERTS_TOTSLOT,
11         0
12 };
13
14 BMOpDefine def_extrudefaceregion = {
15         {BMOP_OPSLOT_PNT_BUF,
16          BMOP_OPSLOT_MAPPING,
17          BMOP_OPSLOT_PNT_BUF},
18         extrude_edge_context_exec,
19         BMOP_EXFACE_TOTSLOT,
20         0
21 };
22
23 BMOpDefine def_makefgonsop = {
24         {0},
25         bmesh_make_fgons_exec,
26         BMOP_MAKE_FGONS_TOTSLOT,
27         0
28 };
29
30 BMOpDefine def_dissolvevertsop = {
31         {BMOP_OPSLOT_PNT_BUF},
32         dissolveverts_exec,
33         BMOP_DISVERTS_TOTSLOT,
34         0
35 };
36
37 BMOpDefine def_dissolvefacesop = {
38         {BMOP_OPSLOT_PNT_BUF,
39          BMOP_OPSLOT_PNT_BUF},
40         dissolvefaces_exec,
41         BMOP_DISFACES_TOTSLOT,
42         0
43 };
44
45
46 BMOpDefine def_triangop = {
47         {BMOP_OPSLOT_PNT_BUF, 
48          BMOP_OPSLOT_PNT_BUF,
49          BMOP_OPSLOT_PNT_BUF},
50         triangulate_exec,
51         BMOP_TRIANG_TOTSLOT,
52         0
53 };
54
55 BMOpDefine def_subdop = {
56         {BMOP_OPSLOT_PNT_BUF,
57          BMOP_OPSLOT_INT,
58          BMOP_OPSLOT_INT,
59          BMOP_OPSLOT_FLT,
60          BMOP_OPSLOT_MAPPING,
61          BMOP_OPSLOT_MAPPING,
62          BMOP_OPSLOT_PNT_BUF,
63          BMOP_OPSLOT_PNT_BUF,
64          },
65         esubdivide_exec,
66         BMOP_ESUBDIVIDE_TOTSLOT,
67         0
68 };
69
70 BMOpDefine def_edit2bmesh = {
71         {BMOP_OPSLOT_PNT},
72         edit2bmesh_exec,
73         BMOP_TO_EDITMESH_TOTSLOT,
74         0
75 };
76
77 BMOpDefine def_bmesh2edit = {
78         {BMOP_OPSLOT_PNT},
79         bmesh2edit_exec,
80         BMOP_FROM_EDITMESH_TOTSLOT,
81         0
82 };
83
84 BMOpDefine def_delop = {
85         {BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_INT},
86         delop_exec,
87         BMOP_DEL_TOTSLOT,
88         0
89 };
90
91 BMOpDefine def_dupeop = {
92         {BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_PNT_BUF,
93          BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_MAPPING},
94         dupeop_exec,
95         BMOP_DUPE_TOTSLOT,
96         0
97 };
98
99 BMOpDefine def_splitop = {
100         {BMOP_OPSLOT_PNT_BUF,
101          BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_MAPPING},
102         splitop_exec,
103         BMOP_SPLIT_TOTSLOT,
104         0
105 };
106
107 BMOpDefine *opdefines[] = {
108         &def_splitop,
109         &def_dupeop,
110         &def_delop,
111         &def_edit2bmesh,
112         &def_bmesh2edit,
113         &def_subdop,
114         &def_triangop,
115         &def_dissolvefacesop,
116         &def_dissolvevertsop,
117         &def_makefgonsop,
118         &def_extrudefaceregion,
119         &def_connectverts,
120 };
121
122 int bmesh_total_ops = (sizeof(opdefines) / sizeof(void*));