UI: Multicolor Autokeying Indicator
Show the autokeying indicator (record button) on the Timeline header in red when enabled. With a white outline on dark theme, or with a black outline on light theme. The red color is user changeable. Pull Request: https://projects.blender.org/blender/blender/pulls/126344
This commit is contained in:
committed by
Harley Acheson
parent
6932351e23
commit
aa78d43a05
@@ -1 +1 @@
|
||||
<svg id="svg2" height="1200" viewBox="0 0 1200 1200" width="1200" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><g><g id="blender.red_alert" fill="#ffffff" transform="matrix(1 0 0 .99407813 0 5.93843)"><path id="path1" d="m599.97471 191.39126c-220.28631 0-403.19327 185.73026-403.19327 406.16752 0 229.42349 172.48512 404.04942 403.19327 404.04942 230.70813 0 401.14369-178.37144 401.89049-404.04942.7445-224.93037-181.60419-406.16752-401.89049-406.16752z" stroke-width="79.9717"/></g><g id="blender.text" fill="#ffffff" opacity=".8"><path id="path1-1" d="m599.88703 100.19229c-275.55 0-499.81389 224.2639-499.81389 499.8139s224.26389 499.81391 499.81389 499.81391 499.81387-224.45002 499.81387-500.00002-224.26387-499.62779-499.81387-499.62779zm0 99.62779c221.506 0 400.18607 178.68011 400.18607 400.18611s-178.68007 400.18611-400.18607 400.18611-400.55831-175.88855-400.55831-397.39455 179.05231-402.97767 400.55831-402.97767z" stroke-width="100"/></g></g></svg>
|
||||
<svg id="svg2" height="1200" viewBox="0 0 1200 1200" width="1200" xmlns="http://www.w3.org/2000/svg" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"><sodipodi:namedview pagecolor="#303030" showgrid="true"><inkscape:grid id="grid5" units="px" spacingx="100" spacingy="100" color="#4772b3" opacity="0.2" visible="true" /></sodipodi:namedview><g><g id="blender.autokey" fill="#ffffff" transform="matrix(1 0 0 .99407813 0 5.93843)"><path id="path1" d="m599.97471 191.39126c-220.28631 0-403.19327 185.73026-403.19327 406.16752 0 229.42349 172.48512 404.04942 403.19327 404.04942 230.70813 0 401.14369-178.37144 401.89049-404.04942.7445-224.93037-181.60419-406.16752-401.89049-406.16752z" stroke-width="79.9717"/></g><g id="blender.text" fill="#ffffff" opacity=".8"><path id="path1-1" d="m599.88703 100.19229c-275.55 0-499.81389 224.2639-499.81389 499.8139s224.26389 499.81391 499.81389 499.81391 499.81387-224.45002 499.81387-500.00002-224.26387-499.62779-499.81387-499.62779zm0 99.62779c221.506 0 400.18607 178.68011 400.18607 400.18611s-178.68007 400.18611-400.18607 400.18611-400.55831-175.88855-400.55831-397.39455 179.05231-402.97767 400.55831-402.97767z" stroke-width="100"/></g></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -244,6 +244,7 @@ const bTheme U_theme_default = {
|
||||
.icon_modifier = RGBA(0x74a2ffff),
|
||||
.icon_shading = RGBA(0xcc6670ff),
|
||||
.icon_folder = RGBA(0xccad63ff),
|
||||
.icon_autokey = RGBA(0xab3c48ff),
|
||||
.panel_roundness = 0.4f,
|
||||
},
|
||||
.space_properties = {
|
||||
|
||||
@@ -1203,6 +1203,7 @@ class USERPREF_PT_theme_interface_icons(ThemePanel, CenterAlignMixIn, Panel):
|
||||
flow.prop(ui, "icon_modifier")
|
||||
flow.prop(ui, "icon_shading")
|
||||
flow.prop(ui, "icon_folder")
|
||||
flow.prop(ui, "icon_autokey")
|
||||
flow.prop(ui, "icon_border_intensity")
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ extern "C" {
|
||||
|
||||
/* Blender file format version. */
|
||||
#define BLENDER_FILE_VERSION BLENDER_VERSION
|
||||
#define BLENDER_FILE_SUBVERSION 17
|
||||
#define BLENDER_FILE_SUBVERSION 18
|
||||
|
||||
/* Minimum Blender version that supports reading file written with the current
|
||||
* version. Older Blender versions will test this and cancel loading the file, showing a warning to
|
||||
|
||||
@@ -190,6 +190,10 @@ static void do_versions_theme(const UserDef *userdef, bTheme *btheme)
|
||||
FROM_DEFAULT_V4_UCHAR(space_sequencer.after_current_frame);
|
||||
}
|
||||
|
||||
if (!USER_VERSION_ATLEAST(403, 18)) {
|
||||
FROM_DEFAULT_V4_UCHAR(tui.icon_autokey);
|
||||
}
|
||||
|
||||
/**
|
||||
* Always bump subversion in BKE_blender_version.h when adding versioning
|
||||
* code here, and wrap it inside a USER_VERSION_ATLEAST check.
|
||||
|
||||
@@ -137,7 +137,7 @@ DEF_ICON_SCENE(TOOL_SETTINGS)
|
||||
DEF_ICON_MODIFIER(SHADERFX)
|
||||
DEF_ICON_MODIFIER(MODIFIER)
|
||||
DEF_ICON(RECORD_OFF)
|
||||
DEF_ICON(RECORD_ON)
|
||||
DEF_ICON_COLOR(RECORD_ON)
|
||||
DEF_ICON(BLANK1) /* Not actually blank - this is used all over the place */
|
||||
DEF_ICON(FAKE_USER_OFF)
|
||||
DEF_ICON(FAKE_USER_ON)
|
||||
|
||||
@@ -297,6 +297,7 @@ enum ThemeColorID {
|
||||
TH_ICON_MODIFIER,
|
||||
TH_ICON_SHADING,
|
||||
TH_ICON_FOLDER,
|
||||
TH_ICON_AUTOKEY,
|
||||
TH_ICON_FUND,
|
||||
|
||||
TH_SCROLL_TEXT,
|
||||
|
||||
@@ -1344,6 +1344,7 @@ static void svg_replace_color_attributes(std::string &svg,
|
||||
{"blender.shading", nullptr, TH_ICON_SHADING},
|
||||
{"blender.folder", nullptr, TH_ICON_FOLDER},
|
||||
{"blender.fund", nullptr, TH_ICON_FUND},
|
||||
{"blender.autokey", nullptr, TH_ICON_AUTOKEY},
|
||||
{"blender.tool_add", tool_add},
|
||||
{"blender.tool_remove", tool_remove},
|
||||
{"blender.tool_select", tool_select},
|
||||
|
||||
@@ -1013,6 +1013,9 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
||||
case TH_ICON_FOLDER:
|
||||
cp = btheme->tui.icon_folder;
|
||||
break;
|
||||
case TH_ICON_AUTOKEY:
|
||||
cp = btheme->tui.icon_autokey;
|
||||
break;
|
||||
case TH_ICON_FUND: {
|
||||
/* Development fund icon color is not part of theme. */
|
||||
static const uchar red[4] = {204, 48, 72, 255};
|
||||
|
||||
@@ -202,6 +202,9 @@ typedef struct ThemeUI {
|
||||
unsigned char icon_shading[4];
|
||||
/** File folders. */
|
||||
unsigned char icon_folder[4];
|
||||
/** Auto Keying indicator. */
|
||||
unsigned char icon_autokey[4];
|
||||
char _pad3[4];
|
||||
/** Intensity of the border icons. >0 will render an border around themed
|
||||
* icons. */
|
||||
float icon_border_intensity;
|
||||
|
||||
@@ -2021,6 +2021,13 @@ static void rna_def_userdef_theme_ui(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "File Folders", "Color of folders in the file browser");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "icon_autokey", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "icon_autokey");
|
||||
RNA_def_property_array(prop, 4);
|
||||
RNA_def_property_ui_text(
|
||||
prop, "Auto Keying Indicator", "Color of Auto Keying indicator when enabled");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_gpu_update");
|
||||
|
||||
prop = RNA_def_property(srna, "icon_border_intensity", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_float_sdna(prop, nullptr, "icon_border_intensity");
|
||||
RNA_def_property_ui_text(
|
||||
|
||||
Reference in New Issue
Block a user