2011-02-21 07:25:24 +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
|
|
|
* ***** 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
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
|
|
|
*
|
|
|
|
|
* The Original Code is Copyright (C) 2008 Blender Foundation.
|
|
|
|
|
* All rights reserved.
|
|
|
|
|
*
|
|
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
2011-02-21 07:25:24 +00:00
|
|
|
|
|
|
|
|
/** \file ED_util.h
|
|
|
|
|
* \ingroup editors
|
|
|
|
|
*/
|
|
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#ifndef __ED_UTIL_H__
|
|
|
|
|
#define __ED_UTIL_H__
|
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
|
|
|
|
2011-02-12 17:51:02 +00:00
|
|
|
struct Scene;
|
2008-12-30 19:01:12 +00:00
|
|
|
struct Object;
|
|
|
|
|
struct bContext;
|
2.5: UI & Menus
* Cleaned up UI_interface.h a bit, and added some comments to
organize things a bit and indicate what should be used when.
* uiMenu* functions can now be used to create menus for headers
too, this is done with a uiDefMenuBut, which takes a pointer
to a uiMenuCreateFunc, that will then call uiMenu* functions.
* Renamed uiMenuBegin/End to uiPupMenuBegin/End, as these are
specific to making popup menus. Will convert the other
conformation popup menu functions to use this too so we can
remove some code.
* Extended uiMenu functions, now there is is also:
BooleanO, FloatO, BooleanR, EnumR, LevelEnumR, Separator.
* Converted image window headers to use uiMenu functions, simplifies
menu code further here. Did not remove the uiDefMenu functions as
they are used in sequencer/view3d in some places now (will fix).
* Also tried to simplify and fix bounds computation a bit better
for popup menus. It tried to find out in advance what the size
of the menu was but this is difficult with keymap strings in
there, now uiPopupBoundsBlock can figure this out afterwards and
ensure the popup is within the window bounds. Will convert some
other functions to use this too.
2009-01-30 12:18:08 +00:00
|
|
|
struct ARegion;
|
2008-12-30 19:01:12 +00:00
|
|
|
struct uiBlock;
|
2009-01-31 19:40:40 +00:00
|
|
|
struct wmOperator;
|
2008-12-31 18:52:15 +00:00
|
|
|
struct wmOperatorType;
|
2011-04-15 01:19:13 +00:00
|
|
|
struct BMEditMesh;
|
2011-02-12 17:51:02 +00:00
|
|
|
struct Mesh;
|
2008-12-30 19:01:12 +00:00
|
|
|
|
2008-12-31 17:11:42 +00:00
|
|
|
/* ed_util.c */
|
|
|
|
|
|
2012-05-12 20:39:39 +00:00
|
|
|
void ED_editors_init(struct bContext *C);
|
|
|
|
|
void ED_editors_exit(struct bContext *C);
|
2008-12-31 17:11:42 +00:00
|
|
|
|
2014-01-20 14:19:49 +01:00
|
|
|
void ED_editors_flush_edits(const struct bContext *C, bool for_render);
|
2014-01-20 14:11:12 +01:00
|
|
|
|
2008-12-30 19:01:12 +00:00
|
|
|
/* ************** Undo ************************ */
|
|
|
|
|
|
|
|
|
|
/* undo.c */
|
2012-05-12 20:39:39 +00:00
|
|
|
void ED_undo_push(struct bContext *C, const char *str);
|
|
|
|
|
void ED_undo_push_op(struct bContext *C, struct wmOperator *op);
|
|
|
|
|
void ED_undo_pop_op(struct bContext *C, struct wmOperator *op);
|
|
|
|
|
void ED_undo_pop(struct bContext *C);
|
|
|
|
|
void ED_undo_redo(struct bContext *C);
|
|
|
|
|
void ED_OT_undo(struct wmOperatorType *ot);
|
|
|
|
|
void ED_OT_undo_push(struct wmOperatorType *ot);
|
|
|
|
|
void ED_OT_redo(struct wmOperatorType *ot);
|
|
|
|
|
void ED_OT_undo_history(struct wmOperatorType *ot);
|
|
|
|
|
|
|
|
|
|
int ED_undo_operator_repeat(struct bContext *C, struct wmOperator *op);
|
|
|
|
|
/* convenience since UI callbacks use this mostly*/
|
|
|
|
|
void ED_undo_operator_repeat_cb(struct bContext *C, void *arg_op, void *arg_unused);
|
|
|
|
|
void ED_undo_operator_repeat_cb_evt(struct bContext *C, void *arg_op, int arg_unused);
|
|
|
|
|
|
|
|
|
|
int ED_undo_valid(const struct bContext *C, const char *undoname);
|
2011-01-12 18:00:23 +00:00
|
|
|
|
2008-12-30 19:01:12 +00:00
|
|
|
/* undo_editmode.c */
|
2010-11-17 09:45:45 +00:00
|
|
|
void undo_editmode_push(struct bContext *C, const char *name,
|
2012-05-12 20:39:39 +00:00
|
|
|
void * (*getdata)(struct bContext *C),
|
|
|
|
|
void (*freedata)(void *),
|
|
|
|
|
void (*to_editmode)(void *, void *, void *),
|
|
|
|
|
void *(*from_editmode)(void *, void *),
|
|
|
|
|
int (*validate_undo)(void *, void *));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void undo_editmode_clear(void);
|
2008-12-30 19:01:12 +00:00
|
|
|
|
2011-02-12 17:51:02 +00:00
|
|
|
/* crazyspace.c */
|
2013-09-15 11:38:48 +00:00
|
|
|
float (*crazyspace_get_mapped_editverts(struct Scene *scene, struct Object *obedit))[3];
|
|
|
|
|
void crazyspace_set_quats_editmesh(struct BMEditMesh *em, float (*origcos)[3], float (*mappedcos)[3], float (*quats)[4]);
|
2013-09-15 08:05:27 +00:00
|
|
|
void crazyspace_set_quats_mesh(struct Mesh *me, float (*origcos)[3], float (*mappedcos)[3], float (*quats)[4]);
|
2011-02-12 17:51:02 +00:00
|
|
|
int sculpt_get_first_deform_matrices(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]);
|
|
|
|
|
void crazyspace_build_sculpt(struct Scene *scene, struct Object *ob, float (**deformmats)[3][3], float (**deformcos)[3]);
|
|
|
|
|
|
2012-09-15 01:52:28 +00:00
|
|
|
/* cut-paste buffer free */
|
|
|
|
|
void ED_clipboard_posebuf_free(void);
|
2008-12-30 19:01:12 +00:00
|
|
|
|
2008-12-10 17:58:18 +00:00
|
|
|
/* ************** XXX OLD CRUFT WARNING ************* */
|
|
|
|
|
|
2008-12-19 19:11:02 +00:00
|
|
|
void apply_keyb_grid(int shift, int ctrl, float *val, float fac1, float fac2, float fac3, int invert);
|
2008-12-10 17:58:18 +00:00
|
|
|
|
2011-01-26 14:18:16 +00:00
|
|
|
/* where else to go ? */
|
|
|
|
|
void unpack_menu(struct bContext *C, const char *opname, const char *id_name, const char *abs_name, const char *folder, struct PackedFile *pf);
|
2008-12-10 17:58:18 +00:00
|
|
|
|
2012-02-17 18:59:41 +00:00
|
|
|
#endif /* __ED_UTIL_H__ */
|
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
|
|
|
|