Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-06-16 19:26:34 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-06-16 19:27:04 +0300
commitc21499ba4a53d98a80a0251d770399ef0521d3e9 (patch)
tree71fd496f9aa8eb29e5f89d1117ebe1e9e2e7c413 /source/blender/editors/interface/interface_anim.c
parent3b7f630a54164285ab4d72cf1ffb77f3a5f9e19b (diff)
UI: show decorator icon for static-override
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r--source/blender/editors/interface/interface_anim.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c
index 6a0dfcb5353..f2b6ef03d98 100644
--- a/source/blender/editors/interface/interface_anim.c
+++ b/source/blender/editors/interface/interface_anim.c
@@ -101,22 +101,26 @@ void ui_but_anim_flag(uiBut *but, float cfra)
but->flag |= UI_BUT_DRIVEN;
}
}
+}
- if (but->next && UI_but_is_decorator(but->next)) {
- uiBut *but_decor = but->next;
- int flag = but->flag;
- if (flag & UI_BUT_DRIVEN) {
- but_decor->icon = ICON_AUTO;
- }
- else if (flag & UI_BUT_ANIMATED_KEY) {
- but_decor->icon = ICON_SPACE2;
- }
- else if (flag & UI_BUT_ANIMATED) {
- but_decor->icon = ICON_SPACE3;
- }
- else {
- but_decor->icon = ICON_DOT;
- }
+void ui_but_anim_decorate_update_from_flag(uiBut *but)
+{
+ BLI_assert(UI_but_is_decorator(but) && but->prev);
+ int flag = but->prev->flag;
+ if (flag & UI_BUT_DRIVEN) {
+ but->icon = ICON_AUTO;
+ }
+ else if (flag & UI_BUT_ANIMATED_KEY) {
+ but->icon = ICON_SPACE2;
+ }
+ else if (flag & UI_BUT_ANIMATED) {
+ but->icon = ICON_SPACE3;
+ }
+ else if (flag & UI_BUT_OVERRIDEN) {
+ but->icon = ICON_LIBRARY_DATA_OVERRIDE;
+ }
+ else {
+ but->icon = ICON_DOT;
}
}