diff options
author | Joshua Leung <aligorith@gmail.com> | 2018-05-28 17:54:34 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2018-05-28 17:54:45 +0300 |
commit | ce5fa2decad115f023e2f5591255078768b4fa5e (patch) | |
tree | 43a9eb14073461348d84c7fc5999869efb853cdf /source | |
parent | 1d320f10ac7f77465081afbfbdbf9a3563cb6e31 (diff) |
Fix: Action/Graph editor UI's didn't update when channel properties were changed
More MessageBus-related silliness to resolve issue with toggling visibility/mute/locking
status of F-Curves/Groups/etc., as well as other things like modifying active keyframe's
values, or changing properties of F-Modifiers.
I've now ended up just whitelisting in the region subscribers all the animation-related
structs in RNA. But still, that may not be enough to deal with potential issues later
with the property sliders (shown per channel, optionally), which can come from anywhere.
(Spring bug)
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/space_action/space_action.c | 39 | ||||
-rw-r--r-- | source/blender/editors/space_graph/space_graph.c | 21 |
2 files changed, 36 insertions, 24 deletions
diff --git a/source/blender/editors/space_action/space_action.c b/source/blender/editors/space_action/space_action.c index febbcd03645..cb826d86a21 100644 --- a/source/blender/editors/space_action/space_action.c +++ b/source/blender/editors/space_action/space_action.c @@ -395,12 +395,23 @@ static void saction_channel_region_message_subscribe( }; /* All dopesheet filter settings, etc. affect the drawing of this editor, - * so just whitelist the entire struct for updates + * also same applies for all animation-related datatypes that may appear here, + * so just whitelist the entire structs for updates */ { wmMsgParams_RNA msg_key_params = {{{0}}}; StructRNA *type_array[] = { - &RNA_DopeSheet, + &RNA_DopeSheet, /* dopesheet filters */ + + &RNA_ActionGroup, /* channel groups */ + + &RNA_FCurve, /* F-Curve */ + &RNA_Keyframe, + &RNA_FCurveSample, + + &RNA_GreasePencil, /* Grease Pencil */ + &RNA_GPencilLayer, + &RNA_GPencilFrame, }; for (int i = 0; i < ARRAY_SIZE(type_array); i++) { @@ -470,8 +481,8 @@ static void action_main_region_listener( } static void saction_main_region_message_subscribe( - const struct bContext *UNUSED(C), - struct WorkSpace *UNUSED(workspace), struct Scene *scene, + const struct bContext *C, + struct WorkSpace *workspace, struct Scene *scene, struct bScreen *screen, struct ScrArea *sa, struct ARegion *ar, struct wmMsgBus *mbus) { @@ -508,24 +519,8 @@ static void saction_main_region_message_subscribe( } } - /* 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__); - } - } + /* Now run the general "channels region" one - since channels and main should be in sync */ + saction_channel_region_message_subscribe(C, workspace, scene, screen, sa, ar, mbus); } /* editor level listener */ diff --git a/source/blender/editors/space_graph/space_graph.c b/source/blender/editors/space_graph/space_graph.c index 3732b78a026..6ecb454096d 100644 --- a/source/blender/editors/space_graph/space_graph.c +++ b/source/blender/editors/space_graph/space_graph.c @@ -527,12 +527,29 @@ static void graph_region_message_subscribe( } /* All dopesheet filter settings, etc. affect the drawing of this editor, - * so just whitelist the entire struct for updates + * also same applies for all animation-related datatypes that may appear here, + * so just whitelist the entire structs for updates */ { wmMsgParams_RNA msg_key_params = {{{0}}}; StructRNA *type_array[] = { - &RNA_DopeSheet, + &RNA_DopeSheet, /* dopesheet filters */ + + &RNA_ActionGroup, /* channel groups */ + &RNA_FCurve, /* F-Curve */ + &RNA_Keyframe, + &RNA_FCurveSample, + + &RNA_FModifier, /* F-Modifiers (XXX: Why can't we just do all subclasses too?) */ + &RNA_FModifierCycles, + &RNA_FModifierEnvelope, + &RNA_FModifierEnvelopeControlPoint, + &RNA_FModifierFunctionGenerator, + &RNA_FModifierGenerator, + &RNA_FModifierLimits, + &RNA_FModifierNoise, + &RNA_FModifierPython, + &RNA_FModifierStepped, }; for (int i = 0; i < ARRAY_SIZE(type_array); i++) { |