diff options
author | Richard Antalik <richardantalik@gmail.com> | 2021-12-01 14:30:57 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2021-12-01 14:49:17 +0300 |
commit | 1ef8ef4941dd84c8968109b5c858ed8d082d9187 (patch) | |
tree | 38bbdc6eabd661b2022ed1b0bb833ad601e87d3d /source/blender/editors/space_sequencer/sequencer_intern.h | |
parent | d5d91b4ae41b9861d8294d055f4e7db0499b0026 (diff) |
Cleanup: Remove seq->tmp_flag DNA member
Commit f0d20198b290 used this field to flag rendered strips which were
queried by `SEQ_query_rendered_strips()`. Then operators iterate all
strips and checks state of `seq->tmp_flag`.
Use collection returned by `SEQ_query_rendered_strips` directly.
There should be no functional changes.
This commit adds functions `all_strips_from_context` and
`selected_strips_from_context` that provide collection of strips based
on context. Most operators can use this collection directly.
There is already `seq->tmp` DNA field, but is should not be used unless
absolutely necessary. Better option is to use human readable flag.
Best is to not use DNA fields for temporary storage in runtime.
Diffstat (limited to 'source/blender/editors/space_sequencer/sequencer_intern.h')
-rw-r--r-- | source/blender/editors/space_sequencer/sequencer_intern.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/editors/space_sequencer/sequencer_intern.h b/source/blender/editors/space_sequencer/sequencer_intern.h index 37f17de08a0..d6360be8693 100644 --- a/source/blender/editors/space_sequencer/sequencer_intern.h +++ b/source/blender/editors/space_sequencer/sequencer_intern.h @@ -34,6 +34,7 @@ struct Depsgraph; struct Main; struct Scene; struct Sequence; +struct SeqCollection; struct SpaceSeq; struct StripElem; struct bContext; @@ -114,6 +115,25 @@ bool sequencer_view_has_preview_poll(struct bContext *C); bool sequencer_view_preview_only_poll(const struct bContext *C); bool sequencer_view_strips_poll(struct bContext *C); +/** + * Returns collection with all strips presented to user. If operation is done in preview, + * collection is limited to all presented strips that can produce image output. + * + * \param C: context + * \return collection of strips (`Sequence`) + */ +struct SeqCollection *all_strips_from_context(struct bContext *C); + +/** + * Returns collection with selected strips presented to user. If operation is done in preview, + * collection is limited to selected presented strips, that can produce image output at current + * frame. + * + * \param C: context + * \return collection of strips (`Sequence`) + */ +struct SeqCollection *selected_strips_from_context(struct bContext *C); + /* Externs. */ extern EnumPropertyItem sequencer_prop_effect_types[]; extern EnumPropertyItem prop_side_types[]; |