diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-09-30 16:28:44 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-09-30 17:14:44 +0300 |
commit | 5d42ea036999a7e82dbc03947968f4ad61093d06 (patch) | |
tree | 5b1ff24bc447121c0f25a481711a3c273d55eca2 /release/scripts | |
parent | d754d8584528331eac4918413ced8239d2a9c5ed (diff) |
GPencil: Change default template for better contrast in header
Patch created by Pablo Vazquez
This change darkens the header area a bit to create more contrast with the texts.
Differential Revision: https://developer.blender.org/D12711
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py index c8328f5ee42..f8b504b2e34 100644 --- a/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py +++ b/release/scripts/startup/bl_app_templates_system/2D_Animation/__init__.py @@ -54,11 +54,26 @@ def update_factory_startup_grease_pencils(): gpd.onion_keyframe_type = 'ALL' +def update_factory_startup_theme(): + # To prevent saving over the current theme Preferences, + # store the current state of use_preferences_save to use later. + preferences = bpy.context.preferences + save_preferences_state = preferences.use_preferences_save + + # Turn use_preferences_save off and set header background alpha. + preferences.use_preferences_save = False + preferences.themes['Default'].view_3d.space.header[3] = 0.8 + + # Restore the original use_preferences_save status. + preferences.use_preferences_save = save_preferences_state + + @persistent def load_handler(_): update_factory_startup_screens() update_factory_startup_scenes() update_factory_startup_grease_pencils() + update_factory_startup_theme() def register(): |