diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-30 03:14:23 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-30 03:49:06 +0300 |
commit | c3d170d538c40a138b2a47a8e586885ec95a3501 (patch) | |
tree | 336400b4805375d970818e5c29cbf344c0b840df | |
parent | 3d550dd900b3ce8fb92ca3bfc1c4c8fd7e5f8014 (diff) |
Sequencer: replace notifier /w message-bus
-rw-r--r-- | source/blender/editors/space_sequencer/space_sequencer.c | 23 | ||||
-rw-r--r-- | source/blender/makesrna/RNA_access.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 1 |
3 files changed, 21 insertions, 5 deletions
diff --git a/source/blender/editors/space_sequencer/space_sequencer.c b/source/blender/editors/space_sequencer/space_sequencer.c index 9d73a857e3b..3f2df976d5f 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.c +++ b/source/blender/editors/space_sequencer/space_sequencer.c @@ -537,12 +537,9 @@ static void sequencer_main_region_listener( static void sequencer_main_region_message_subscribe( const struct bContext *UNUSED(C), struct WorkSpace *UNUSED(workspace), struct Scene *scene, - struct bScreen *screen, struct ScrArea *sa, struct ARegion *ar, + struct bScreen *UNUSED(screen), struct ScrArea *UNUSED(sa), struct ARegion *ar, struct wmMsgBus *mbus) { - PointerRNA ptr; - RNA_pointer_create(&screen->id, &RNA_SpaceSequenceEditor, sa->spacedata.first, &ptr); - wmMsgSubscribeValue msg_sub_value_region_tag_redraw = { .owner = ar, .user_data = ar, @@ -572,6 +569,24 @@ static void sequencer_main_region_message_subscribe( WM_msg_subscribe_rna(mbus, &idptr, props[i], &msg_sub_value_region_tag_redraw, __func__); } } + + { + StructRNA *type_array[] = { + &RNA_SequenceEditor, + + &RNA_Sequence, + /* Members of 'Sequence'. */ + &RNA_SequenceCrop, + &RNA_SequenceTransform, + &RNA_SequenceModifier, + &RNA_SequenceColorBalanceData, + }; + wmMsgParams_RNA msg_key_params = {{{0}}}; + 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__); + } + } } /* *********************** header region ************************ */ diff --git a/source/blender/makesrna/RNA_access.h b/source/blender/makesrna/RNA_access.h index 8553d4cf6f2..ad193eecbe8 100644 --- a/source/blender/makesrna/RNA_access.h +++ b/source/blender/makesrna/RNA_access.h @@ -526,9 +526,11 @@ extern StructRNA RNA_SelectedUvElement; extern StructRNA RNA_Sensor; extern StructRNA RNA_Sequence; extern StructRNA RNA_SequenceColorBalance; +extern StructRNA RNA_SequenceColorBalanceData; extern StructRNA RNA_SequenceCrop; extern StructRNA RNA_SequenceEditor; extern StructRNA RNA_SequenceElement; +extern StructRNA RNA_SequenceModifier; extern StructRNA RNA_SequenceProxy; extern StructRNA RNA_SequenceTransform; extern StructRNA RNA_ShaderFx; diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index ec5a41995a4..2fc5bab084a 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -125,7 +125,6 @@ static void rna_Sequence_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Point Sequence *seq = (Sequence *) ptr->data; BKE_sequence_invalidate_cache(scene, seq); - WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene); } } |