47841c58ef7f7c76af3e7a6860d1a3e68f2a0e02
[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_extrudefaceregion = {
7         {BMOP_OPSLOT_PNT_BUF,
8          BMOP_OPSLOT_MAPPING,
9          BMOP_OPSLOT_PNT_BUF},
10         extrude_edge_context_exec,
11         BMOP_EXFACE_TOTSLOT,
12         0
13 };
14
15 BMOpDefine def_makefgonsop = {
16         {0},
17         bmesh_make_fgons_exec,
18         BMOP_MAKE_FGONS_TOTSLOT,
19         0
20 };
21
22 BMOpDefine def_dissolvevertsop = {
23         {BMOP_OPSLOT_PNT_BUF},
24         dissolveverts_exec,
25         BMOP_DISVERTS_TOTSLOT,
26         0
27 };
28
29 BMOpDefine def_dissolvefacesop = {
30         {BMOP_OPSLOT_PNT_BUF,
31          BMOP_OPSLOT_PNT_BUF},
32         dissolvefaces_exec,
33         BMOP_DISFACES_TOTSLOT,
34         0
35 };
36
37
38 BMOpDefine def_triangop = {
39         {BMOP_OPSLOT_PNT_BUF, 
40          BMOP_OPSLOT_PNT_BUF,
41          BMOP_OPSLOT_PNT_BUF},
42         triangulate_exec,
43         BMOP_TRIANG_TOTSLOT,
44         0
45 };
46
47 BMOpDefine def_subdop = {
48         {BMOP_OPSLOT_PNT_BUF,
49          BMOP_OPSLOT_INT,
50          BMOP_OPSLOT_INT,
51          BMOP_OPSLOT_FLT,
52          BMOP_OPSLOT_MAPPING,
53          BMOP_OPSLOT_MAPPING,
54          BMOP_OPSLOT_PNT_BUF,
55          BMOP_OPSLOT_PNT_BUF,
56          },
57         esubdivide_exec,
58         BMOP_ESUBDIVIDE_TOTSLOT,
59         0
60 };
61
62 BMOpDefine def_edit2bmesh = {
63         {BMOP_OPSLOT_PNT},
64         edit2bmesh_exec,
65         BMOP_TO_EDITMESH_TOTSLOT,
66         0
67 };
68
69 BMOpDefine def_bmesh2edit = {
70         {BMOP_OPSLOT_PNT},
71         bmesh2edit_exec,
72         BMOP_FROM_EDITMESH_TOTSLOT,
73         0
74 };
75
76 BMOpDefine def_delop = {
77         {BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_INT},
78         delop_exec,
79         BMOP_DEL_TOTSLOT,
80         0
81 };
82
83 BMOpDefine def_dupeop = {
84         {BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_PNT_BUF,
85          BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_MAPPING},
86         dupeop_exec,
87         BMOP_DUPE_TOTSLOT,
88         0
89 };
90
91 BMOpDefine def_splitop = {
92         {BMOP_OPSLOT_PNT_BUF,
93          BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_MAPPING},
94         splitop_exec,
95         BMOP_SPLIT_TOTSLOT,
96         0
97 };
98
99 BMOpDefine *opdefines[] = {
100         &def_splitop,
101         &def_dupeop,
102         &def_delop,
103         &def_edit2bmesh,
104         &def_bmesh2edit,
105         &def_subdop,
106         &def_triangop,
107         &def_dissolvefacesop,
108         &def_dissolvevertsop,
109         &def_makefgonsop,
110         &def_extrudefaceregion,
111 };
112
113 int bmesh_total_ops = (sizeof(opdefines) / sizeof(void*));