Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-08 22:40:03 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-10-08 22:40:03 +0400
commit3ebd58673fb9a8c5ef13048b2e8e8a4cb7bb3a4e (patch)
tree81031f2772990c6292eafce955d09897a8e40d6f /source/blender/editors/include
parente0c5e484732bb344fb845acc2678777e4bff1d5c (diff)
Key Configuration
Keymaps are now saveable and configurable from the user preferences, note that editing one item in a keymap means the whole keymap is now defined by the user and will not be updated by Blender, an option for syncing might be added later. The outliner interface is still there, but I will probably remove it. There's actually 3 levels now: * Default builtin key configuration. * Key configuration loaded from .py file, for configs like Blender 2.4x or other 3D applications. * Keymaps edited by the user and saved in .B.blend. These can be saved to .py files as well to make creating distributable configurations easier. Also, user preferences sections were reorganized a bit, now there is: Interface, Editing, Input, Files and System. Implementation notes: * wmKeyConfig was added which represents a key configuration containing keymaps. * wmKeymapItem was renamed to wmKeyMapItem for consistency with wmKeyMap. * Modal maps are not wrapped yet. * User preferences DNA file reading did not support newdataadr() yet, added this now for reading keymaps. * Key configuration related settings are now RNA wrapped. * is_property_set and is_property_hidden python methods were added.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/ED_anim_api.h6
-rw-r--r--source/blender/editors/include/ED_armature.h4
-rw-r--r--source/blender/editors/include/ED_curve.h4
-rw-r--r--source/blender/editors/include/ED_gpencil.h4
-rw-r--r--source/blender/editors/include/ED_markers.h4
-rw-r--r--source/blender/editors/include/ED_mball.h4
-rw-r--r--source/blender/editors/include/ED_mesh.h5
-rw-r--r--source/blender/editors/include/ED_object.h4
-rw-r--r--source/blender/editors/include/ED_particle.h2
-rw-r--r--source/blender/editors/include/ED_physics.h4
-rw-r--r--source/blender/editors/include/ED_screen.h5
-rw-r--r--source/blender/editors/include/ED_sculpt.h4
-rw-r--r--source/blender/editors/include/ED_transform.h3
-rw-r--r--source/blender/editors/include/ED_uvedit.h4
-rw-r--r--source/blender/editors/include/UI_interface.h3
-rw-r--r--source/blender/editors/include/UI_view2d.h4
16 files changed, 36 insertions, 28 deletions
diff --git a/source/blender/editors/include/ED_anim_api.h b/source/blender/editors/include/ED_anim_api.h
index d9439956569..97f4dd915e4 100644
--- a/source/blender/editors/include/ED_anim_api.h
+++ b/source/blender/editors/include/ED_anim_api.h
@@ -34,7 +34,7 @@ struct ListBase;
struct AnimData;
struct bContext;
-struct wmWindowManager;
+struct wmKeyConfig;
struct ScrArea;
struct ARegion;
struct View2D;
@@ -487,11 +487,11 @@ void ANIM_pose_to_action_sync(struct Object *ob, struct ScrArea *sa);
/* generic animation channels */
void ED_operatortypes_animchannels(void);
-void ED_keymap_animchannels(struct wmWindowManager *wm);
+void ED_keymap_animchannels(struct wmKeyConfig *keyconf);
/* generic time editing */
void ED_operatortypes_anim(void);
-void ED_keymap_anim(struct wmWindowManager *wm);
+void ED_keymap_anim(struct wmKeyConfig *keyconf);
/* ************************************************ */
diff --git a/source/blender/editors/include/ED_armature.h b/source/blender/editors/include/ED_armature.h
index 8bdfe41ef80..6479030bcd1 100644
--- a/source/blender/editors/include/ED_armature.h
+++ b/source/blender/editors/include/ED_armature.h
@@ -35,7 +35,7 @@ struct Bone;
struct bArmature;
struct bPoseChannel;
struct wmOperator;
-struct wmWindowManager;
+struct wmKeyConfig;
struct ListBase;
struct View3D;
struct ViewContext;
@@ -92,7 +92,7 @@ typedef struct EditBone
/* armature_ops.c */
void ED_operatortypes_armature(void);
-void ED_keymap_armature(struct wmWindowManager *wm);
+void ED_keymap_armature(struct wmKeyConfig *keyconf);
/* editarmature.c */
void ED_armature_from_edit(struct Object *obedit);
diff --git a/source/blender/editors/include/ED_curve.h b/source/blender/editors/include/ED_curve.h
index 4149c6a9cca..fea684971b2 100644
--- a/source/blender/editors/include/ED_curve.h
+++ b/source/blender/editors/include/ED_curve.h
@@ -36,11 +36,11 @@ struct Scene;
struct Text;
struct View3D;
struct wmOperator;
-struct wmWindowManager;
+struct wmKeyConfig;
/* curve_ops.c */
void ED_operatortypes_curve(void);
-void ED_keymap_curve (struct wmWindowManager *wm);
+void ED_keymap_curve (struct wmKeyConfig *keyconf);
/* editcurve.c */
void undo_push_curve (struct bContext *C, char *name);
diff --git a/source/blender/editors/include/ED_gpencil.h b/source/blender/editors/include/ED_gpencil.h
index 388da9a2acc..ff95f8ce6eb 100644
--- a/source/blender/editors/include/ED_gpencil.h
+++ b/source/blender/editors/include/ED_gpencil.h
@@ -41,7 +41,7 @@ struct bGPDframe;
struct PointerRNA;
struct Panel;
struct ImBuf;
-struct wmWindowManager;
+struct wmKeyConfig;
/* ------------- Grease-Pencil Helpers ---------------- */
@@ -62,7 +62,7 @@ struct bGPdata *gpencil_data_get_active(struct bContext *C);
/* ----------- Grease Pencil Operators ----------------- */
-void ED_keymap_gpencil(struct wmWindowManager *wm);
+void ED_keymap_gpencil(struct wmKeyConfig *keyconf);
void ED_operatortypes_gpencil(void);
/* ------------ Grease-Pencil Drawing API ------------------ */
diff --git a/source/blender/editors/include/ED_markers.h b/source/blender/editors/include/ED_markers.h
index 4b7a2954206..58ca85bb74c 100644
--- a/source/blender/editors/include/ED_markers.h
+++ b/source/blender/editors/include/ED_markers.h
@@ -28,7 +28,7 @@
#ifndef ED_MARKERS_H
#define ED_MARKERS_H
-struct wmWindowManager;
+struct wmKeyConfig;
struct bContext;
struct TimeMarker;
@@ -56,7 +56,7 @@ void ED_markers_make_cfra_list(ListBase *markers, ListBase *lb, short sel);
/* called in screen_ops.c:ED_operatortypes_screen() */
void ED_operatortypes_marker(void);
/* called in screen_ops.c:ED_keymap_screen() */
-void ED_marker_keymap(struct wmWindowManager *wm);
+void ED_marker_keymap(struct wmKeyConfig *keyconf);
#endif /* ED_MARKERS_H */
diff --git a/source/blender/editors/include/ED_mball.h b/source/blender/editors/include/ED_mball.h
index 49c1d856a27..6708a73e088 100644
--- a/source/blender/editors/include/ED_mball.h
+++ b/source/blender/editors/include/ED_mball.h
@@ -28,10 +28,10 @@
struct bContext;
struct Object;
-struct wmWindowManager;
+struct wmKeyConfig;
void ED_operatortypes_metaball(void);
-void ED_keymap_metaball(struct wmWindowManager *wm);
+void ED_keymap_metaball(struct wmKeyConfig *keyconf);
struct MetaElem *add_metaball_primitive(struct bContext *C, int type, int newname);
diff --git a/source/blender/editors/include/ED_mesh.h b/source/blender/editors/include/ED_mesh.h
index fd88f9889ae..cf0e6eb01c3 100644
--- a/source/blender/editors/include/ED_mesh.h
+++ b/source/blender/editors/include/ED_mesh.h
@@ -38,6 +38,7 @@ struct EditFace;
struct bContext;
struct wmOperator;
struct wmWindowManager;
+struct wmKeyConfig;
struct ReportList;
struct EditSelection;
struct ViewContext;
@@ -84,13 +85,13 @@ int join_mesh_exec(struct bContext *C, struct wmOperator *op);
/* mesh_ops.c */
void ED_operatortypes_mesh(void);
-void ED_keymap_mesh(struct wmWindowManager *wm);
+void ED_keymap_mesh(struct wmKeyConfig *keyconf);
/* editmesh.c */
void ED_spacetypes_init(void);
-void ED_keymap_mesh(struct wmWindowManager *wm);
+void ED_keymap_mesh(struct wmKeyConfig *keyconf);
void make_editMesh(struct Scene *scene, struct Object *ob);
void load_editMesh(struct Scene *scene, struct Object *ob);
diff --git a/source/blender/editors/include/ED_object.h b/source/blender/editors/include/ED_object.h
index 363795afeab..ec763fe3dfc 100644
--- a/source/blender/editors/include/ED_object.h
+++ b/source/blender/editors/include/ED_object.h
@@ -28,7 +28,7 @@
#ifndef ED_OBJECT_H
#define ED_OBJECT_H
-struct wmWindowManager;
+struct wmKeyConfig;
struct Scene;
struct Object;
struct bContext;
@@ -44,7 +44,7 @@ struct ModifierData;
/* object_edit.c */
void ED_operatortypes_object(void);
-void ED_keymap_object(struct wmWindowManager *wm);
+void ED_keymap_object(struct wmKeyConfig *keyconf);
/* send your own notifier for select! */
void ED_base_object_select(struct Base *base, short mode);
diff --git a/source/blender/editors/include/ED_particle.h b/source/blender/editors/include/ED_particle.h
index a052142102d..3d7fc5ea15b 100644
--- a/source/blender/editors/include/ED_particle.h
+++ b/source/blender/editors/include/ED_particle.h
@@ -36,7 +36,7 @@ struct ParticleEditSettings;
struct ParticleSystem;
struct RadialControl;
struct rcti;
-struct wmWindowManager;
+struct wmKeyConfig;
struct PTCacheEdit;
struct Scene;
diff --git a/source/blender/editors/include/ED_physics.h b/source/blender/editors/include/ED_physics.h
index ee340c54e7d..df303d7c9f1 100644
--- a/source/blender/editors/include/ED_physics.h
+++ b/source/blender/editors/include/ED_physics.h
@@ -30,9 +30,11 @@
#ifndef ED_PHYSICS_H
#define ED_PHYSICS_H
+struct wmKeyConfig;
+
/* operators */
void ED_operatortypes_physics(void);
-void ED_keymap_physics(struct wmWindowManager *wm);
+void ED_keymap_physics(struct wmKeyConfig *keyconf);
#endif /* ED_PHYSICS_H */
diff --git a/source/blender/editors/include/ED_screen.h b/source/blender/editors/include/ED_screen.h
index 63b6a067389..18c86306e44 100644
--- a/source/blender/editors/include/ED_screen.h
+++ b/source/blender/editors/include/ED_screen.h
@@ -37,6 +37,7 @@ struct wmWindowManager;
struct wmWindow;
struct wmNotifier;
struct wmEvent;
+struct wmKeyConfig;
struct bContext;
struct SpaceType;
struct Scene;
@@ -63,7 +64,7 @@ void region_scissor_winrct(struct ARegion *ar, struct rcti *winrct);
/* spaces */
void ED_spacetypes_init(void);
-void ED_spacetypes_keymap(struct wmWindowManager *wm);
+void ED_spacetypes_keymap(struct wmKeyConfig *keyconf);
int ED_area_header_switchbutton(const struct bContext *C, struct uiBlock *block, int yco);
int ED_area_header_standardbuttons(const struct bContext *C, struct uiBlock *block, int yco);
void ED_area_overdraw(struct bContext *C);
@@ -107,7 +108,7 @@ void ED_screen_new_window(struct bContext *C, struct rcti *position, int type);
void ED_update_for_newframe(const struct bContext *C, int mute);
void ED_operatortypes_screen(void);
-void ED_keymap_screen(struct wmWindowManager *wm);
+void ED_keymap_screen(struct wmKeyConfig *keyconf);
/* operators; context poll callbacks */
int ED_operator_screenactive(struct bContext *C);
diff --git a/source/blender/editors/include/ED_sculpt.h b/source/blender/editors/include/ED_sculpt.h
index a08f0576f42..764efb4ef0c 100644
--- a/source/blender/editors/include/ED_sculpt.h
+++ b/source/blender/editors/include/ED_sculpt.h
@@ -29,14 +29,14 @@
#define ED_SCULPT_H
struct bContext;
-struct wmWindowManager;
+struct wmKeyConfig;
/* sculpt.c */
void ED_operatortypes_sculpt(void);
/* paint_ops.c */
void ED_operatortypes_paint(void);
-void ED_keymap_paint(struct wmWindowManager *wm);
+void ED_keymap_paint(struct wmKeyConfig *keyconf);
/* paint_image.c */
void undo_imagepaint_step(int step);
diff --git a/source/blender/editors/include/ED_transform.h b/source/blender/editors/include/ED_transform.h
index 7f08e95aceb..a7ffefba8df 100644
--- a/source/blender/editors/include/ED_transform.h
+++ b/source/blender/editors/include/ED_transform.h
@@ -42,8 +42,9 @@ struct uiLayout;
struct EnumPropertyItem;
struct wmOperatorType;
struct wmKeyMap;
+struct wmKeyConfig;
-void transform_keymap_for_space(struct wmWindowManager *wm, struct wmKeyMap *keymap, int spaceid);
+void transform_keymap_for_space(struct wmKeyConfig *keyconf, struct wmKeyMap *keymap, int spaceid);
void transform_operatortypes(void);
/* ******************** Macros & Prototypes *********************** */
diff --git a/source/blender/editors/include/ED_uvedit.h b/source/blender/editors/include/ED_uvedit.h
index 74a9be75db6..8823437cf79 100644
--- a/source/blender/editors/include/ED_uvedit.h
+++ b/source/blender/editors/include/ED_uvedit.h
@@ -34,11 +34,11 @@ struct Object;
struct MTFace;
struct EditFace;
struct Image;
-struct wmWindowManager;
+struct wmKeyConfig;
/* uvedit_ops.c */
void ED_operatortypes_uvedit(void);
-void ED_keymap_uvedit(struct wmWindowManager *wm);
+void ED_keymap_uvedit(struct wmKeyConfig *keyconf);
void ED_uvedit_assign_image(struct Scene *scene, struct Object *obedit, struct Image *ima, struct Image *previma);
void ED_uvedit_set_tile(struct bContext *C, struct Scene *scene, struct Object *obedit, struct Image *ima, int curtile, int dotile);
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 35598db9e02..3c6ed1137ae 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -147,6 +147,7 @@ typedef struct uiLayout uiLayout;
#define UI_BUT_INACTIVE (1<<23)
#define UI_BUT_LAST_ACTIVE (1<<24)
#define UI_BUT_UNDO (1<<25)
+#define UI_BUT_IMMEDIATE (1<<26)
#define UI_PANEL_WIDTH 340
#define UI_COMPACT_PANEL_WIDTH 160
@@ -572,6 +573,8 @@ void UI_exit(void);
#define UI_ITEM_R_SLIDER 4
#define UI_ITEM_R_TOGGLE 8
#define UI_ITEM_R_ICON_ONLY 16
+#define UI_ITEM_R_EVENT 32
+#define UI_ITEM_R_FULL_EVENT 64
uiLayout *uiBlockLayout(uiBlock *block, int dir, int type, int x, int y, int size, int em, struct uiStyle *style);
void uiBlockSetCurLayout(uiBlock *block, uiLayout *layout);
diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
index 38c4d82e6da..8fbff25589d 100644
--- a/source/blender/editors/include/UI_view2d.h
+++ b/source/blender/editors/include/UI_view2d.h
@@ -128,7 +128,7 @@ struct View2D;
struct View2DGrid;
struct View2DScrollers;
-struct wmWindowManager;
+struct wmKeyConfig;
struct bScreen;
struct ScrArea;
struct ARegion;
@@ -196,7 +196,7 @@ void UI_view2d_text_cache_draw(struct ARegion *ar);
/* operators */
void ui_view2d_operatortypes(void);
-void UI_view2d_keymap(struct wmWindowManager *wm);
+void UI_view2d_keymap(struct wmKeyConfig *keyconf);
#endif /* UI_VIEW2D_H */