Blender  V3.3
strip_select.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved.
3  * 2003-2009 Blender Foundation.
4  * 2005-2006 Peter Schlaile <peter [at] schlaile [dot] de> */
5 
10 #include "DNA_scene_types.h"
11 #include "DNA_sequence_types.h"
12 
13 #include "BKE_scene.h"
14 
15 #include "SEQ_select.h"
16 #include "SEQ_sequencer.h"
17 
19 {
21 
22  if (ed == NULL) {
23  return NULL;
24  }
25 
26  return ed->act_seq;
27 }
28 
30 {
32 
33  if (ed == NULL) {
34  return;
35  }
36 
37  ed->act_seq = seq;
38 }
39 
40 int SEQ_select_active_get_pair(Scene *scene, Sequence **r_seq_act, Sequence **r_seq_other)
41 {
43 
44  *r_seq_act = SEQ_select_active_get(scene);
45 
46  if (*r_seq_act == NULL) {
47  return 0;
48  }
49 
50  Sequence *seq;
51 
52  *r_seq_other = NULL;
53 
54  for (seq = ed->seqbasep->first; seq; seq = seq->next) {
55  if (seq->flag & SELECT && (seq != (*r_seq_act))) {
56  if (*r_seq_other) {
57  return 0;
58  }
59 
60  *r_seq_other = seq;
61  }
62  }
63 
64  return (*r_seq_other != NULL);
65 }
#define SELECT
Scene scene
Editing * SEQ_editing_get(const Scene *scene)
Definition: sequencer.c:241
Sequence * SEQ_select_active_get(Scene *scene)
Definition: strip_select.c:18
int SEQ_select_active_get_pair(Scene *scene, Sequence **r_seq_act, Sequence **r_seq_other)
Definition: strip_select.c:40
void SEQ_select_active_set(Scene *scene, Sequence *seq)
Definition: strip_select.c:29
ListBase * seqbasep
Sequence * act_seq
void * first
Definition: DNA_listBase.h:31
struct Sequence * next