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