diff options
author | Sebastian Koenig <sebastiankoenig@posteo.de> | 2014-02-11 14:11:56 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-11 14:16:11 +0400 |
commit | 10a0b1b8c3e683e562451065aa62bc72a99c8918 (patch) | |
tree | 91bdb56bde24a833d1c80ef21d723ac79fbdea91 /release | |
parent | 23fe23f951f017438dfd8e57eadc5c70d027417d (diff) |
Bring back stabilization and GP panels to MCE
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_clip.py | 117 |
1 files changed, 56 insertions, 61 deletions
diff --git a/release/scripts/startup/bl_ui/space_clip.py b/release/scripts/startup/bl_ui/space_clip.py index 8ffd73474fc..42ad9daafa5 100644 --- a/release/scripts/startup/bl_ui/space_clip.py +++ b/release/scripts/startup/bl_ui/space_clip.py @@ -141,7 +141,7 @@ class CLIP_HT_header(Header): sc = context.space_data - if sc.mode in {'TRACKING', 'RECONSTRUCTION', 'DISTORTION'}: + if sc.mode in {'TRACKING'}: self._draw_tracking(context) else: self._draw_masking(context) @@ -223,7 +223,7 @@ class CLIP_PT_reconstruction_panel: sc = context.space_data clip = sc.clip - return clip and sc.mode == 'RECONSTRUCTION' and sc.view == 'CLIP' + return clip and sc.view == 'CLIP' class CLIP_PT_tools_clip(Panel): @@ -540,44 +540,6 @@ class CLIP_PT_tools_object(CLIP_PT_reconstruction_panel, Panel): col.prop(settings, "object_distance") -class CLIP_PT_tools_grease_pencil(Panel): - bl_space_type = 'CLIP_EDITOR' - bl_region_type = 'TOOLS' - bl_label = "Grease Pencil" - bl_options = {'DEFAULT_CLOSED'} - - @classmethod - def poll(cls, context): - sc = context.space_data - clip = sc.clip - - if not clip: - return False - - if sc.mode == 'DISTORTION': - return sc.view == 'CLIP' - elif sc.mode == 'MASK': - return True - - return False - - def draw(self, context): - layout = self.layout - - col = layout.column(align=True) - - row = col.row(align=True) - row.operator("gpencil.draw", text="Draw").mode = 'DRAW' - row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT' - - row = col.row(align=True) - row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY' - row.operator("gpencil.draw", text="Erase").mode = 'ERASER' - - row = col.row(align=True) - row.prop(context.tool_settings, "use_grease_pencil_sessions") - - class CLIP_PT_objects(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' @@ -744,7 +706,7 @@ class CLIP_PT_tracking_camera(Panel): if CLIP_PT_clip_view_panel.poll(context): sc = context.space_data - return sc.mode in {'TRACKING', 'DISTORTION'} and sc.clip + return sc.mode in {'TRACKING'} and sc.clip return False @@ -784,7 +746,7 @@ class CLIP_PT_tracking_lens(Panel): if CLIP_PT_clip_view_panel.poll(context): sc = context.space_data - return sc.mode in {'TRACKING', 'DISTORTION'} and sc.clip + return sc.mode in {'TRACKING'} and sc.clip return False @@ -882,12 +844,41 @@ class CLIP_PT_marker_display(CLIP_PT_clip_view_panel, Panel): row.prop(sc, "show_tiny_markers", text="Thin") +class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel): + bl_space_type = 'CLIP_EDITOR' + bl_region_type = 'UI' + bl_label = "Marker" + bl_options = {'DEFAULT_CLOSED'} + + def draw(self, context): + layout = self.layout + sc = context.space_data + clip = context.space_data.clip + act_track = clip.tracking.tracks.active + + if act_track: + layout.template_marker(sc, "clip", sc.clip_user, act_track, False) + else: + layout.active = False + layout.label(text="No active track") + + class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' bl_label = "2D Stabilization" + bl_category = "Stabilization" bl_options = {'DEFAULT_CLOSED'} + @classmethod + def poll(cls, context): + if CLIP_PT_clip_view_panel.poll(context): + sc = context.space_data + + return sc.mode in {'TRACKING'} and sc.clip + + return False + def draw_header(self, context): stab = context.space_data.clip.tracking.stabilization @@ -936,25 +927,6 @@ class CLIP_PT_stabilization(CLIP_PT_reconstruction_panel, Panel): layout.prop(stab, "filter_type") -class CLIP_PT_marker(CLIP_PT_tracking_panel, Panel): - bl_space_type = 'CLIP_EDITOR' - bl_region_type = 'UI' - bl_label = "Marker" - bl_options = {'DEFAULT_CLOSED'} - - def draw(self, context): - layout = self.layout - sc = context.space_data - clip = context.space_data.clip - act_track = clip.tracking.tracks.active - - if act_track: - layout.template_marker(sc, "clip", sc.clip_user, act_track, False) - else: - layout.active = False - layout.label(text="No active track") - - class CLIP_PT_proxy(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' @@ -1067,6 +1039,29 @@ class CLIP_PT_tools_mask(MASK_PT_tools, Panel): # --- end mask --- +class CLIP_PT_tools_grease_pencil(Panel): + bl_space_type = 'CLIP_EDITOR' + bl_region_type = 'TOOLS' + bl_label = "Grease Pencil" + bl_category = "Grease Pencil" + + def draw(self, context): + layout = self.layout + + col = layout.column(align=True) + + row = col.row(align=True) + row.operator("gpencil.draw", text="Draw").mode = 'DRAW' + row.operator("gpencil.draw", text="Line").mode = 'DRAW_STRAIGHT' + + row = col.row(align=True) + row.operator("gpencil.draw", text="Poly").mode = 'DRAW_POLY' + row.operator("gpencil.draw", text="Erase").mode = 'ERASER' + + row = col.row(align=True) + row.prop(context.tool_settings, "use_grease_pencil_sessions") + + class CLIP_PT_footage(CLIP_PT_clip_view_panel, Panel): bl_space_type = 'CLIP_EDITOR' bl_region_type = 'UI' |