diff options
Diffstat (limited to 'source/blender/editors/space_image/space_image.c')
-rw-r--r-- | source/blender/editors/space_image/space_image.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/source/blender/editors/space_image/space_image.c b/source/blender/editors/space_image/space_image.c index 193a10ffa3c..1434be0e95d 100644 --- a/source/blender/editors/space_image/space_image.c +++ b/source/blender/editors/space_image/space_image.c @@ -115,11 +115,12 @@ static SpaceLink *image_new(const bContext *C) simage= MEM_callocN(sizeof(SpaceImage), "initimage"); simage->spacetype= SPACE_IMAGE; simage->zoom= 1; + simage->lock= 1; simage->iuser.ok= 1; simage->iuser.fie_ima= 2; simage->iuser.frames= 100; - + /* header */ ar= MEM_callocN(sizeof(ARegion), "header for image"); @@ -234,11 +235,7 @@ void image_keymap(struct wmKeyConfig *keyconf) RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD4, KM_PRESS, 0, 0)->ptr, "ratio", 0.25f); RNA_float_set(WM_keymap_add_item(keymap, "IMAGE_OT_view_zoom_ratio", PAD8, KM_PRESS, 0, 0)->ptr, "ratio", 0.125f); - WM_keymap_add_item(keymap, "PAINT_OT_image_paint", LEFTMOUSE, KM_PRESS, 0, 0); WM_keymap_add_item(keymap, "PAINT_OT_grab_clone", RIGHTMOUSE, KM_PRESS, 0, 0); - WM_keymap_add_item(keymap, "PAINT_OT_sample_color", RIGHTMOUSE, KM_PRESS, 0, 0); - RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_image_paint_radial_control", FKEY, KM_PRESS, 0, 0)->ptr, "mode", WM_RADIALCONTROL_SIZE); - RNA_enum_set(WM_keymap_add_item(keymap, "PAINT_OT_image_paint_radial_control", FKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "mode", WM_RADIALCONTROL_STRENGTH); WM_keymap_add_item(keymap, "IMAGE_OT_sample", ACTIONMOUSE, KM_PRESS, 0, 0); RNA_enum_set(WM_keymap_add_item(keymap, "IMAGE_OT_curves_point_set", ACTIONMOUSE, KM_PRESS, KM_CTRL, 0)->ptr, "point", 0); @@ -303,6 +300,7 @@ static void image_listener(ScrArea *sa, wmNotifier *wmn) switch(wmn->data) { case ND_DATA: case ND_SELECT: + ED_area_tag_refresh(sa); ED_area_tag_redraw(sa); break; } @@ -389,10 +387,10 @@ static void image_main_area_init(wmWindowManager *wm, ARegion *ar) // UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_STANDARD, ar->winx, ar->winy); /* image paint polls for mode */ - keymap= WM_keymap_find(wm->defaultconf, "Image Paint", SPACE_IMAGE, 0); + keymap= WM_keymap_find(wm->defaultconf, "Image Paint", 0, 0); WM_event_add_keymap_handler_bb(&ar->handlers, keymap, &ar->v2d.mask, &ar->winrct); - keymap= WM_keymap_find(wm->defaultconf, "UVEdit", 0, 0); + keymap= WM_keymap_find(wm->defaultconf, "UV Editor", 0, 0); WM_event_add_keymap_handler(&ar->handlers, keymap); /* own keymaps */ @@ -531,6 +529,7 @@ void ED_spacetype_image(void) ARegionType *art; st->spaceid= SPACE_IMAGE; + strncpy(st->name, "Image", BKE_ST_MAXNAME); st->new= image_new; st->free= image_free; @@ -568,7 +567,7 @@ void ED_spacetype_image(void) art= MEM_callocN(sizeof(ARegionType), "spacetype image region"); art->regionid = RGN_TYPE_HEADER; art->minsizey= HEADERY; - art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES; + art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_VIEW2D|ED_KEYMAP_FRAMES|ED_KEYMAP_HEADER; art->init= image_header_area_init; art->draw= image_header_area_draw; |