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