2008-01-01 18:29:19 +00:00
|
|
|
/**
|
|
|
|
* $Id:
|
|
|
|
*
|
|
|
|
* ***** BEGIN GPL 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.
|
|
|
|
*
|
|
|
|
* 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) 2008 Blender Foundation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
*
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
*/
|
2.5: work on bringing back SpaceTime options
- RMB select, also with SHIFT
- RMB tweak for translate
- SHIFT+D dupli
- BKEY border select/deselect
- AKEY (de)select all
- XKEY delete
- GKEY grab
Added some XXX comments for future todos, especially for when other
spaces come back with time markers.
Also added ED_util for putting in all to-be-cleaned cruft
Context conflict: input methods for Markers can conflict with other
spacetypes. It was solved in pre-2.5 with manually tweaking it all over,
but I would prefer one keymap for all marker stuff. Needs some thinking...
could be solved with a boundbox check for bottom part of 2d window.
Tweak issue: both tweak styles are possible:
- Hold mouse button, move, operator ends on mouse release
- Hold mouse button, move, operator ends on mouse click
Problem is that modally handled operators use fixed keymaps... like ESC,
SPACE, ENTER, or press/release mousebutton for 'assign'. There's a lot
to say for making this all consistant, or become part of 1 general keymap?
Should also be possibe to define 'tweak' defaults for Tablet different
than for mouse...
2008-11-29 15:10:31 +00:00
|
|
|
#ifndef ED_MESH_H
|
|
|
|
#define ED_MESH_H
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2008-12-30 13:16:14 +00:00
|
|
|
struct View3D;
|
2008-12-30 16:03:29 +00:00
|
|
|
struct ARegion;
|
|
|
|
struct EditMesh;
|
2008-12-30 13:16:14 +00:00
|
|
|
|
|
|
|
// edge and face flag both
|
|
|
|
#define EM_FGON 2
|
|
|
|
// face flag
|
|
|
|
#define EM_FGON_DRAW 1
|
|
|
|
|
|
|
|
/* editbutflag */
|
|
|
|
#define B_CLOCKWISE 1
|
|
|
|
#define B_KEEPORIG 2
|
|
|
|
#define B_BEAUTY 4
|
|
|
|
#define B_SMOOTH 8
|
|
|
|
#define B_BEAUTY_SHORT 16
|
|
|
|
#define B_AUTOFGON 32
|
|
|
|
#define B_KNIFE 0x80
|
|
|
|
#define B_PERCENTSUBD 0x40
|
|
|
|
#define B_MESH_X_MIRROR 0x100
|
|
|
|
#define B_JOINTRIA_UV 0x200
|
|
|
|
#define B_JOINTRIA_VCOL 0X400
|
|
|
|
#define B_JOINTRIA_SHARP 0X800
|
|
|
|
#define B_JOINTRIA_MAT 0X1000
|
|
|
|
|
|
|
|
|
2008-12-30 16:03:29 +00:00
|
|
|
/* especially for derivedmesh drawing callbacks */
|
|
|
|
typedef struct ViewContext {
|
|
|
|
Scene *scene;
|
|
|
|
Object *obact;
|
|
|
|
Object *obedit;
|
|
|
|
struct ARegion *ar;
|
|
|
|
struct View3D *v3d;
|
|
|
|
struct EditMesh *em;
|
|
|
|
} ViewContext;
|
|
|
|
|
|
|
|
|
2008-12-30 13:16:14 +00:00
|
|
|
/* editmesh.c */
|
|
|
|
|
2008-12-30 16:03:29 +00:00
|
|
|
void EM_init_index_arrays(struct EditMesh *em, int forVert, int forEdge, int forFace);
|
2008-12-30 13:16:14 +00:00
|
|
|
void EM_free_index_arrays(void);
|
|
|
|
EditVert *EM_get_vert_for_index(int index);
|
|
|
|
EditEdge *EM_get_edge_for_index(int index);
|
|
|
|
EditFace *EM_get_face_for_index(int index);
|
2008-12-30 16:03:29 +00:00
|
|
|
int EM_texFaceCheck(struct EditMesh *em);
|
|
|
|
int EM_vertColorCheck(struct EditMesh *em);
|
2008-12-30 19:01:12 +00:00
|
|
|
void undo_push_mesh(char *name);
|
2008-12-30 13:16:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* editmesh_lib.c */
|
|
|
|
|
2008-12-30 16:03:29 +00:00
|
|
|
EditFace *EM_get_actFace(struct EditMesh *em, int sloppy);
|
2008-12-30 13:16:14 +00:00
|
|
|
|
|
|
|
void EM_select_edge(EditEdge *eed, int sel);
|
2008-12-30 16:03:29 +00:00
|
|
|
void EM_select_face_fgon(struct EditMesh *em, EditFace *efa, int val);
|
|
|
|
void EM_selectmode_flush(struct EditMesh *em);
|
|
|
|
void EM_deselect_flush(struct EditMesh *em);
|
2008-12-30 13:16:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* editmesh_mods.c */
|
|
|
|
extern unsigned int em_vertoffs, em_solidoffs, em_wireoffs;
|
|
|
|
|
|
|
|
int EM_check_backbuf(unsigned int index);
|
|
|
|
int EM_mask_init_backbuf_border(struct View3D *v3d, short mcords[][2], short tot, short xmin, short ymin, short xmax, short ymax);
|
|
|
|
void EM_free_backbuf(void);
|
|
|
|
int EM_init_backbuf_border(struct View3D *v3d, short xmin, short ymin, short xmax, short ymax);
|
|
|
|
int EM_init_backbuf_circle(struct View3D *v3d, short xs, short ys, short rads);
|
|
|
|
|
2008-01-01 18:29:19 +00:00
|
|
|
|
2.5: work on bringing back SpaceTime options
- RMB select, also with SHIFT
- RMB tweak for translate
- SHIFT+D dupli
- BKEY border select/deselect
- AKEY (de)select all
- XKEY delete
- GKEY grab
Added some XXX comments for future todos, especially for when other
spaces come back with time markers.
Also added ED_util for putting in all to-be-cleaned cruft
Context conflict: input methods for Markers can conflict with other
spacetypes. It was solved in pre-2.5 with manually tweaking it all over,
but I would prefer one keymap for all marker stuff. Needs some thinking...
could be solved with a boundbox check for bottom part of 2d window.
Tweak issue: both tweak styles are possible:
- Hold mouse button, move, operator ends on mouse release
- Hold mouse button, move, operator ends on mouse click
Problem is that modally handled operators use fixed keymaps... like ESC,
SPACE, ENTER, or press/release mousebutton for 'assign'. There's a lot
to say for making this all consistant, or become part of 1 general keymap?
Should also be possibe to define 'tweak' defaults for Tablet different
than for mouse...
2008-11-29 15:10:31 +00:00
|
|
|
#endif /* ED_MESH_H */
|
2008-01-01 18:29:19 +00:00
|
|
|
|