Cleanup: remove intermediate menu drawing function
authorCampbell Barton <ideasman42@gmail.com>
Thu, 20 Dec 2018 01:02:21 +0000 (12:02 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 20 Dec 2018 01:02:21 +0000 (12:02 +1100)
13 files changed:
release/scripts/startup/bl_ui/space_clip.py
release/scripts/startup/bl_ui/space_console.py
release/scripts/startup/bl_ui/space_dopesheet.py
release/scripts/startup/bl_ui/space_graph.py
release/scripts/startup/bl_ui/space_image.py
release/scripts/startup/bl_ui/space_nla.py
release/scripts/startup/bl_ui/space_node.py
release/scripts/startup/bl_ui/space_outliner.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_text.py
release/scripts/startup/bl_ui/space_time.py
release/scripts/startup/bl_ui/space_topbar.py
release/scripts/startup/bl_ui/space_view3d.py

index 8da033b3a3f1e7cca310ee0fe86ef12397eb93ff..5ec80a59f51ee72eed9567b113f2b6b78a279af4 100644 (file)
@@ -283,10 +283,7 @@ class CLIP_MT_tracking_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         sc = context.space_data
         clip = sc.clip
 
@@ -308,10 +305,7 @@ class CLIP_MT_masking_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         sc = context.space_data
         clip = sc.clip
 
index dd5ab03fcba5d7f04aed403852164929d4ec2b70..06349abaaf0c1a47b8acb73d31dfc4dbc8edcca5 100644 (file)
@@ -39,10 +39,7 @@ class CONSOLE_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         layout.menu("CONSOLE_MT_console")
 
 
index f35dea678549f190dcd92994ce74282c33158911..47c5de861cabf0b9f11fe36d5d095bee6c2d16fc 100644 (file)
@@ -295,10 +295,7 @@ class DOPESHEET_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         st = context.space_data
 
         layout.menu("DOPESHEET_MT_view")
index ee3f5de0f09032928bf75af9004a00f31d455ec1..67fe7b22b05af8c711a9228263cadddc6fc752b8 100644 (file)
@@ -96,10 +96,7 @@ class GRAPH_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         layout.menu("GRAPH_MT_view")
         layout.menu("GRAPH_MT_select")
         layout.menu("GRAPH_MT_marker")
index 986423a1c580a0e1ab3e9a7e231f643a863cec95..38045a9de5eb75ec8f9e78964f0e6c9a0501bd45 100644 (file)
@@ -606,10 +606,7 @@ class MASK_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         sima = context.space_data
         ima = sima.image
 
index a31790970469a1cad1c8aeb15a8e17d5aac61077..121490b3fcd4f69b02a3171d3bf67688cba074dc 100644 (file)
@@ -72,10 +72,7 @@ class NLA_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         layout.menu("NLA_MT_view")
         layout.menu("NLA_MT_select")
         layout.menu("NLA_MT_marker")
index c5718df3b926f140b5a8565e197121d0ed6ef2db..6b407daaccb2470058768bffb72a94504c49609b 100644 (file)
@@ -166,10 +166,7 @@ class NODE_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         layout.menu("NODE_MT_view")
         layout.menu("NODE_MT_select")
         layout.menu("NODE_MT_add")
index 877b81f26ae4d4a6d5d9437c9ab27538a0acb5b3..4ab990c451b7c2556066e09f082433488b638929 100644 (file)
@@ -90,10 +90,7 @@ class OUTLINER_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         space = context.space_data
 
         if space.display_mode == 'DATA_API':
index adac167a06d5d1d333898cd7c51cfe21d7dabf67..a018a64e91c504f19ee8df8196e9b52a264bcfd2 100644 (file)
@@ -136,10 +136,7 @@ class SEQUENCER_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         st = context.space_data
 
         layout.menu("SEQUENCER_MT_view")
index 19b72b99c36881a984b21450112ae11c7e776cab..e7ead3f8196c0c46c3df24355202666ea2086715 100644 (file)
@@ -91,10 +91,7 @@ class TEXT_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         st = context.space_data
         text = st.text
 
index 47c8381001ef7a95bf43641c3d6ee0b48a5f041a..41a1f60c9534cf1cd692f6d83817407d023a3134 100644 (file)
@@ -87,10 +87,8 @@ class TIME_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context, horizontal=False)
-
-    @staticmethod
-    def draw_menus(layout, context, horizontal=True):
+        layout = self.layout
+        horizontal = layout.direction == 'HORIZONTAL'
         if horizontal:
             row = layout.row()
             sub = row.row(align=True)
index ee5bdb38db74c728ab95668613fc784da4ea3bf8..7b666d86dc1f44eaf1a659fd5b5b960e39d46fa3 100644 (file)
@@ -571,10 +571,7 @@ class TOPBAR_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         layout.menu("TOPBAR_MT_file")
         layout.menu("TOPBAR_MT_edit")
 
index 7922cdb90ec96ac4be99eee366473b5ff6d0b7ba..d6f27a3e0bc2cf9654c69d3fcfe46e68b3f6e5aa 100644 (file)
@@ -291,10 +291,7 @@ class VIEW3D_MT_editor_menus(Menu):
     bl_label = ""
 
     def draw(self, context):
-        self.draw_menus(self.layout, context)
-
-    @staticmethod
-    def draw_menus(layout, context):
+        layout = self.layout
         obj = context.active_object
         mode_string = context.mode
         edit_object = context.edit_object