Commit: 7dc2a5a2676ec6169a38b5e6654f46547d1080df Author: Brecht Van Lommel Date: Wed Oct 10 18:11:11 2018 +0200 Branches: blender2.8 https://developer.blender.org/rB7dc2a5a2676ec6169a38b5e6654f46547d1080df
Fix T57144: saving theme presets not working after recent changes. =================================================================== M release/scripts/startup/bl_operators/presets.py M release/scripts/startup/bl_ui/space_userpref.py =================================================================== diff --git a/release/scripts/startup/bl_operators/presets.py b/release/scripts/startup/bl_operators/presets.py index 59bcae2a789..9d64c02d1ca 100644 --- a/release/scripts/startup/bl_operators/presets.py +++ b/release/scripts/startup/bl_operators/presets.py @@ -242,8 +242,8 @@ class ExecutePreset(Operator): self.report({'ERROR'}, "unknown filetype: %r" % ext) return {'CANCELLED'} - if hasattr(preset_class, "pre_cb"): - preset_class.pre_cb(context) + if hasattr(preset_class, "reset_cb"): + preset_class.reset_cb(context) # execute the preset using script.python_file_run if ext == ".py": @@ -571,9 +571,6 @@ class AddPresetInterfaceTheme(AddPresetBase, Operator): preset_menu = "USERPREF_MT_interface_theme_presets" preset_subdir = "interface_theme" - def pre_cb(self, context): - bpy.ops.ui.reset_default_theme() - class AddPresetKeyconfig(AddPresetBase, Operator): """Add or remove a Key-config Preset""" diff --git a/release/scripts/startup/bl_ui/space_userpref.py b/release/scripts/startup/bl_ui/space_userpref.py index 21c2e32e932..d4cce81ea86 100644 --- a/release/scripts/startup/bl_ui/space_userpref.py +++ b/release/scripts/startup/bl_ui/space_userpref.py @@ -505,7 +505,7 @@ class USERPREF_MT_interface_theme_presets(Menu): ) draw = Menu.draw_preset - def pre_cb(context): + def reset_cb(context): bpy.ops.ui.reset_default_theme() _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs