Fix splash screen issue on disabling add-on, by re-registering the original splash class, in unregister phase
This commit is contained in:
parent
2992585cd5
commit
06bde7a6b3
@ -46,7 +46,11 @@ classes = [WM_MT_splash,
|
||||
OT_SelectTemplatePopup,
|
||||
CustomTemplatesPreferences]
|
||||
|
||||
original_splash = None;
|
||||
|
||||
def register():
|
||||
global original_splash
|
||||
original_splash = bpy.types.WM_MT_splash;
|
||||
for c in classes:
|
||||
bpy.utils.register_class(c)
|
||||
bpy.types.TOPBAR_MT_file_new.append(draw_file_new_templates)
|
||||
@ -55,6 +59,7 @@ def register():
|
||||
def unregister():
|
||||
for c in reversed(classes):
|
||||
bpy.utils.unregister_class(c)
|
||||
bpy.utils.register_class(original_splash)
|
||||
bpy.types.TOPBAR_MT_file_new.remove(draw_file_new_templates)
|
||||
bpy.types.TOPBAR_MT_file_defaults.remove(draw_file_default_operators)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user