Page MenuHome

Action editor key frames not displaying sometimes
Confirmed, NormalPublicKNOWN ISSUE

Description

Sometimes when working with multiply animations and switching through them in the action editor. The Keyframes stop displaying for certain action.
When the Panel with the action editor View is removed and added again, the displaying is working again.
This bug was seen in Version 2.76 and daily Build from 10/30/2015.

Error:


Fixed after closing and opening action editor view

My Project without Mesh. Bug is seen in walk_back_cycle action.

This bug is very annoying in my workflow.

Greetings and thank you for your work!

Related Objects

Event Timeline

Viktor (codenigma) raised the priority of this task from to High.
Viktor (codenigma) updated the task description. (Show Details)
Viktor (codenigma) edited a custom field.

Please don't set priority on you own, this should be handled by devs.

Julian Eisel (Severin) raised the priority of this task from High to 90.Oct 30 2015, 9:59 PM
Joshua Leung (aligorith) lowered the priority of this task from 90 to Normal.Oct 31 2015, 1:32 AM

From the screenshots, it looks like a case of the view being scrolled all the way down (see scrollbar on the far right), which can happen when the previous action had more channels than the current one does.

It should be a matter of ensuring that the view2d gets reset in these cases, though this is complicated by not actually knowing how large the new set of channels is until they've been drawn once.

Julian, we are after release now, care to handle this one? ;)

Something like this would work:

1diff --git a/source/blender/editors/include/UI_view2d.h b/source/blender/editors/include/UI_view2d.h
2index 4caacb6..3d8d378 100644
3--- a/source/blender/editors/include/UI_view2d.h
4+++ b/source/blender/editors/include/UI_view2d.h
5@@ -231,7 +231,7 @@ void UI_view2d_text_cache_draw(struct ARegion *ar);
6 void ED_operatortypes_view2d(void);
7 void ED_keymap_view2d(struct wmKeyConfig *keyconf);
8
9-void UI_view2d_smooth_view(struct bContext *C, struct ARegion *ar,
10+void UI_view2d_smooth_view(const struct bContext *C, struct ARegion *ar,
11 const struct rctf *cur, const int smooth_viewtx);
12 #define UI_MARKER_MARGIN_Y (42 * UI_DPI_FAC)
13
14diff --git a/source/blender/editors/interface/view2d_ops.c b/source/blender/editors/interface/view2d_ops.c
15index f60fed3..cb52b77 100644
16--- a/source/blender/editors/interface/view2d_ops.c
17+++ b/source/blender/editors/interface/view2d_ops.c
18@@ -1420,7 +1420,7 @@ static float smooth_view_rect_to_fac(const rctf *rect_a, const rctf *rect_b)
19 /* will start timer if appropriate */
20 /* the arguments are the desired situation */
21 void UI_view2d_smooth_view(
22- bContext *C, ARegion *ar,
23+ const bContext *C, ARegion *ar,
24 const rctf *cur, const int smooth_viewtx)
25 {
26 wmWindowManager *wm = CTX_wm_manager(C);
27diff --git a/source/blender/editors/space_action/action_edit.c b/source/blender/editors/space_action/action_edit.c
28index b69547b..0520159 100644
29--- a/source/blender/editors/space_action/action_edit.c
30+++ b/source/blender/editors/space_action/action_edit.c
31@@ -1763,3 +1763,21 @@ void ACTION_OT_mirror(wmOperatorType *ot)
32 }
33
34 /* ************************************************************************** */
35+/* NON-OPERATOR STUFF */
36+
37+void action_view_ensure(const bContext *C, ARegion *ar, SpaceAction *saction)
38+{
39+ static bAction *last_action = NULL;
40+
41+ if (!last_action || last_action != saction->action) { /* view has just been initialized or changed */
42+ if (!ar->v2d.sms && ar->v2d.cur.ymax < ar->v2d.tot.ymin) {
43+ rctf rect = ar->v2d.cur;
44+ rect.ymin = ar->v2d.tot.ymin;
45+ rect.ymax = rect.ymin + ar->winy;
46+
47+ UI_view2d_smooth_view(C, ar, &rect, U.smooth_viewtx);
48+ }
49+ last_action = saction->action;
50+ }
51+}
52+
53diff --git a/source/blender/editors/space_action/action_intern.h b/source/blender/editors/space_action/action_intern.h
54index 17f1f40..b88d3d7 100644
55--- a/source/blender/editors/space_action/action_intern.h
56+++ b/source/blender/editors/space_action/action_intern.h
57@@ -129,7 +129,9 @@ enum eActKeys_Mirror_Mode {
58 ACTKEYS_MIRROR_XAXIS,
59 ACTKEYS_MIRROR_MARKER,
60 };
61-
62+
63+void action_view_ensure(const struct bContext *C, struct ARegion *ar, struct SpaceAction *saction);
64+
65 /* ***************************************** */
66 /* action_ops.c */
67 void action_operatortypes(void);
68diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c
69index 53c5a00..c444305 100644
70--- a/source/blender/editors/space_action/space_action.c
71+++ b/source/blender/editors/space_action/space_action.c
72@@ -216,6 +216,8 @@ static void action_main_region_draw(const bContext *C, ARegion *ar)
73 scrollers = UI_view2d_scrollers_calc(C, v2d, unit, V2D_GRID_CLAMP, V2D_ARG_DUMMY, V2D_ARG_DUMMY);
74 UI_view2d_scrollers_draw(C, v2d, scrollers);
75 UI_view2d_scrollers_free(scrollers);
76+
77+ action_view_ensure(C, ar, saction);
78 }
79
80 /* add handlers, stuff you only do once or on area/region changes */

Ugly, but it works ;)
It's only checking vertical offset currently, could add for horizontal too.

Sybren A. Stüvel (sybren) changed the subtype of this task from "Report" to "Known Issue".

This is a known architecture/design limitation of the GUI, so marking as Known Issue.

@Julian Eisel (Severin) IIRC we've had more list panels auto-scroll into view. Do you think such an approach could be easily applied here too? If it is, please include this in your planning.

PS: if this is not something easy/quick to do, feel free to close it as architecture/design limitation.