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:
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r--source/blender/editors/screen/Makefile2
-rw-r--r--source/blender/editors/screen/area.c12
-rw-r--r--source/blender/editors/screen/screen_context.c1
-rw-r--r--source/blender/editors/screen/screen_edit.c14
-rw-r--r--source/blender/editors/screen/screen_intern.h3
-rw-r--r--source/blender/editors/screen/screen_ops.c153
-rw-r--r--source/blender/editors/screen/screendump.c1
7 files changed, 83 insertions, 103 deletions
diff --git a/source/blender/editors/screen/Makefile b/source/blender/editors/screen/Makefile
index c763b4ecb5e..85b9e069620 100644
--- a/source/blender/editors/screen/Makefile
+++ b/source/blender/editors/screen/Makefile
@@ -15,7 +15,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
-# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# The Original Code is Copyright (C) 2007 Blender Foundation
# All rights reserved.
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index fa7064b817d..90f9d5683c2 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -40,7 +40,6 @@
#include "BKE_context.h"
#include "BKE_global.h"
#include "BKE_screen.h"
-#include "BKE_utildefines.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -48,6 +47,7 @@
#include "ED_screen.h"
#include "ED_screen_types.h"
+#include "ED_space_api.h"
#include "ED_types.h"
#include "ED_fileselect.h"
@@ -117,12 +117,6 @@ void ED_region_do_listen(ARegion *ar, wmNotifier *note)
case NC_WINDOW:
ED_region_tag_redraw(ar);
break;
-#ifndef WM_FAST_DRAW
- case NC_SCREEN:
- if(note->action==NA_EDITED)
- ED_region_tag_redraw(ar);
- break;
-#endif
}
if(ar->type && ar->type->listener)
@@ -349,6 +343,8 @@ void ED_region_do_draw(bContext *C, ARegion *ar)
else if(at->draw) {
at->draw(C, ar);
}
+
+ ED_region_draw_cb_draw(C, ar, REGION_DRAW_POST_PIXEL);
uiFreeInactiveBlocks(C, &ar->uiblocks);
@@ -1427,7 +1423,7 @@ void ED_region_header(const bContext *C, ARegion *ar)
/* draw all headers types */
for(ht= ar->type->headertypes.first; ht; ht= ht->next) {
- block= uiBeginBlock(C, ar, "header buttons", UI_EMBOSS);
+ block= uiBeginBlock(C, ar, ht->idname, UI_EMBOSS);
layout= uiBlockLayout(block, UI_LAYOUT_HORIZONTAL, UI_LAYOUT_HEADER, xco, yco, HEADERY-6, 1, style);
if(ht->draw) {
diff --git a/source/blender/editors/screen/screen_context.c b/source/blender/editors/screen/screen_context.c
index 1c570d98744..fbc83b1de65 100644
--- a/source/blender/editors/screen/screen_context.c
+++ b/source/blender/editors/screen/screen_context.c
@@ -35,7 +35,6 @@
#include "BKE_context.h"
#include "BKE_utildefines.h"
-#include "BKE_global.h"
#include "BKE_action.h"
#include "BKE_sequencer.h"
diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c
index a3f97a7c5ce..8874c5d1bc8 100644
--- a/source/blender/editors/screen/screen_edit.c
+++ b/source/blender/editors/screen/screen_edit.c
@@ -25,6 +25,8 @@
*/
#include <string.h>
+#include <math.h>
+
#include "MEM_guardedalloc.h"
@@ -40,7 +42,6 @@
#include "BKE_node.h"
#include "BKE_screen.h"
#include "BKE_scene.h"
-#include "BKE_utildefines.h"
#include "BIF_gl.h"
#include "BIF_glutil.h"
@@ -49,7 +50,7 @@
#include "WM_types.h"
#include "ED_image.h"
-#include "ED_view3d.h"
+#include "ED_object.h"
#include "ED_screen.h"
#include "ED_screen_types.h"
@@ -1367,6 +1368,8 @@ void ED_screen_set_scene(bContext *C, Scene *scene)
bScreen *sc;
bScreen *curscreen= CTX_wm_screen(C);
+ ED_object_exit_editmode(C, EM_FREEDATA|EM_DO_UNDO);
+
for(sc= CTX_data_main(C)->screen.first; sc; sc= sc->id.next) {
if((U.flag & USER_SCENEGLOBAL) || sc==curscreen) {
@@ -1421,7 +1424,7 @@ void ED_screen_set_scene(bContext *C, Scene *scene)
}
CTX_data_scene_set(C, scene);
- set_scene_bg(scene);
+ set_scene_bg(CTX_data_main(C), scene);
ED_update_for_newframe(C, 1);
@@ -1666,12 +1669,14 @@ void ED_screen_animation_timer(bContext *C, int redraws, int refresh, int sync,
ScreenAnimData *sad= MEM_callocN(sizeof(ScreenAnimData), "ScreenAnimData");
screen->animtimer= WM_event_add_timer(wm, win, TIMER0, (1.0/FPS));
+
sad->ar= CTX_wm_region(C);
sad->sfra = scene->r.cfra;
sad->redraws= redraws;
sad->refresh= refresh;
sad->flag |= (enable < 0)? ANIMPLAY_FLAG_REVERSE: 0;
sad->flag |= (sync == 0)? ANIMPLAY_FLAG_NO_SYNC: (sync == 1)? ANIMPLAY_FLAG_SYNC: 0;
+
screen->animtimer->customdata= sad;
}
@@ -1720,6 +1725,7 @@ void ED_screen_animation_timer_update(bScreen *screen, int redraws, int refresh)
/* results in fully updated anim system */
void ED_update_for_newframe(const bContext *C, int mute)
{
+ Main *bmain= CTX_data_main(C);
bScreen *screen= CTX_wm_screen(C);
Scene *scene= CTX_data_scene(C);
@@ -1743,7 +1749,7 @@ void ED_update_for_newframe(const bContext *C, int mute)
/* this function applies the changes too */
/* XXX future: do all windows */
- scene_update_for_newframe(scene, BKE_screen_visible_layers(screen, scene)); /* BKE_scene.h */
+ scene_update_for_newframe(bmain, scene, BKE_screen_visible_layers(screen, scene)); /* BKE_scene.h */
//if ( (CFRA>1) && (!mute) && (scene->r.audio.flag & AUDIO_SCRUB))
// audiostream_scrub( CFRA );
diff --git a/source/blender/editors/screen/screen_intern.h b/source/blender/editors/screen/screen_intern.h
index 5c104521a60..79789b1876e 100644
--- a/source/blender/editors/screen/screen_intern.h
+++ b/source/blender/editors/screen/screen_intern.h
@@ -58,9 +58,6 @@ void ed_screen_context(const bContext *C, const char *member, bContextDataResult
void SCREEN_OT_screenshot(struct wmOperatorType *ot);
void SCREEN_OT_screencast(struct wmOperatorType *ot);
-/* partial updates, much faster then drawing everything, ton is away so allow easy undo'ing - campbell */
-#define WM_FAST_DRAW
-
#endif /* ED_SCREEN_INTERN_H */
diff --git a/source/blender/editors/screen/screen_ops.c b/source/blender/editors/screen/screen_ops.c
index b70cb03869d..2b9a929d4bf 100644
--- a/source/blender/editors/screen/screen_ops.c
+++ b/source/blender/editors/screen/screen_ops.c
@@ -41,20 +41,13 @@
#include "DNA_scene_types.h"
#include "DNA_meta_types.h"
-#include "BKE_blender.h"
-#include "BKE_colortools.h"
#include "BKE_context.h"
#include "BKE_customdata.h"
-#include "BKE_global.h"
-#include "BKE_idprop.h"
-#include "BKE_library.h"
#include "BKE_main.h"
#include "BKE_mesh.h"
-#include "BKE_multires.h"
#include "BKE_report.h"
#include "BKE_scene.h"
#include "BKE_screen.h"
-#include "BKE_utildefines.h"
#include "BKE_tessmesh.h"
#include "BKE_sound.h"
@@ -608,10 +601,8 @@ static int area_swap_modal(bContext *C, wmOperator *op, wmEvent *event)
return area_swap_cancel(C, op);
}
-#ifdef WM_FAST_DRAW
ED_area_tag_redraw(sad->sa1);
ED_area_tag_redraw(sad->sa2);
-#endif
ED_area_swapspace(C, sad->sa1, sad->sa2);
@@ -684,10 +675,8 @@ static int area_dupli_invoke(bContext *C, wmOperator *op, wmEvent *event)
/* copy area to new screen */
area_copy_data((ScrArea *)newsc->areabase.first, sa, 0);
-
-#ifdef WM_FAST_DRAW
+
ED_area_tag_redraw((ScrArea *)newsc->areabase.first);
-#endif
/* screen, areas init */
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
@@ -813,6 +802,7 @@ static void area_move_apply_do(bContext *C, int origval, int delta, int dir, int
wmWindow *win= CTX_wm_window(C);
bScreen *sc= CTX_wm_screen(C);
ScrVert *v1;
+ ScrArea *sa;
delta= CLAMPIS(delta, -smaller, bigger);
@@ -835,15 +825,12 @@ static void area_move_apply_do(bContext *C, int origval, int delta, int dir, int
}
}
}
-#ifdef WM_FAST_DRAW
- {
- ScrArea *sa;
- for(sa= sc->areabase.first; sa; sa= sa->next)
- if(sa->v1->flag || sa->v2->flag || sa->v3->flag || sa->v4->flag)
- ED_area_tag_redraw(sa);
+
+ for(sa= sc->areabase.first; sa; sa= sa->next) {
+ if(sa->v1->flag || sa->v2->flag || sa->v3->flag || sa->v4->flag)
+ ED_area_tag_redraw(sa);
}
-#endif
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL); /* redraw everything */
}
@@ -1106,10 +1093,9 @@ static int area_split_apply(bContext *C, wmOperator *op)
if(dir=='h') sd->origval= sd->nedge->v1->vec.y;
else sd->origval= sd->nedge->v1->vec.x;
-#ifdef WM_FAST_DRAW
ED_area_tag_redraw(sd->sarea);
ED_area_tag_redraw(sd->narea);
-#endif
+
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
return 1;
@@ -1121,11 +1107,9 @@ static int area_split_apply(bContext *C, wmOperator *op)
static void area_split_exit(bContext *C, wmOperator *op)
{
if (op->customdata) {
-#ifdef WM_FAST_DRAW
sAreaSplitData *sd= (sAreaSplitData *)op->customdata;
if(sd->sarea) ED_area_tag_redraw(sd->sarea);
if(sd->narea) ED_area_tag_redraw(sd->narea);
-#endif
MEM_freeN(op->customdata);
op->customdata = NULL;
@@ -1437,9 +1421,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
else if(rmd->ar->flag & RGN_FLAG_HIDDEN)
ED_region_toggle_hidden(C, rmd->ar);
}
-#ifdef WM_FAST_DRAW
ED_area_tag_redraw(rmd->sa);
-#endif
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
break;
@@ -1450,9 +1432,7 @@ static int region_scale_modal(bContext *C, wmOperator *op, wmEvent *event)
if(ABS(event->x - rmd->origx) < 2 && ABS(event->y - rmd->origy) < 2) {
if(rmd->ar->flag & RGN_FLAG_HIDDEN) {
ED_region_toggle_hidden(C, rmd->ar);
-#ifdef WM_FAST_DRAW
ED_area_tag_redraw(rmd->sa);
-#endif
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
}
@@ -1547,7 +1527,7 @@ static void SCREEN_OT_frame_jump(wmOperatorType *ot)
ot->exec= frame_jump_exec;
ot->poll= ED_operator_screenactive;
- ot->flag= 0;
+ ot->flag= OPTYPE_UNDO;
/* rna */
RNA_def_boolean(ot->srna, "end", 0, "Last Frame", "Jump to the last frame of the frame range.");
@@ -1626,7 +1606,7 @@ static void SCREEN_OT_keyframe_jump(wmOperatorType *ot)
ot->exec= keyframe_jump_exec;
ot->poll= ED_operator_screenactive;
- ot->flag= 0;
+ ot->flag= OPTYPE_UNDO;
/* rna */
RNA_def_boolean(ot->srna, "next", 1, "Next Keyframe", "");
@@ -1761,10 +1741,10 @@ static int area_join_init(bContext *C, wmOperator *op)
int x2, y2;
/* required properties, make negative to get return 0 if not set by caller */
- x1= RNA_int_get(op->ptr, "x1");
- y1= RNA_int_get(op->ptr, "y1");
- x2= RNA_int_get(op->ptr, "x2");
- y2= RNA_int_get(op->ptr, "y2");
+ x1= RNA_int_get(op->ptr, "min_x");
+ y1= RNA_int_get(op->ptr, "min_y");
+ x2= RNA_int_get(op->ptr, "max_x");
+ y2= RNA_int_get(op->ptr, "max_y");
sa1 = screen_areahascursor(CTX_wm_screen(C), x1, y1);
sa2 = screen_areahascursor(CTX_wm_screen(C), x2, y2);
@@ -1845,10 +1825,10 @@ static int area_join_invoke(bContext *C, wmOperator *op, wmEvent *event)
return OPERATOR_PASS_THROUGH;
/* prepare operator state vars */
- RNA_int_set(op->ptr, "x1", sad->x);
- RNA_int_set(op->ptr, "y1", sad->y);
- RNA_int_set(op->ptr, "x2", event->x);
- RNA_int_set(op->ptr, "y2", event->y);
+ RNA_int_set(op->ptr, "min_x", sad->x);
+ RNA_int_set(op->ptr, "min_y", sad->y);
+ RNA_int_set(op->ptr, "max_x", event->x);
+ RNA_int_set(op->ptr, "max_y", event->y);
if(!area_join_init(C, op))
return OPERATOR_PASS_THROUGH;
@@ -1955,10 +1935,9 @@ static int area_join_modal(bContext *C, wmOperator *op, wmEvent *event)
break;
case LEFTMOUSE:
if(event->val==KM_RELEASE) {
-#ifdef WM_FAST_DRAW
ED_area_tag_redraw(jd->sa1);
ED_area_tag_redraw(jd->sa2);
-#endif
+
area_join_apply(C, op);
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
area_join_exit(C, op);
@@ -1991,10 +1970,10 @@ static void SCREEN_OT_area_join(wmOperatorType *ot)
ot->flag= OPTYPE_BLOCKING;
/* rna */
- RNA_def_int(ot->srna, "x1", -100, INT_MIN, INT_MAX, "X 1", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "y1", -100, INT_MIN, INT_MAX, "Y 1", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "x2", -100, INT_MIN, INT_MAX, "X 2", "", INT_MIN, INT_MAX);
- RNA_def_int(ot->srna, "y2", -100, INT_MIN, INT_MAX, "Y 2", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "min_x", -100, INT_MIN, INT_MAX, "X 1", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "min_y", -100, INT_MIN, INT_MAX, "Y 1", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "max_x", -100, INT_MIN, INT_MAX, "X 2", "", INT_MIN, INT_MAX);
+ RNA_def_int(ot->srna, "max_y", -100, INT_MIN, INT_MAX, "Y 2", "", INT_MIN, INT_MAX);
}
/* ************** repeat last operator ***************************** */
@@ -2141,9 +2120,7 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
MEM_freeN(ar);
}
}
-#ifdef WM_FAST_DRAW
ED_area_tag_redraw(sa);
-#endif
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
else if(ar->next)
@@ -2183,10 +2160,7 @@ static int region_quadview_exec(bContext *C, wmOperator *op)
rv3d->view= RV3D_VIEW_CAMERA; rv3d->persp= RV3D_CAMOB;
if (rv3d->localvd) {rv3d->localvd->view = rv3d->view; rv3d->localvd->persp = rv3d->persp; }
}
-
-#ifdef WM_FAST_DRAW
ED_area_tag_redraw(sa);
-#endif
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
}
@@ -2228,10 +2202,8 @@ static int region_flip_exec(bContext *C, wmOperator *op)
ar->alignment= RGN_ALIGN_RIGHT;
else if(ar->alignment==RGN_ALIGN_RIGHT)
ar->alignment= RGN_ALIGN_LEFT;
-
-#ifdef WM_FAST_DRAW
- ED_area_tag_redraw(CTX_wm_area(C));
-#endif
+
+ ED_area_tag_redraw(CTX_wm_area(C));
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
return OPERATOR_FINISHED;
@@ -2283,10 +2255,8 @@ static int header_flip_exec(bContext *C, wmOperator *op)
ar->alignment= RGN_ALIGN_RIGHT;
else if(ar->alignment==RGN_ALIGN_RIGHT)
ar->alignment= RGN_ALIGN_LEFT;
-
-#ifdef WM_FAST_DRAW
+
ED_area_tag_redraw(CTX_wm_area(C));
-#endif
WM_event_add_notifier(C, NC_SCREEN|NA_EDITED, NULL);
@@ -2434,20 +2404,20 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
ScrArea *sa;
int sync;
float time;
-
+
/* sync, don't sync, or follow scene setting */
- if(sad->flag & ANIMPLAY_FLAG_SYNC) sync= 1;
- else if(sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
+ if (sad->flag & ANIMPLAY_FLAG_SYNC) sync= 1;
+ else if (sad->flag & ANIMPLAY_FLAG_NO_SYNC) sync= 0;
else sync= (scene->flag & SCE_FRAME_DROP);
if((scene->audio.flag & AUDIO_SYNC) && !(sad->flag & ANIMPLAY_FLAG_REVERSE) && finite(time = sound_sync_scene(scene)))
- scene->r.cfra = round(time * FPS);
+ scene->r.cfra = time * FPS + 0.5;
else
{
- if(sync) {
+ if (sync) {
int step = floor(wt->duration * FPS);
/* skip frames */
- if(sad->flag & ANIMPLAY_FLAG_REVERSE)
+ if (sad->flag & ANIMPLAY_FLAG_REVERSE)
scene->r.cfra -= step;
else
scene->r.cfra += step;
@@ -2455,7 +2425,7 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
}
else {
/* one frame +/- */
- if(sad->flag & ANIMPLAY_FLAG_REVERSE)
+ if (sad->flag & ANIMPLAY_FLAG_REVERSE)
scene->r.cfra--;
else
scene->r.cfra++;
@@ -2496,19 +2466,19 @@ static int screen_animation_step(bContext *C, wmOperator *op, wmEvent *event)
}
}
- if(sad->flag & ANIMPLAY_FLAG_JUMPED)
+ if (sad->flag & ANIMPLAY_FLAG_JUMPED)
sound_seek_scene(C);
/* since we follow drawflags, we can't send notifier but tag regions ourselves */
ED_update_for_newframe(C, 1);
- for(sa= screen->areabase.first; sa; sa= sa->next) {
+ for (sa= screen->areabase.first; sa; sa= sa->next) {
ARegion *ar;
- for(ar= sa->regionbase.first; ar; ar= ar->next) {
- if(ar==sad->ar)
+ for (ar= sa->regionbase.first; ar; ar= ar->next) {
+ if (ar==sad->ar)
ED_region_tag_redraw(ar);
else
- if(match_region_with_redraws(sa->spacetype, ar->regiontype, sad->redraws))
+ if (match_region_with_redraws(sa->spacetype, ar->regiontype, sad->redraws))
ED_region_tag_redraw(ar);
}
@@ -2553,9 +2523,9 @@ static void SCREEN_OT_animation_step(wmOperatorType *ot)
int ED_screen_animation_play(bContext *C, int sync, int mode)
{
bScreen *screen= CTX_wm_screen(C);
- struct Scene* scene = CTX_data_scene(C);
+ Scene *scene = CTX_data_scene(C);
- if(screen->animtimer) {
+ if (screen->animtimer) {
/* stop playback now */
ED_screen_animation_timer(C, 0, 0, 0, 0);
sound_stop_scene(scene);
@@ -2563,33 +2533,33 @@ int ED_screen_animation_play(bContext *C, int sync, int mode)
else {
ScrArea *sa= CTX_wm_area(C);
int refresh= SPACE_TIME;
-
- if(mode == 1) // XXX only play audio forwards!?
+
+ if (mode == 1) // XXX only play audio forwards!?
sound_play_scene(scene);
-
+
/* timeline gets special treatment since it has it's own menu for determining redraws */
if ((sa) && (sa->spacetype == SPACE_TIME)) {
SpaceTime *stime= (SpaceTime *)sa->spacedata.first;
-
+
ED_screen_animation_timer(C, stime->redraws, refresh, sync, mode);
-
+
/* update region if TIME_REGION was set, to leftmost 3d window */
ED_screen_animation_timer_update(screen, stime->redraws, refresh);
}
else {
int redraws = TIME_REGION|TIME_ALL_3D_WIN;
-
+
/* XXX - would like a better way to deal with this situation - Campbell */
- if((!sa) || (sa->spacetype == SPACE_SEQ)) {
+ if ((!sa) || (sa->spacetype == SPACE_SEQ)) {
redraws |= TIME_SEQ;
}
-
+
ED_screen_animation_timer(C, redraws, refresh, sync, mode);
-
+
if(screen->animtimer) {
wmTimer *wt= screen->animtimer;
ScreenAnimData *sad= wt->customdata;
-
+
sad->ar= CTX_wm_region(C);
}
}
@@ -2602,10 +2572,10 @@ static int screen_animation_play_exec(bContext *C, wmOperator *op)
{
int mode= (RNA_boolean_get(op->ptr, "reverse")) ? -1 : 1;
int sync= -1;
-
- if(RNA_property_is_set(op->ptr, "sync"))
+
+ if (RNA_property_is_set(op->ptr, "sync"))
sync= (RNA_boolean_get(op->ptr, "sync"));
-
+
return ED_screen_animation_play(C, sync, mode);
}
@@ -2854,9 +2824,9 @@ static int scene_new_exec(bContext *C, wmOperator *op)
/* these can't be handled in blenkernel curently, so do them here */
if(type == SCE_COPY_LINK_DATA)
- ED_object_single_users(newscene, 0);
+ ED_object_single_users(bmain, newscene, 0);
else if(type == SCE_COPY_FULL)
- ED_object_single_users(newscene, 1);
+ ED_object_single_users(bmain, newscene, 1);
WM_event_add_notifier(C, NC_SCENE|ND_SCENEBROWSE, newscene);
@@ -2992,6 +2962,7 @@ static void keymap_modal_set(wmKeyConfig *keyconf)
void ED_keymap_screen(wmKeyConfig *keyconf)
{
wmKeyMap *keymap;
+ //wmKeyMapItem *kmi;
/* Screen Editing ------------------------------------------------ */
keymap= WM_keymap_find(keyconf, "Screen Editing", 0, 0);
@@ -3087,10 +3058,22 @@ void ED_keymap_screen(wmKeyConfig *keyconf)
/* play (forward and backwards) */
WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT, 0);
- WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", KKEY, KM_PRESS, 0, LKEY);
RNA_boolean_set(WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", AKEY, KM_PRESS, KM_ALT|KM_SHIFT, 0)->ptr, "reverse", 1);
WM_keymap_add_item(keymap, "SCREEN_OT_animation_cancel", ESCKEY, KM_PRESS, 0, 0);
+ /* Alternative keys for animation and sequencer playing */
+#if 0 // XXX: disabled for restoring later... bad implementation
+ keymap= WM_keymap_find(keyconf, "Frames", 0, 0);
+ kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", RIGHTARROWKEY, KM_PRESS, KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "cycle_speed", 1);
+
+ kmi = WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", LEFTARROWKEY, KM_PRESS, KM_ALT, 0);
+ RNA_boolean_set(kmi->ptr, "reverse", 1);
+ RNA_boolean_set(kmi->ptr, "cycle_speed", 1);
+
+ WM_keymap_add_item(keymap, "SCREEN_OT_animation_play", DOWNARROWKEY, KM_PRESS, KM_ALT, 0);
+#endif
+
keymap_modal_set(keyconf);
}
diff --git a/source/blender/editors/screen/screendump.c b/source/blender/editors/screen/screendump.c
index d5cd8285515..56efa0a5a83 100644
--- a/source/blender/editors/screen/screendump.c
+++ b/source/blender/editors/screen/screendump.c
@@ -44,7 +44,6 @@
#include "BKE_global.h"
#include "BKE_image.h"
#include "BKE_report.h"
-#include "BKE_utildefines.h"
#include "BKE_writeavi.h"
#include "BIF_gl.h"