Fix T39270: Since as the Move Clip Editor have only two modes, menu on tab is needless

This commit is contained in:
Sergey Sharybin 2014-03-20 16:08:42 +06:00
parent 16ea400b29
commit 29f359c975
Notes: blender-bot 2023-02-14 10:57:55 +01:00
Referenced by issue #39270, Since as the Move Clip Editor have only two modes, menu on tab is needless
2 changed files with 6 additions and 14 deletions

View File

@ -123,9 +123,9 @@ class CLIP_HT_header(Header):
row = layout.row()
row.template_ID(sc, "clip", open="clip.open")
layout.prop(sc, "mode", text="")
if clip:
layout.prop(sc, "mode", text="")
row = layout.row()
row.template_ID(sc, "mask", new="mask.new")
@ -1332,17 +1332,6 @@ class CLIP_MT_tracking_specials(Menu):
text="Unlock Tracks").action = 'UNLOCK'
class CLIP_MT_select_mode(Menu):
bl_label = "Select Mode"
def draw(self, context):
layout = self.layout
layout.operator_context = 'INVOKE_REGION_WIN'
layout.operator_enum("clip.mode_set", "mode")
class CLIP_MT_camera_presets(Menu):
"""Predefined tracking camera intrinsics"""
bl_label = "Camera Presets"

View File

@ -577,7 +577,10 @@ static void clip_keymap(struct wmKeyConfig *keyconf)
RNA_boolean_set(kmi->ptr, "sequence", TRUE);
/* mode */
WM_keymap_add_menu(keymap, "CLIP_MT_select_mode", TABKEY, KM_PRESS, 0, 0);
kmi = WM_keymap_add_item(keymap, "WM_OT_context_toggle_enum", TABKEY, KM_PRESS, 0, 0);
RNA_string_set(kmi->ptr, "data_path", "space_data.mode");
RNA_string_set(kmi->ptr, "value_1", "TRACKING");
RNA_string_set(kmi->ptr, "value_2", "MASK");
WM_keymap_add_item(keymap, "CLIP_OT_solve_camera", SKEY, KM_PRESS, KM_SHIFT, 0);