forked from bartvdbraak/blender
Cleanup: remove intermediate menu drawing function
This commit is contained in:
parent
dc3d9467f2
commit
6b7d03ac03
@ -283,10 +283,7 @@ class CLIP_MT_tracking_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
sc = context.space_data
|
sc = context.space_data
|
||||||
clip = sc.clip
|
clip = sc.clip
|
||||||
|
|
||||||
@ -308,10 +305,7 @@ class CLIP_MT_masking_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
sc = context.space_data
|
sc = context.space_data
|
||||||
clip = sc.clip
|
clip = sc.clip
|
||||||
|
|
||||||
|
@ -39,10 +39,7 @@ class CONSOLE_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
layout.menu("CONSOLE_MT_console")
|
layout.menu("CONSOLE_MT_console")
|
||||||
|
|
||||||
|
|
||||||
|
@ -295,10 +295,7 @@ class DOPESHEET_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
st = context.space_data
|
st = context.space_data
|
||||||
|
|
||||||
layout.menu("DOPESHEET_MT_view")
|
layout.menu("DOPESHEET_MT_view")
|
||||||
|
@ -96,10 +96,7 @@ class GRAPH_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
layout.menu("GRAPH_MT_view")
|
layout.menu("GRAPH_MT_view")
|
||||||
layout.menu("GRAPH_MT_select")
|
layout.menu("GRAPH_MT_select")
|
||||||
layout.menu("GRAPH_MT_marker")
|
layout.menu("GRAPH_MT_marker")
|
||||||
|
@ -606,10 +606,7 @@ class MASK_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
sima = context.space_data
|
sima = context.space_data
|
||||||
ima = sima.image
|
ima = sima.image
|
||||||
|
|
||||||
|
@ -72,10 +72,7 @@ class NLA_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
layout.menu("NLA_MT_view")
|
layout.menu("NLA_MT_view")
|
||||||
layout.menu("NLA_MT_select")
|
layout.menu("NLA_MT_select")
|
||||||
layout.menu("NLA_MT_marker")
|
layout.menu("NLA_MT_marker")
|
||||||
|
@ -166,10 +166,7 @@ class NODE_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
layout.menu("NODE_MT_view")
|
layout.menu("NODE_MT_view")
|
||||||
layout.menu("NODE_MT_select")
|
layout.menu("NODE_MT_select")
|
||||||
layout.menu("NODE_MT_add")
|
layout.menu("NODE_MT_add")
|
||||||
|
@ -90,10 +90,7 @@ class OUTLINER_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
space = context.space_data
|
space = context.space_data
|
||||||
|
|
||||||
if space.display_mode == 'DATA_API':
|
if space.display_mode == 'DATA_API':
|
||||||
|
@ -136,10 +136,7 @@ class SEQUENCER_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
st = context.space_data
|
st = context.space_data
|
||||||
|
|
||||||
layout.menu("SEQUENCER_MT_view")
|
layout.menu("SEQUENCER_MT_view")
|
||||||
|
@ -91,10 +91,7 @@ class TEXT_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
st = context.space_data
|
st = context.space_data
|
||||||
text = st.text
|
text = st.text
|
||||||
|
|
||||||
|
@ -87,10 +87,8 @@ class TIME_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context, horizontal=False)
|
layout = self.layout
|
||||||
|
horizontal = layout.direction == 'HORIZONTAL'
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context, horizontal=True):
|
|
||||||
if horizontal:
|
if horizontal:
|
||||||
row = layout.row()
|
row = layout.row()
|
||||||
sub = row.row(align=True)
|
sub = row.row(align=True)
|
||||||
|
@ -571,10 +571,7 @@ class TOPBAR_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
layout.menu("TOPBAR_MT_file")
|
layout.menu("TOPBAR_MT_file")
|
||||||
layout.menu("TOPBAR_MT_edit")
|
layout.menu("TOPBAR_MT_edit")
|
||||||
|
|
||||||
|
@ -291,10 +291,7 @@ class VIEW3D_MT_editor_menus(Menu):
|
|||||||
bl_label = ""
|
bl_label = ""
|
||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
self.draw_menus(self.layout, context)
|
layout = self.layout
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def draw_menus(layout, context):
|
|
||||||
obj = context.active_object
|
obj = context.active_object
|
||||||
mode_string = context.mode
|
mode_string = context.mode
|
||||||
edit_object = context.edit_object
|
edit_object = context.edit_object
|
||||||
|
Loading…
Reference in New Issue
Block a user