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
This commit is contained in:
parent
d754d85845
commit
5d42ea0369
Notes:
blender-bot
2023-02-14 10:11:49 +01:00
Referenced by commit 74ef424cb7
, Revert "GPencil: Change default template for better contrast in header"
Referenced by issue #92194, Loading 2D Animation template changes the theme
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue