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
|
|
|
|
2008-12-30 19:01:12 +00:00
|
|
|
struct bContext;
|
2016-02-18 19:32:33 +11:00
|
|
|
struct SpaceLink;
|
2009-01-31 19:40:40 +00:00
|
|
|
struct wmOperator;
|
2008-12-31 18:52:15 +00:00
|
|
|
struct wmOperatorType;
|
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-10-10 11:48:48 +02:00
|
|
|
bool ED_editors_flush_edits(const struct bContext *C, bool for_render);
|
2014-01-20 14:11:12 +01:00
|
|
|
|
2015-05-04 15:07:24 +10:00
|
|
|
void ED_spacedata_id_unref(struct SpaceLink *sl, const struct ID *id);
|
|
|
|
|
|
2015-12-03 20:18:32 +11:00
|
|
|
void ED_OT_flush_edits(struct wmOperatorType *ot);
|
|
|
|
|
|
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);
|
|
|
|
|
|
2015-04-18 15:41:12 +02:00
|
|
|
bool ED_undo_is_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
|
|
|
|
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
|
|
|
|