diff options
Diffstat (limited to 'source/blender/include')
-rw-r--r-- | source/blender/include/BDR_drawobject.h | 3 | ||||
-rw-r--r-- | source/blender/include/BDR_editcurve.h | 2 | ||||
-rw-r--r-- | source/blender/include/BIF_editmesh.h | 24 | ||||
-rw-r--r-- | source/blender/include/BIF_editmode_undo.h | 55 | ||||
-rw-r--r-- | source/blender/include/BIF_resources.h | 14 | ||||
-rw-r--r-- | source/blender/include/blendef.h | 11 | ||||
-rw-r--r-- | source/blender/include/editmesh.h | 11 |
7 files changed, 97 insertions, 23 deletions
diff --git a/source/blender/include/BDR_drawobject.h b/source/blender/include/BDR_drawobject.h index 9733cb71a20..6cdcefd23ce 100644 --- a/source/blender/include/BDR_drawobject.h +++ b/source/blender/include/BDR_drawobject.h @@ -49,12 +49,13 @@ void init_draw_rects(void); void helpline(float *vec); void drawaxes(float size); void drawcamera(struct Object *ob); + +void calc_mesh_facedots_ext(void); void calc_lattverts_ext(void); void calc_meshverts(void); void calc_meshverts_ext(void); void calc_meshverts_ext_f2(void); void calc_nurbverts_ext(void); -void tekenvertices(short sel); void drawcircball(float *cent, float rad, float tmat[][4]); void get_local_bounds(struct Object *ob, float *centre, float *size); void draw_object(struct Base *base); diff --git a/source/blender/include/BDR_editcurve.h b/source/blender/include/BDR_editcurve.h index 839bf4c6802..18f2c1f9984 100644 --- a/source/blender/include/BDR_editcurve.h +++ b/source/blender/include/BDR_editcurve.h @@ -93,8 +93,6 @@ int bezt_compare (const void *e1, const void *e2); void curve_changes_other_objects(struct Object *ob); extern void undo_push_curve(char *name); -extern void undo_clear_curve(void); - #endif /* BDR_EDITCURVE_H */ diff --git a/source/blender/include/BIF_editmesh.h b/source/blender/include/BIF_editmesh.h index a40c09f4bfe..fe11e0b684e 100644 --- a/source/blender/include/BIF_editmesh.h +++ b/source/blender/include/BIF_editmesh.h @@ -35,6 +35,7 @@ #ifndef BIF_EDITMESH_H #define BIF_EDITMESH_H +struct EditMesh; struct EditFace; struct EditEdge; struct EditVert; @@ -45,16 +46,11 @@ struct View3D; /* ******************* editmesh.c */ extern void make_editMesh(void); extern void load_editMesh(void); -extern void free_editMesh(void); +extern void free_editMesh(struct EditMesh *); extern void remake_editMesh(void); /* Editmesh Undo code */ -void undo_free_mesh(struct Mesh *me); -void undo_push_mesh(char *name); -void undo_pop_mesh(int steps); -void undo_redo_mesh(void); -void undo_clear_mesh(void); -void undo_menu_mesh(void); +extern void undo_push_mesh(char *name); extern void separatemenu(void); extern void separate_mesh(void); @@ -67,6 +63,20 @@ extern void addvert_mesh(void); extern void addedgeface_mesh(void); /* ******************* editmesh_lib.c */ + +extern void EM_set_flag_all(int flag); +extern void EM_clear_flag_all(int flag); + +extern void EM_select_face(struct EditFace *efa, int sel); +extern void EM_select_edge(struct EditEdge *eed, int sel); + +extern void EM_select_flush(void); // vertices to edges/faces (exception!) +extern void EM_selectmode_set(void); // when mode changes +extern void EM_selectmode_flush(void); // when selection changes + +extern int EM_nfaces_selected(void); +extern int EM_nvertices_selected(void); + extern int faceselectedAND(struct EditFace *efa, int flag); extern void recalc_editnormals(void); extern void flip_editnormals(void); diff --git a/source/blender/include/BIF_editmode_undo.h b/source/blender/include/BIF_editmode_undo.h new file mode 100644 index 00000000000..f0f95fb3e77 --- /dev/null +++ b/source/blender/include/BIF_editmode_undo.h @@ -0,0 +1,55 @@ +/** + * $Id: + * + * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. The Blender + * Foundation also sells licenses for use in proprietary software under + * the Blender License. See http://www.blender.org/BL/ for information + * about this. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. + * All rights reserved. + * + * The Original Code is: all of this file. + * + * Contributor(s): none yet. + * + * ***** END GPL/BL DUAL LICENSE BLOCK ***** + */ + + +#ifndef BIF_EDITMODE_UNDO_H +#define BIF_EDITMODE_UNDO_H + +// Add this in your local code: + +extern void undo_editmode_push(char *name, + void (*freedata)(void *), // pointer to function freeing data + void (*to_editmode)(void *), // data to editmode conversion + void *(*from_editmode)(void)); // editmode to data conversion + + +// Further exported for UI is: + +struct uiBlock; + +extern void undo_editmode_step(int step); // undo and redo +extern void undo_editmode_clear(void); // free & clear all data +extern void undo_editmode_menu(void); // history menu +extern struct uiBlock *editmode_undohistorymenu(void *arg_unused); + +#endif + diff --git a/source/blender/include/BIF_resources.h b/source/blender/include/BIF_resources.h index d5efcf85d80..7c2e8bffcc3 100644 --- a/source/blender/include/BIF_resources.h +++ b/source/blender/include/BIF_resources.h @@ -161,9 +161,9 @@ typedef enum { ICON_GHOST, ICON_SHARPCURVE, ICON_SMOOTHCURVE, - ICON_BLANK23, - ICON_BLANK24, - ICON_BLANK25, + ICON_VERTEXSEL, + ICON_EDGESEL, + ICON_FACESEL, ICON_BLANK26, ICON_BPIBFOLDER_X, ICON_BPIBFOLDERGREY, @@ -328,6 +328,7 @@ typedef enum { } BIFColorID; +/* XXX WARNING: this is saved in file, so do not change order! */ enum { TH_AUTO, /* for buttons, to signal automatic color assignment */ @@ -381,8 +382,13 @@ enum { TH_EDGE_FACESEL, TH_FACE, TH_FACE_SELECT, - TH_NORMAL + TH_NORMAL, + TH_FACE_DOT, + TH_FACEDOT_SIZE, + }; +/* XXX WARNING: previous is saved in file, so do not change order! */ + /* specific defines per space should have higher define values */ diff --git a/source/blender/include/blendef.h b/source/blender/include/blendef.h index 0528a1914b8..ba62238bb17 100644 --- a/source/blender/include/blendef.h +++ b/source/blender/include/blendef.h @@ -232,22 +232,25 @@ #define B_AUTOKEY 139 #define B_SCENELOCK 140 #define B_LOCALVIEW 141 -#define B_U_CAPSLOCK 142 +#define B_U_CAPSLOCK 142 #define B_EDITMODE 143 #define B_VPAINT 144 #define B_FACESEL 145 #define B_VIEWBUT 146 #define B_PERSP 147 #define B_PROPTOOL 148 -#define B_VIEWRENDER 149 +#define B_VIEWRENDER 149 #define B_VIEWTRANS 150 #define B_VIEWZOOM 151 #define B_STARTGAME 152 #define B_POSEMODE 153 -#define B_TEXTUREPAINT 154 +#define B_TEXTUREPAINT 154 #define B_WPAINT 155 -#define B_MODESELECT 156 +#define B_MODESELECT 156 #define B_AROUND 157 +#define B_SEL_VERT 158 +#define B_SEL_EDGE 159 +#define B_SEL_FACE 160 /* IPO: 200 */ #define B_IPOHOME 201 diff --git a/source/blender/include/editmesh.h b/source/blender/include/editmesh.h index d7cd45948c4..bb69b033cb7 100644 --- a/source/blender/include/editmesh.h +++ b/source/blender/include/editmesh.h @@ -58,12 +58,9 @@ extern struct EditFace *addfacelist(struct EditVert *v1, struct EditVert *v2, st extern struct EditEdge *findedgelist(struct EditVert *v1, struct EditVert *v2); /* ******************* editmesh_add.c */ -extern void adduplicateflag(int flag); /* ******************* editmesh_lib.c */ -extern int editmesh_nfaces_selected(void); -extern int editmesh_nvertices_selected(void); extern int faceselectedOR(EditFace *efa, int flag); extern int faceselectedAND(EditFace *efa, int flag); @@ -72,15 +69,19 @@ extern int exist_face(EditVert *v1, EditVert *v2, EditVert *v3, EditVert *v4); extern void flipface(EditFace *efa); // flips for normal direction extern int compareface(EditFace *vl1, EditFace *vl2); +extern short extrudeflag_vert(short flag); +extern short extrudeflag(short flag); + +extern void adduplicateflag(int flag); extern void delfaceflag(int flag); -extern short extrudeflag(short flag,short type); + extern void rotateflag(short flag, float *cent, float rotmat[][3]); extern void translateflag(short flag, float *vec); extern float convex(float *v1, float *v2, float *v3, float *v4); /* ******************* editmesh_mods.c */ -extern EditEdge *findnearestedge(); +extern EditEdge *findnearestedge(short *dist); /* ******************* editmesh_tools.c */ |