diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-07 18:26:43 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-07 18:27:59 +0400 |
commit | 8614ed64eddbf62d8e1a1346525398ec305896bd (patch) | |
tree | 19026189ecd5bb00284a01812613367a1e87bb3a /source | |
parent | e2e9c519009fae68eda6c31122e5b7f833476112 (diff) |
Add Tabs for Movie Clip Editor
Based on the patch from Sebastian Koenig, discussed with Jonathan Williamson
https://developer.blender.org/T38172
Also removed redundant modes from clip editor.
Reviewers: brecht, carter2422
Reviewed By: carter2422
CC: sebastian_k, carter2422
Differential Revision: https://developer.blender.org/D293
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/versioning_260.c | 19 | ||||
-rw-r--r-- | source/blender/blenloader/intern/versioning_defaults.c | 19 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_draw.c | 5 | ||||
-rw-r--r-- | source/blender/editors/space_clip/clip_editor.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 2 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_tracking_types.h | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 3 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_tracking.c | 9 |
9 files changed, 53 insertions, 13 deletions
diff --git a/source/blender/blenloader/intern/versioning_260.c b/source/blender/blenloader/intern/versioning_260.c index 791ddb36ba2..8c9c3c86245 100644 --- a/source/blender/blenloader/intern/versioning_260.c +++ b/source/blender/blenloader/intern/versioning_260.c @@ -2699,5 +2699,24 @@ void blo_do_versions_260(FileData *fd, Library *UNUSED(lib), Main *main) } } } FOREACH_NODETREE_END + + { + bScreen *screen; + + for (screen = main->screen.first; screen; screen = screen->id.next) { + ScrArea *area; + for (area = screen->areabase.first; area; area = area->next) { + SpaceLink *space_link; + for (space_link = area->spacedata.first; space_link; space_link = space_link->next) { + if (space_link->spacetype == SPACE_CLIP) { + SpaceClip *space_clip = (SpaceClip *) space_link; + if (space_clip->mode != SC_MODE_MASKEDIT) { + space_clip->mode = SC_MODE_TRACKING; + } + } + } + } + } + } } } diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index d6117224bb4..b14402e72db 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -30,6 +30,8 @@ #include "DNA_freestyle_types.h" #include "DNA_linestyle_types.h" #include "DNA_scene_types.h" +#include "DNA_screen_types.h" +#include "DNA_space_types.h" #include "DNA_userdef_types.h" #include "BKE_main.h" @@ -56,5 +58,22 @@ void BLO_update_defaults_startup_blend(Main *main) for (linestyle = main->linestyle.first; linestyle; linestyle = linestyle->id.next) linestyle->flag = LS_SAME_OBJECT; + + { + bScreen *screen; + + for (screen = main->screen.first; screen; screen = screen->id.next) { + ScrArea *area; + for (area = screen->areabase.first; area; area = area->next) { + SpaceLink *space_link; + for (space_link = area->spacedata.first; space_link; space_link = space_link->next) { + if (space_link->spacetype == SPACE_CLIP) { + SpaceClip *space_clip = (SpaceClip *) space_link; + space_clip->flag &= ~SC_MANUAL_CALIBRATION; + } + } + } + } + } } diff --git a/source/blender/editors/space_clip/clip_draw.c b/source/blender/editors/space_clip/clip_draw.c index 92f94185712..407ca269ecd 100644 --- a/source/blender/editors/space_clip/clip_draw.c +++ b/source/blender/editors/space_clip/clip_draw.c @@ -1527,9 +1527,6 @@ static void draw_distortion(SpaceClip *sc, ARegion *ar, MovieClip *clip, float dx = (float)width / n, dy = (float)height / n * aspy; float offsx = 0.0f, offsy = 0.0f; - if (sc->mode != SC_MODE_DISTORTION) - return; - if (!tracking->camera.focal) return; @@ -1818,7 +1815,7 @@ void clip_draw_grease_pencil(bContext *C, int onlyv2d) if (onlyv2d) { /* if manual calibration is used then grease pencil data is already * drawn in draw_distortion */ - if ((sc->flag & SC_MANUAL_CALIBRATION) == 0 || sc->mode != SC_MODE_DISTORTION) { + if ((sc->flag & SC_MANUAL_CALIBRATION) == 0) { glPushMatrix(); glMultMatrixf(sc->unistabmat); diff --git a/source/blender/editors/space_clip/clip_editor.c b/source/blender/editors/space_clip/clip_editor.c index 20e69fce848..0543e348b5b 100644 --- a/source/blender/editors/space_clip/clip_editor.c +++ b/source/blender/editors/space_clip/clip_editor.c @@ -504,7 +504,7 @@ void ED_clip_mouse_pos(SpaceClip *sc, ARegion *ar, const int mval[2], float co[2 bool ED_space_clip_check_show_trackedit(SpaceClip *sc) { if (sc) { - return ELEM3(sc->mode, SC_MODE_TRACKING, SC_MODE_RECONSTRUCTION, SC_MODE_DISTORTION); + return sc->mode == SC_MODE_TRACKING; } return false; diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index e1262d0d7b8..886b38d39a1 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -246,7 +246,7 @@ static SpaceLink *clip_new(const bContext *C) sc = MEM_callocN(sizeof(SpaceClip), "initclip"); sc->spacetype = SPACE_CLIP; - sc->flag = SC_SHOW_MARKER_PATTERN | SC_SHOW_TRACK_PATH | SC_MANUAL_CALIBRATION | + sc->flag = SC_SHOW_MARKER_PATTERN | SC_SHOW_TRACK_PATH | SC_SHOW_GRAPH_TRACKS_MOTION | SC_SHOW_GRAPH_FRAMES | SC_SHOW_GPENCIL; sc->zoom = 1.0f; sc->path_length = 20; diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index f2dc4dce11f..54fcb5c857b 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -1134,8 +1134,8 @@ typedef enum eSpaceClip_Flag { /* SpaceClip->mode */ typedef enum eSpaceClip_Mode { SC_MODE_TRACKING = 0, - SC_MODE_RECONSTRUCTION = 1, - SC_MODE_DISTORTION = 2, + /*SC_MODE_RECONSTRUCTION = 1,*/ /* DEPRECATED */ + /*SC_MODE_DISTORTION = 2,*/ /* DEPRECATED */ SC_MODE_MASKEDIT = 3, } eSpaceClip_Mode; diff --git a/source/blender/makesdna/DNA_tracking_types.h b/source/blender/makesdna/DNA_tracking_types.h index 4e6a762c36a..78faf5d8547 100644 --- a/source/blender/makesdna/DNA_tracking_types.h +++ b/source/blender/makesdna/DNA_tracking_types.h @@ -402,7 +402,8 @@ enum { /* MovieTrackingSettings->flag */ enum { - TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED = (1 << 0) + TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED = (1 << 0), + TRACKING_SETTINGS_SHOW_EXTRA_EXPANDED = (1 << 1) }; /* MovieTrackingSettings->motion_flag */ diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 81389b99e41..813c2a3b819 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -132,9 +132,6 @@ EnumPropertyItem viewport_shade_items[] = { EnumPropertyItem clip_editor_mode_items[] = { {SC_MODE_TRACKING, "TRACKING", ICON_ANIM_DATA, "Tracking", "Show tracking and solving tools"}, - {SC_MODE_RECONSTRUCTION, "RECONSTRUCTION", ICON_SNAP_FACE, "Reconstruction", - "Show tracking/reconstruction tools"}, - {SC_MODE_DISTORTION, "DISTORTION", ICON_GRID, "Distortion", "Show distortion tools"}, {SC_MODE_MASKEDIT, "MASK", ICON_MOD_MASK, "Mask", "Show mask editing tools"}, {0, NULL, 0, NULL, NULL} }; diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c index 87b7aa11c98..8cb82643b87 100644 --- a/source/blender/makesrna/intern/rna_tracking.c +++ b/source/blender/makesrna/intern/rna_tracking.c @@ -819,7 +819,14 @@ static void rna_def_trackingSettings(BlenderRNA *brna) prop = RNA_def_property(srna, "show_default_expanded", PROP_BOOLEAN, PROP_NONE); RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_SETTINGS_SHOW_DEFAULT_EXPANDED); - RNA_def_property_ui_text(prop, "Show Expanded", "Show the expanded in the user interface"); + RNA_def_property_ui_text(prop, "Show Expanded", "Show default options expanded in the user interface"); + RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); + + /* ** extra tracker settings ** */ + prop = RNA_def_property(srna, "show_extra_expanded", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", TRACKING_SETTINGS_SHOW_EXTRA_EXPANDED); + RNA_def_property_ui_text(prop, "Show Expanded", "Show extra options expanded in the user interface"); RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1); /* solver settings */ |