diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-08-29 08:08:44 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-08-29 08:08:44 +0400 |
commit | 4d83f957b57e469d0b8d22f30fd1b0470a4d24a0 (patch) | |
tree | 8d111bc41fcb95819bd2cf1aa3c37fa156972f89 /source/blender/blenkernel/intern | |
parent | f934581a788469564afad010bde491dee01d5a48 (diff) |
fix [#36570] Changing the filename of a image strip doesnt refresh sequencer
was casting a StripElem as a Sequencer struct.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index a43f6dbf645..a2ebdae572d 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -3998,6 +3998,29 @@ Sequence *BKE_sequence_get_by_name(ListBase *seqbase, const char *name, int recu return NULL; } +/** + * Only use as last resort when the StripElem is available but no the Sequence. + * (needed for RNA) + */ +Sequence *BKE_sequencer_from_elem(ListBase *seqbase, StripElem *se) +{ + Sequence *iseq; + + for (iseq = seqbase->first; iseq; iseq = iseq->next) { + Sequence *seq_found; + if ((iseq->strip && iseq->strip->stripdata) && + (ARRAY_HAS_ITEM(se, iseq->strip->stripdata, iseq->len))) + { + break; + } + else if ((seq_found = BKE_sequencer_from_elem(&iseq->seqbase, se))) { + iseq = seq_found; + break; + } + } + + return iseq; +} Sequence *BKE_sequencer_active_get(Scene *scene) { |