merge with 2.5 at r18796. note I've customized the
[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         esubdivide_exec,
43         BMOP_ESUBDIVIDE_TOTSLOT,
44         0
45 };
46
47 BMOpDefine def_edit2bmesh = {
48         {BMOP_OPSLOT_PNT},
49         edit2bmesh_exec,
50         BMOP_TO_EDITMESH_TOTSLOT,
51         0
52 };
53
54 BMOpDefine def_bmesh2edit = {
55         {BMOP_OPSLOT_PNT},
56         bmesh2edit_exec,
57         BMOP_FROM_EDITMESH_TOTSLOT,
58         0
59 };
60
61 BMOpDefine def_delop = {
62         {BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_INT},
63         delop_exec,
64         BMOP_DEL_TOTSLOT,
65         0
66 };
67
68 BMOpDefine def_dupeop = {
69         {BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_PNT_BUF},
70         dupeop_exec,
71         BMOP_DUPE_TOTSLOT,
72         0
73 };
74
75 BMOpDefine def_splitop = {
76         {BMOP_OPSLOT_PNT_BUF, BMOP_OPSLOT_PNT_BUF},
77         splitop_exec,
78         BMOP_SPLIT_TOTSLOT,
79         0
80 };
81
82 BMOpDefine *opdefines[] = {
83         &def_splitop,
84         &def_dupeop,
85         &def_delop,
86         &def_edit2bmesh,
87         &def_bmesh2edit,
88         &def_subdop,
89         &def_triangop,
90         &def_dissolvefacesop,
91         &def_dissolvevertsop,
92         &def_makefgonsop,
93 };
94
95 int bmesh_total_ops = (sizeof(opdefines) / sizeof(void*));