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:
authorJoshua Leung <aligorith@gmail.com>2009-08-30 17:32:08 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-30 17:32:08 +0400
commit7df39b5ea2bd8bfd0c5a2a08aa2c52d051aa5fd5 (patch)
tree8436bb3fe595e2235836aee4fdbad329a4bfe428 /source/blender/editors/space_view3d
parentd4d520c9a2312e1b03872f92b1e9be1150d167d5 (diff)
Grease Pencil: Basic Support for Image Editor Again
* Grease Pencil works again from Image Editor now. For now, the GPencil datablock is linked to the Image Editor space, but this can be changed if need be. * Made Grease Pencil hotkeys into a separate Grease Pencil keymap, which can get included automagically like for frames/ui/v2d/etc. by supplying ED_KEYMAP_GPENCIL as part of st->keymapflag * Temporarily restored the nasty hack to make View2D-aligned sketches in Image Editor to use OpenGL lines only. I still dunno why this doesn't work normally. (Probably related is that strokes are not visible when there's no image visible atm).
Diffstat (limited to 'source/blender/editors/space_view3d')
-rw-r--r--source/blender/editors/space_view3d/space_view3d.c2
-rw-r--r--source/blender/editors/space_view3d/view3d_ops.c4
2 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c
index 3dd65a6f796..97c5549e1ea 100644
--- a/source/blender/editors/space_view3d/space_view3d.c
+++ b/source/blender/editors/space_view3d/space_view3d.c
@@ -871,7 +871,7 @@ void ED_spacetype_view3d(void)
/* regions: main window */
art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
art->regionid = RGN_TYPE_WINDOW;
- art->keymapflag= ED_KEYMAP_FRAMES;
+ art->keymapflag= ED_KEYMAP_FRAMES|ED_KEYMAP_GPENCIL;
art->draw= view3d_main_area_draw;
art->init= view3d_main_area_init;
art->free= view3d_main_area_free;
diff --git a/source/blender/editors/space_view3d/view3d_ops.c b/source/blender/editors/space_view3d/view3d_ops.c
index f4e1e008099..7da2e591b10 100644
--- a/source/blender/editors/space_view3d/view3d_ops.c
+++ b/source/blender/editors/space_view3d/view3d_ops.c
@@ -52,7 +52,6 @@
#include "WM_api.h"
#include "WM_types.h"
-#include "ED_gpencil.h"
#include "ED_screen.h"
#include "ED_transform.h"
@@ -133,9 +132,6 @@ void view3d_keymap(wmWindowManager *wm)
km = WM_keymap_add_item(keymap, "SKETCH_OT_draw_preview", MOUSEMOVE, KM_ANY, KM_CTRL, 0);
RNA_boolean_set(km->ptr, "snap", 1);
- /* grease pencil */
- gpencil_common_keymap(wm, keymap);
-
WM_keymap_verify_item(keymap, "VIEW3D_OT_manipulator", LEFTMOUSE, KM_PRESS, 0, 0); /* manipulator always on left mouse, not on action mouse*/
WM_keymap_verify_item(keymap, "VIEW3D_OT_cursor3d", ACTIONMOUSE, KM_PRESS, 0, 0);