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:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-05-03 23:28:41 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-05-03 23:28:41 +0400
commitb1006fb949d5b437f7ab0514ee779ba24fcfc1f8 (patch)
tree9e30e514bdba81d5955691bd4722235beea2d58b /source/blender/editors/space_clip
parent5821c2973ec6a7cc6abc25ac75e85e84dc176411 (diff)
Clip editor: sort order for dopesheet channels
Supported sorting by name, longest tracked segment and total tracked frames. Internally tracks are stored in Tracking datablock, but sort order is a clip editor space property and sorting happens on clip editor draw. If there's no dopesheet opened with different sort orders it's not a problem due to re-sorting wouldn't happen. Also fixed draw issue of tracked segments introduced in previous commit.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r--source/blender/editors/space_clip/clip_dopesheet_draw.c5
-rw-r--r--source/blender/editors/space_clip/space_clip.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/space_clip/clip_dopesheet_draw.c b/source/blender/editors/space_clip/clip_dopesheet_draw.c
index 1814b253def..574eb5b2570 100644
--- a/source/blender/editors/space_clip/clip_dopesheet_draw.c
+++ b/source/blender/editors/space_clip/clip_dopesheet_draw.c
@@ -203,6 +203,11 @@ void clip_draw_dopesheet_main(SpaceClip *sc, ARegion *ar, Scene *scene)
int start_frame = channel->segments[2 * i];
int end_frame = channel->segments[2 * i + 1];
+ if (sel)
+ glColor4fv(selected_strip);
+ else
+ glColor4fv(strip);
+
if (start_frame != end_frame) {
glRectf(start_frame, (float) y - STRIP_HEIGHT_HALF,
end_frame, (float) y + STRIP_HEIGHT_HALF);
diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c
index 4543876ffe5..82f76efacaa 100644
--- a/source/blender/editors/space_clip/space_clip.c
+++ b/source/blender/editors/space_clip/space_clip.c
@@ -1129,11 +1129,14 @@ static void dopesheet_area_draw(const bContext *C, ARegion *ar)
{
Scene *scene = CTX_data_scene(C);
SpaceClip *sc = CTX_wm_space_clip(C);
+ MovieClip *clip = ED_space_clip(sc);
View2D *v2d = &ar->v2d;
View2DGrid *grid;
View2DScrollers *scrollers;
short unit = 0;
+ BKE_tracking_dopesheet_sort(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE);
+
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);
@@ -1186,9 +1189,13 @@ static void clip_channels_area_init(wmWindowManager *wm, ARegion *ar)
static void clip_channels_area_draw(const bContext *C, ARegion *ar)
{
+ SpaceClip *sc = CTX_wm_space_clip(C);
+ MovieClip *clip = ED_space_clip(sc);
View2D *v2d = &ar->v2d;
View2DScrollers *scrollers;
+ BKE_tracking_dopesheet_sort(&clip->tracking, sc->dope_sort, sc->dope_flag & SC_DOPE_SORT_INVERSE);
+
/* clear and setup matrix */
UI_ThemeClearColor(TH_BACK);
glClear(GL_COLOR_BUFFER_BIT);