Fix T55197: Dopesheet filtering settings were not triggering refresh anymore due to messagebus crap
This commit is contained in:
@@ -379,6 +379,41 @@ static void action_channel_region_listener(
|
||||
}
|
||||
}
|
||||
|
||||
static void saction_channel_region_message_subscribe(
|
||||
const struct bContext *UNUSED(C),
|
||||
struct WorkSpace *UNUSED(workspace), struct Scene *UNUSED(scene),
|
||||
struct bScreen *screen, struct ScrArea *sa, struct ARegion *ar,
|
||||
struct wmMsgBus *mbus)
|
||||
{
|
||||
PointerRNA ptr;
|
||||
RNA_pointer_create(&screen->id, &RNA_SpaceDopeSheetEditor, sa->spacedata.first, &ptr);
|
||||
|
||||
wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
|
||||
.owner = ar,
|
||||
.user_data = ar,
|
||||
.notify = ED_region_do_msg_notify_tag_redraw,
|
||||
};
|
||||
|
||||
/* All dopesheet filter settings, etc. affect the drawing of this editor,
|
||||
* so just whitelist the entire struct for updates
|
||||
*/
|
||||
{
|
||||
wmMsgParams_RNA msg_key_params = {{{0}}};
|
||||
StructRNA *type_array[] = {
|
||||
&RNA_DopeSheet,
|
||||
};
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(type_array); i++) {
|
||||
msg_key_params.ptr.type = type_array[i];
|
||||
WM_msg_subscribe_rna_params(
|
||||
mbus,
|
||||
&msg_key_params,
|
||||
&msg_sub_value_region_tag_redraw,
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void action_main_region_listener(
|
||||
bScreen *UNUSED(sc), ScrArea *UNUSED(sa), ARegion *ar,
|
||||
wmNotifier *wmn, const Scene *UNUSED(scene))
|
||||
@@ -472,6 +507,25 @@ static void saction_main_region_message_subscribe(
|
||||
WM_msg_subscribe_rna(mbus, &idptr, props[i], &msg_sub_value_region_tag_redraw, __func__);
|
||||
}
|
||||
}
|
||||
|
||||
/* All dopesheet filter settings, etc. affect the drawing of this editor,
|
||||
* so just whitelist the entire struct for updates
|
||||
*/
|
||||
{
|
||||
wmMsgParams_RNA msg_key_params = {{{0}}};
|
||||
StructRNA *type_array[] = {
|
||||
&RNA_DopeSheet,
|
||||
};
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(type_array); i++) {
|
||||
msg_key_params.ptr.type = type_array[i];
|
||||
WM_msg_subscribe_rna_params(
|
||||
mbus,
|
||||
&msg_key_params,
|
||||
&msg_sub_value_region_tag_redraw,
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* editor level listener */
|
||||
@@ -835,6 +889,7 @@ void ED_spacetype_action(void)
|
||||
art->init = action_channel_region_init;
|
||||
art->draw = action_channel_region_draw;
|
||||
art->listener = action_channel_region_listener;
|
||||
art->message_subscribe = saction_channel_region_message_subscribe;
|
||||
|
||||
BLI_addhead(&st->regiontypes, art);
|
||||
|
||||
|
||||
@@ -525,6 +525,25 @@ static void graph_region_message_subscribe(
|
||||
WM_msg_subscribe_rna(mbus, &idptr, props[i], &msg_sub_value_region_tag_redraw, __func__);
|
||||
}
|
||||
}
|
||||
|
||||
/* All dopesheet filter settings, etc. affect the drawing of this editor,
|
||||
* so just whitelist the entire struct for updates
|
||||
*/
|
||||
{
|
||||
wmMsgParams_RNA msg_key_params = {{{0}}};
|
||||
StructRNA *type_array[] = {
|
||||
&RNA_DopeSheet,
|
||||
};
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(type_array); i++) {
|
||||
msg_key_params.ptr.type = type_array[i];
|
||||
WM_msg_subscribe_rna_params(
|
||||
mbus,
|
||||
&msg_key_params,
|
||||
&msg_sub_value_region_tag_redraw,
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* editor level listener */
|
||||
@@ -810,6 +829,7 @@ void ED_spacetype_ipo(void)
|
||||
art->prefsizex = 200 + V2D_SCROLL_WIDTH; /* 200 is the 'standard', but due to scrollers, we want a bit more to fit the lock icons in */
|
||||
art->keymapflag = ED_KEYMAP_UI | ED_KEYMAP_VIEW2D | ED_KEYMAP_FRAMES;
|
||||
art->listener = graph_region_listener;
|
||||
art->message_subscribe = graph_region_message_subscribe;
|
||||
art->init = graph_channel_region_init;
|
||||
art->draw = graph_channel_region_draw;
|
||||
|
||||
|
||||
@@ -527,6 +527,41 @@ static void nla_channel_region_listener(
|
||||
}
|
||||
}
|
||||
|
||||
static void nla_channel_region_message_subscribe(
|
||||
const struct bContext *UNUSED(C),
|
||||
struct WorkSpace *UNUSED(workspace), struct Scene *UNUSED(scene),
|
||||
struct bScreen *screen, struct ScrArea *sa, struct ARegion *ar,
|
||||
struct wmMsgBus *mbus)
|
||||
{
|
||||
PointerRNA ptr;
|
||||
RNA_pointer_create(&screen->id, &RNA_SpaceNLA, sa->spacedata.first, &ptr);
|
||||
|
||||
wmMsgSubscribeValue msg_sub_value_region_tag_redraw = {
|
||||
.owner = ar,
|
||||
.user_data = ar,
|
||||
.notify = ED_region_do_msg_notify_tag_redraw,
|
||||
};
|
||||
|
||||
/* All dopesheet filter settings, etc. affect the drawing of this editor,
|
||||
* so just whitelist the entire struct for updates
|
||||
*/
|
||||
{
|
||||
wmMsgParams_RNA msg_key_params = {{{0}}};
|
||||
StructRNA *type_array[] = {
|
||||
&RNA_DopeSheet,
|
||||
};
|
||||
|
||||
for (int i = 0; i < ARRAY_SIZE(type_array); i++) {
|
||||
msg_key_params.ptr.type = type_array[i];
|
||||
WM_msg_subscribe_rna_params(
|
||||
mbus,
|
||||
&msg_key_params,
|
||||
&msg_sub_value_region_tag_redraw,
|
||||
__func__);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* editor level listener */
|
||||
static void nla_listener(bScreen *UNUSED(sc), ScrArea *sa, wmNotifier *wmn, Scene *UNUSED(scene),
|
||||
WorkSpace *UNUSED(workspace))
|
||||
@@ -628,6 +663,7 @@ void ED_spacetype_nla(void)
|
||||
art->init = nla_channel_region_init;
|
||||
art->draw = nla_channel_region_draw;
|
||||
art->listener = nla_channel_region_listener;
|
||||
art->message_subscribe = nla_channel_region_message_subscribe;
|
||||
|
||||
BLI_addhead(&st->regiontypes, art);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user