diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-04 13:50:38 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-04-04 13:50:38 +0400 |
commit | 845aea6864cf4b3aa34d7676f725ab268465e34f (patch) | |
tree | c8c9c04cc8b4d5053e41ce438ae4cf9723a153b0 /source/blender/editors/space_clip/space_clip.c | |
parent | ef1af9f9c41a9cb33550bcaf396023ff840a3dab (diff) |
Clip editor prefetch changes
Made it an operator instead of automatic prefetching.
Filling the whole memory with frames is not always
desired behavior.
Now prefetching is available via P-key, or from Clip
panel in toolbox or from Clip menu.
Also enabled prefetching for non-proxied movies.
Diffstat (limited to 'source/blender/editors/space_clip/space_clip.c')
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 64b643f8a58..96e127cfde6 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -236,16 +236,6 @@ static void clip_stabilization_tag_refresh(ScrArea *sa) } } -static void clip_prefetch_tag_refresh(ScrArea *sa) -{ - SpaceClip *sc = (SpaceClip *) sa->spacedata.first; - MovieClip *clip = ED_space_clip_get_clip(sc); - - if (clip) { - clip->prefetch_ok = FALSE; - } -} - /* ******************** default callbacks for clip space ***************** */ static SpaceLink *clip_new(const bContext *C) @@ -358,7 +348,6 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn) switch (wmn->data) { case ND_FRAME: clip_scopes_tag_refresh(sa); - clip_prefetch_tag_refresh(sa); /* no break! */ case ND_FRAME_RANGE: @@ -367,19 +356,11 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn) } break; case NC_MOVIECLIP: - if (wmn->data == 0 && wmn->action == 0) { - /* a nit funky, happens from prefetch job to update - * cache line and job progress - */ - ED_area_tag_redraw(sa); - } - switch (wmn->data) { case ND_DISPLAY: case ND_SELECT: clip_scopes_tag_refresh(sa); ED_area_tag_redraw(sa); - clip_prefetch_tag_refresh(sa); break; } switch (wmn->action) { @@ -423,7 +404,6 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn) case NC_SCREEN: switch (wmn->data) { case ND_ANIMPLAY: - clip_prefetch_tag_refresh(sa); ED_area_tag_redraw(sa); break; } @@ -432,7 +412,6 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn) if (wmn->data == ND_SPACE_CLIP) { clip_scopes_tag_refresh(sa); clip_stabilization_tag_refresh(sa); - clip_prefetch_tag_refresh(sa); ED_area_tag_redraw(sa); } break; @@ -442,10 +421,6 @@ static void clip_listener(ScrArea *sa, wmNotifier *wmn) ED_area_tag_redraw(sa); } break; - case NC_WM: - if (wmn->data == ND_FILEREAD) - clip_prefetch_tag_refresh(sa); - break; } } @@ -465,6 +440,7 @@ static void clip_operatortypes(void) WM_operatortype_append(CLIP_OT_rebuild_proxy); WM_operatortype_append(CLIP_OT_mode_set); WM_operatortype_append(CLIP_OT_view_ndof); + WM_operatortype_append(CLIP_OT_prefetch); /* ** clip_toolbar.c ** */ WM_operatortype_append(CLIP_OT_tools); @@ -598,6 +574,9 @@ static void clip_keymap(struct wmKeyConfig *keyconf) kmi = WM_keymap_add_item(keymap, "CLIP_OT_set_solver_keyframe", EKEY, KM_PRESS, 0, 0); RNA_enum_set(kmi->ptr, "keyframe", 1); + /* io/playback */ + WM_keymap_add_item(keymap, "CLIP_OT_prefetch", PKEY, KM_PRESS, 0, 0); + /* ******** Hotkeys avalaible for main region only ******** */ keymap = WM_keymap_find(keyconf, "Clip Editor", SPACE_CLIP, 0); |