From a4a1074f3d2411a562c5cd4d5ebee6d92a1f0a27 Mon Sep 17 00:00:00 2001 From: Michael Soluyanov Date: Tue, 25 Feb 2020 15:09:30 +0100 Subject: UI: Add theme option for time markers line This patch adds the ability to set colors and alpha of dashed line of Time Markers. That way themes can avoid contrast issues and communicate selection better. See screenshots in D6877. Bumps subversion. Reviewed By: William Reynish, Julian Eisel Differential Revision: https://developer.blender.org/D6877 --- source/blender/blenloader/intern/versioning_280.c | 26 ++++++++++++---------- .../blender/blenloader/intern/versioning_userdef.c | 13 +++++++++++ 2 files changed, 27 insertions(+), 12 deletions(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index d0fad1aafab..627b38a58e8 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -4466,18 +4466,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } - /** - * Versioning code until next subversion bump goes here. - * - * \note Be sure to check when bumping the version: - * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend - * - "versioning_userdef.c", #do_versions_theme - * - * \note Keep this message at the bottom of the function. - */ - { - /* Keep this block, even when empty. */ - + if (!MAIN_VERSION_ATLEAST(bmain, 283, 5)) { /* Alembic Transform Cache changed from world to local space. */ LISTBASE_FOREACH (Object *, ob, &bmain->objects) { LISTBASE_FOREACH (bConstraint *, con, &ob->constraints) { @@ -4513,4 +4502,17 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain) } } } + + /** + * Versioning code until next subversion bump goes here. + * + * \note Be sure to check when bumping the version: + * - "versioning_userdef.c", #BLO_version_defaults_userpref_blend + * - "versioning_userdef.c", #do_versions_theme + * + * \note Keep this message at the bottom of the function. + */ + { + /* Keep this block, even when empty. */ + } } diff --git a/source/blender/blenloader/intern/versioning_userdef.c b/source/blender/blenloader/intern/versioning_userdef.c index 94ee8d46675..f70988c9277 100644 --- a/source/blender/blenloader/intern/versioning_userdef.c +++ b/source/blender/blenloader/intern/versioning_userdef.c @@ -175,6 +175,19 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme) FROM_DEFAULT_V4_UCHAR(space_info.info_operator_text); } + if (!USER_VERSION_ATLEAST(283, 5)) { + FROM_DEFAULT_V4_UCHAR(space_graph.time_marker_line); + FROM_DEFAULT_V4_UCHAR(space_action.time_marker_line); + FROM_DEFAULT_V4_UCHAR(space_nla.time_marker_line); + FROM_DEFAULT_V4_UCHAR(space_sequencer.time_marker_line); + FROM_DEFAULT_V4_UCHAR(space_clip.time_marker_line); + FROM_DEFAULT_V4_UCHAR(space_graph.time_marker_line_selected); + FROM_DEFAULT_V4_UCHAR(space_action.time_marker_line_selected); + FROM_DEFAULT_V4_UCHAR(space_nla.time_marker_line_selected); + FROM_DEFAULT_V4_UCHAR(space_sequencer.time_marker_line_selected); + FROM_DEFAULT_V4_UCHAR(space_clip.time_marker_line_selected); + } + /** * Versioning code until next subversion bump goes here. * -- cgit v1.2.3