Fix #119534: Action Editor empty channels region without active action
Caused by a96f1208cc
For `SPACE_ACTION` (`SACTCONT_ACTION`), `actedit_get_context` will
return true, but `ANIM_animdata_context_getdata` also checks the
`bAnimContext` data [which in this case is the action], so will **not**
return true.
As a result we are skipping drawing the background and the search, which
is now done again.
Pull Request: https://projects.blender.org/blender/blender/pulls/119621
This commit is contained in:
committed by
Philipp Oeser
parent
c0c7e34bab
commit
4a7c5d3d3d
@@ -283,15 +283,20 @@ static void action_channel_region_draw(const bContext *C, ARegion *region)
|
||||
{
|
||||
/* draw entirely, view changes should be handled here */
|
||||
bAnimContext ac;
|
||||
if (!ANIM_animdata_get_context(C, &ac)) {
|
||||
const bool has_valid_animcontext = ANIM_animdata_get_context(C, &ac);
|
||||
|
||||
/* clear and setup matrix */
|
||||
UI_ThemeClearColor(TH_BACK);
|
||||
|
||||
/* channel filter next to scrubbing area */
|
||||
ED_time_scrub_channel_search_draw(C, region, ac.ads);
|
||||
|
||||
if (!has_valid_animcontext) {
|
||||
return;
|
||||
}
|
||||
|
||||
View2D *v2d = ®ion->v2d;
|
||||
|
||||
/* clear and setup matrix */
|
||||
UI_ThemeClearColor(TH_BACK);
|
||||
|
||||
ListBase anim_data = {nullptr, nullptr};
|
||||
/* Build list of channels to draw. */
|
||||
const eAnimFilter_Flags filter = (ANIMFILTER_DATA_VISIBLE | ANIMFILTER_LIST_VISIBLE |
|
||||
@@ -305,9 +310,6 @@ static void action_channel_region_draw(const bContext *C, ARegion *region)
|
||||
UI_view2d_view_ortho(v2d);
|
||||
draw_channel_names((bContext *)C, &ac, region, anim_data);
|
||||
|
||||
/* channel filter next to scrubbing area */
|
||||
ED_time_scrub_channel_search_draw(C, region, ac.ads);
|
||||
|
||||
/* reset view matrix */
|
||||
UI_view2d_view_restore(C);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user