diff --git a/addon/classes/draw.py b/addon/classes/draw.py index 9713a70..a95f53e 100644 --- a/addon/classes/draw.py +++ b/addon/classes/draw.py @@ -12,7 +12,6 @@ def draw_file_new_templates(self, context): if len(prefs.projects) > 0: draw_addon_separator(layout) draw_templates_on_col(layout, context) - def draw_templates_on_col(layout, context, splash_mode = False): layout.operator_context = 'INVOKE_DEFAULT' @@ -23,7 +22,6 @@ def draw_templates_on_col(layout, context, splash_mode = False): layout.operator( "wm.read_homefile", text=project.name, icon="FILE_NEW" if splash_mode else "NONE").filepath = project.path - def draw_file_default_operators(self, context): layout = self.layout draw_addon_separator(layout) @@ -39,4 +37,5 @@ def draw_file_default_operators(self, context): # Use current as new template (only with an active saved .blend file opened) if bpy.data.filepath != "": layout.operator("custom_templates.add_template_popup", - text="Use current as new template") \ No newline at end of file + text="Use current as new template") + \ No newline at end of file diff --git a/addon/classes/splash.py b/addon/classes/splash.py index 59edcd7..97b8c2d 100644 --- a/addon/classes/splash.py +++ b/addon/classes/splash.py @@ -1,13 +1,12 @@ +# Ref WM_MT_splash https://projects.blender.org/blender/blender/src/commit/5a9fe638dedb179050c4929ea8fcdec80d221af2/scripts/startup/bl_operators/wm.py#L3296 +# Ref TOPBAR_MT_file_new https://projects.blender.org/blender/blender/src/commit/5a9fe638dedb179050c4929ea8fcdec80d221af2/scripts/startup/bl_ui/space_topbar.py#L286 from .. import __package__ as base_package from .draw import draw_templates_on_col import bpy - -# Ref WM_MT_splash https://projects.blender.org/blender/blender/src/commit/5a9fe638dedb179050c4929ea8fcdec80d221af2/scripts/startup/bl_operators/wm.py#L3296 -# Ref TOPBAR_MT_file_new https://projects.blender.org/blender/blender/src/commit/5a9fe638dedb179050c4929ea8fcdec80d221af2/scripts/startup/bl_ui/space_topbar.py#L286 - -# This is a python clone of the WM_MT_splash (the section under the image of the Splash) -# It's edited (only in #Templates part) to add a menu in the New File section to switch between blender's original templates and Custom Templates. -# Without custom templates, the default templates are displayed +# Clone of the WM_MT_splash (the section under the image of the Splash) +# It's edited (only in #Templates part) to add a menu in the New File section +# to switch between blender's original templates and Custom Templates. +# If you have no custom templates, the default templates are displayed class WM_MT_splash(bpy.types.Menu): bl_label="Splash"