Blender  V2.93
utils.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  *
19  * - Blender Foundation, 2003-2009
20  * - Peter Schlaile <peter [at] schlaile [dot] de> 2005/2006
21  */
22 
27 #include <stdlib.h>
28 #include <string.h>
29 
30 #include "MEM_guardedalloc.h"
31 
32 #include "DNA_mask_types.h"
33 #include "DNA_scene_types.h"
34 #include "DNA_sequence_types.h"
35 
36 #include "BLI_listbase.h"
37 #include "BLI_path_util.h"
38 #include "BLI_string.h"
39 #include "BLI_utildefines.h"
40 
41 #include "BKE_image.h"
42 #include "BKE_main.h"
43 #include "BKE_scene.h"
44 
45 #include "SEQ_iterator.h"
46 #include "SEQ_relations.h"
47 #include "SEQ_select.h"
48 #include "SEQ_sequencer.h"
49 #include "SEQ_utils.h"
50 
51 #include "IMB_imbuf.h"
52 #include "IMB_imbuf_types.h"
53 
54 #include "multiview.h"
55 #include "proxy.h"
56 #include "utils.h"
57 
59 {
60  /* all strips together per kind, and in order of y location ("machine") */
61  ListBase seqbase, effbase;
62  Editing *ed = SEQ_editing_get(scene, false);
63  Sequence *seq, *seqt;
64 
65  if (ed == NULL) {
66  return;
67  }
68 
69  BLI_listbase_clear(&seqbase);
70  BLI_listbase_clear(&effbase);
71 
72  while ((seq = BLI_pophead(ed->seqbasep))) {
73 
74  if (seq->type & SEQ_TYPE_EFFECT) {
75  seqt = effbase.first;
76  while (seqt) {
77  if (seqt->machine >= seq->machine) {
78  BLI_insertlinkbefore(&effbase, seqt, seq);
79  break;
80  }
81  seqt = seqt->next;
82  }
83  if (seqt == NULL) {
84  BLI_addtail(&effbase, seq);
85  }
86  }
87  else {
88  seqt = seqbase.first;
89  while (seqt) {
90  if (seqt->machine >= seq->machine) {
91  BLI_insertlinkbefore(&seqbase, seqt, seq);
92  break;
93  }
94  seqt = seqt->next;
95  }
96  if (seqt == NULL) {
97  BLI_addtail(&seqbase, seq);
98  }
99  }
100  }
101 
102  BLI_movelisttolist(&seqbase, &effbase);
103  *(ed->seqbasep) = seqbase;
104 }
105 
106 typedef struct SeqUniqueInfo {
110  int count;
111  int match;
113 
114 static void seqbase_unique_name(ListBase *seqbasep, SeqUniqueInfo *sui)
115 {
116  Sequence *seq;
117  for (seq = seqbasep->first; seq; seq = seq->next) {
118  if ((sui->seq != seq) && STREQ(sui->name_dest, seq->name + 2)) {
119  /* SEQ_NAME_MAXSTR -4 for the number, -1 for \0, - 2 for r_prefix */
120  BLI_snprintf(sui->name_dest,
121  sizeof(sui->name_dest),
122  "%.*s.%03d",
123  SEQ_NAME_MAXSTR - 4 - 1 - 2,
124  sui->name_src,
125  sui->count++);
126  sui->match = 1; /* be sure to re-scan */
127  }
128  }
129 }
130 
131 static int seqbase_unique_name_recursive_fn(Sequence *seq, void *arg_pt)
132 {
133  if (seq->seqbase.first) {
134  seqbase_unique_name(&seq->seqbase, (SeqUniqueInfo *)arg_pt);
135  }
136  return 1;
137 }
138 
140 {
141  SeqUniqueInfo sui;
142  char *dot;
143  sui.seq = seq;
144  BLI_strncpy(sui.name_src, seq->name + 2, sizeof(sui.name_src));
145  BLI_strncpy(sui.name_dest, seq->name + 2, sizeof(sui.name_dest));
146 
147  sui.count = 1;
148  sui.match = 1; /* assume the worst to start the loop */
149 
150  /* Strip off the suffix */
151  if ((dot = strrchr(sui.name_src, '.'))) {
152  *dot = '\0';
153  dot++;
154 
155  if (*dot) {
156  sui.count = atoi(dot) + 1;
157  }
158  }
159 
160  while (sui.match) {
161  sui.match = 0;
162  seqbase_unique_name(seqbasep, &sui);
164  }
165 
166  BLI_strncpy(seq->name + 2, sui.name_dest, sizeof(seq->name) - 2);
167 }
168 
169 static const char *give_seqname_by_type(int type)
170 {
171  switch (type) {
172  case SEQ_TYPE_META:
173  return "Meta";
174  case SEQ_TYPE_IMAGE:
175  return "Image";
176  case SEQ_TYPE_SCENE:
177  return "Scene";
178  case SEQ_TYPE_MOVIE:
179  return "Movie";
180  case SEQ_TYPE_MOVIECLIP:
181  return "Clip";
182  case SEQ_TYPE_MASK:
183  return "Mask";
184  case SEQ_TYPE_SOUND_RAM:
185  return "Audio";
186  case SEQ_TYPE_CROSS:
187  return "Cross";
188  case SEQ_TYPE_GAMCROSS:
189  return "Gamma Cross";
190  case SEQ_TYPE_ADD:
191  return "Add";
192  case SEQ_TYPE_SUB:
193  return "Sub";
194  case SEQ_TYPE_MUL:
195  return "Mul";
196  case SEQ_TYPE_ALPHAOVER:
197  return "Alpha Over";
198  case SEQ_TYPE_ALPHAUNDER:
199  return "Alpha Under";
200  case SEQ_TYPE_OVERDROP:
201  return "Over Drop";
202  case SEQ_TYPE_COLORMIX:
203  return "Color Mix";
204  case SEQ_TYPE_WIPE:
205  return "Wipe";
206  case SEQ_TYPE_GLOW:
207  return "Glow";
208  case SEQ_TYPE_TRANSFORM:
209  return "Transform";
210  case SEQ_TYPE_COLOR:
211  return "Color";
212  case SEQ_TYPE_MULTICAM:
213  return "Multicam";
214  case SEQ_TYPE_ADJUSTMENT:
215  return "Adjustment";
216  case SEQ_TYPE_SPEED:
217  return "Speed";
219  return "Gaussian Blur";
220  case SEQ_TYPE_TEXT:
221  return "Text";
222  default:
223  return NULL;
224  }
225 }
226 
228 {
229  const char *name = give_seqname_by_type(seq->type);
230 
231  if (!name) {
232  if (!(seq->type & SEQ_TYPE_EFFECT)) {
233  return seq->strip->dir;
234  }
235 
236  return "Effect";
237  }
238  return name;
239 }
240 
242 {
243  ListBase *seqbase = NULL;
244 
245  switch (seq->type) {
246  case SEQ_TYPE_META: {
247  seqbase = &seq->seqbase;
248  *r_offset = seq->start;
249  break;
250  }
251  case SEQ_TYPE_SCENE: {
252  if (seq->flag & SEQ_SCENE_STRIPS && seq->scene) {
253  Editing *ed = SEQ_editing_get(seq->scene, false);
254  if (ed) {
255  seqbase = &ed->seqbase;
256  *r_offset = seq->scene->r.sfra;
257  }
258  }
259  break;
260  }
261  }
262 
263  return seqbase;
264 }
265 
266 void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile)
267 {
268  char dir[FILE_MAX];
269  char name[FILE_MAX];
270  StripProxy *proxy;
271  bool use_proxy;
272  bool is_multiview_loaded = false;
273  Editing *ed = scene->ed;
274  const bool is_multiview = (seq->flag & SEQ_USE_VIEWS) != 0 &&
275  (scene->r.scemode & R_MULTIVIEW) != 0;
276 
277  if ((seq->anims.first != NULL) && (((StripAnim *)seq->anims.first)->anim != NULL)) {
278  return;
279  }
280 
281  /* reset all the previously created anims */
283 
284  BLI_join_dirfile(name, sizeof(name), seq->strip->dir, seq->strip->stripdata->name);
286 
287  proxy = seq->strip->proxy;
288 
289  use_proxy = proxy && ((proxy->storage & SEQ_STORAGE_PROXY_CUSTOM_DIR) != 0 ||
291 
292  if (use_proxy) {
294  if (ed->proxy_dir[0] == 0) {
295  BLI_strncpy(dir, "//BL_proxy", sizeof(dir));
296  }
297  else {
298  BLI_strncpy(dir, ed->proxy_dir, sizeof(dir));
299  }
300  }
301  else {
302  BLI_strncpy(dir, seq->strip->proxy->dir, sizeof(dir));
303  }
305  }
306 
307  if (is_multiview && seq->views_format == R_IMF_VIEWS_INDIVIDUAL) {
308  int totfiles = seq_num_files(scene, seq->views_format, true);
309  char prefix[FILE_MAX];
310  const char *ext = NULL;
311  int i;
312 
313  BKE_scene_multiview_view_prefix_get(scene, name, prefix, &ext);
314 
315  if (prefix[0] != '\0') {
316  for (i = 0; i < totfiles; i++) {
317  const char *suffix = BKE_scene_multiview_view_id_suffix_get(&scene->r, i);
318  char str[FILE_MAX];
319  StripAnim *sanim = MEM_mallocN(sizeof(StripAnim), "Strip Anim");
320 
321  BLI_addtail(&seq->anims, sanim);
322 
323  BLI_snprintf(str, sizeof(str), "%s%s%s", prefix, suffix, ext);
324 
325  if (openfile) {
326  sanim->anim = openanim(str,
327  IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0),
328  seq->streamindex,
330  }
331  else {
332  sanim->anim = openanim_noload(str,
333  IB_rect |
334  ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0),
335  seq->streamindex,
337  }
338 
339  if (sanim->anim) {
340  /* we already have the suffix */
341  IMB_suffix_anim(sanim->anim, suffix);
342  }
343  else {
344  if (openfile) {
345  sanim->anim = openanim(name,
346  IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0),
347  seq->streamindex,
349  }
350  else {
351  sanim->anim = openanim_noload(name,
352  IB_rect |
353  ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0),
354  seq->streamindex,
356  }
357 
358  /* No individual view files - monoscopic, stereo 3d or EXR multi-view. */
359  totfiles = 1;
360  }
361 
362  if (sanim->anim && use_proxy) {
363  seq_proxy_index_dir_set(sanim->anim, dir);
364  }
365  }
366  is_multiview_loaded = true;
367  }
368  }
369 
370  if (is_multiview_loaded == false) {
371  StripAnim *sanim;
372 
373  sanim = MEM_mallocN(sizeof(StripAnim), "Strip Anim");
374  BLI_addtail(&seq->anims, sanim);
375 
376  if (openfile) {
377  sanim->anim = openanim(name,
378  IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0),
379  seq->streamindex,
381  }
382  else {
383  sanim->anim = openanim_noload(name,
384  IB_rect | ((seq->flag & SEQ_FILTERY) ? IB_animdeinterlace : 0),
385  seq->streamindex,
387  }
388 
389  if (sanim->anim && use_proxy) {
390  seq_proxy_index_dir_set(sanim->anim, dir);
391  }
392  }
393 }
394 
395 const Sequence *SEQ_get_topmost_sequence(const Scene *scene, int frame)
396 {
397  const Editing *ed = scene->ed;
398  const Sequence *seq, *best_seq = NULL;
399  int best_machine = -1;
400 
401  if (!ed) {
402  return NULL;
403  }
404 
405  for (seq = ed->seqbasep->first; seq; seq = seq->next) {
406  if (seq->flag & SEQ_MUTE || seq->startdisp > frame || seq->enddisp <= frame) {
407  continue;
408  }
409  /* Only use strips that generate an image, not ones that combine
410  * other strips or apply some effect. */
411  if (ELEM(seq->type,
417  SEQ_TYPE_TEXT)) {
418  if (seq->machine > best_machine) {
419  best_seq = seq;
420  best_machine = seq->machine;
421  }
422  }
423  }
424  return best_seq;
425 }
426 
427 /* in cases where we done know the sequence's listbase */
429 {
430  Sequence *iseq;
431  ListBase *lb = NULL;
432 
433  for (iseq = seqbase->first; iseq; iseq = iseq->next) {
434  if (seq == iseq) {
435  return seqbase;
436  }
437  if (iseq->seqbase.first && (lb = SEQ_get_seqbase_by_seq(&iseq->seqbase, seq))) {
438  return lb;
439  }
440  }
441 
442  return NULL;
443 }
444 
446 {
447  Sequence *iseq;
448 
449  for (iseq = seqbase->first; iseq; iseq = iseq->next) {
450  Sequence *rval;
451 
452  if (seq == iseq) {
453  return meta;
454  }
455  if (iseq->seqbase.first &&
456  (rval = seq_find_metastrip_by_sequence(&iseq->seqbase, iseq, seq))) {
457  return rval;
458  }
459  }
460 
461  return NULL;
462 }
463 
469 {
470  Sequence *iseq;
471 
472  for (iseq = seqbase->first; iseq; iseq = iseq->next) {
473  Sequence *seq_found;
474  if ((iseq->strip && iseq->strip->stripdata) &&
475  (ARRAY_HAS_ITEM(se, iseq->strip->stripdata, iseq->len))) {
476  break;
477  }
478  if ((seq_found = SEQ_sequence_from_strip_elem(&iseq->seqbase, se))) {
479  iseq = seq_found;
480  break;
481  }
482  }
483 
484  return iseq;
485 }
486 
487 Sequence *SEQ_get_sequence_by_name(ListBase *seqbase, const char *name, bool recursive)
488 {
489  Sequence *iseq = NULL;
490  Sequence *rseq = NULL;
491 
492  for (iseq = seqbase->first; iseq; iseq = iseq->next) {
493  if (STREQ(name, iseq->name + 2)) {
494  return iseq;
495  }
496  if (recursive && (iseq->seqbase.first) &&
497  (rseq = SEQ_get_sequence_by_name(&iseq->seqbase, name, 1))) {
498  return rseq;
499  }
500  }
501 
502  return NULL;
503 }
504 
506 {
508 
509  if (seq_act && seq_act->type == SEQ_TYPE_MASK) {
510  return seq_act->mask;
511  }
512 
513  return NULL;
514 }
515 
517 {
518  if (seq->strip && seq->strip->stripdata) {
519  const char *filename = seq->strip->stripdata->name;
521  }
522 }
523 
524 /* called on draw, needs to be fast,
525  * we could cache and use a flag if we want to make checks for file paths resolving for eg. */
527 {
528  switch (seq->type) {
529  case SEQ_TYPE_MASK:
530  return (seq->mask != NULL);
531  case SEQ_TYPE_MOVIECLIP:
532  return (seq->clip != NULL);
533  case SEQ_TYPE_SCENE:
534  return (seq->scene != NULL);
535  case SEQ_TYPE_SOUND_RAM:
536  return (seq->sound != NULL);
537  }
538 
539  return true;
540 }
541 
543 {
544  switch (seq->type) {
545  case SEQ_TYPE_IMAGE:
546  case SEQ_TYPE_SCENE:
547  case SEQ_TYPE_MOVIE:
548  case SEQ_TYPE_MOVIECLIP:
549  case SEQ_TYPE_MASK:
550  case SEQ_TYPE_COLOR:
551  case SEQ_TYPE_TEXT:
552  return true;
553  }
554  return false;
555 }
556 
558  const int image_width,
559  const int image_height,
560  const int preview_width,
561  const int preview_height,
562  const eSeqImageFitMethod fit_method)
563 {
565 
566  switch (fit_method) {
567  case SEQ_SCALE_TO_FIT:
568  transform->scale_x = transform->scale_y = MIN2((float)preview_width / (float)image_width,
569  (float)preview_height / (float)image_height);
570 
571  break;
572  case SEQ_SCALE_TO_FILL:
573 
574  transform->scale_x = transform->scale_y = MAX2((float)preview_width / (float)image_width,
575  (float)preview_height / (float)image_height);
576  break;
577  case SEQ_STRETCH_TO_FILL:
578  transform->scale_x = (float)preview_width / (float)image_width;
579  transform->scale_y = (float)preview_height / (float)image_height;
580  break;
582  transform->scale_x = 1.0f;
583  transform->scale_y = 1.0f;
584  break;
585  }
586 }
typedef float(TangentPoint)[2]
struct anim * openanim_noload(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
Definition: image.c:3103
struct anim * openanim(const char *name, int flags, int streamindex, char colorspace[IMA_MAX_SPACE])
Definition: image.c:3115
char BKE_image_alpha_mode_from_extension_ex(const char *filepath)
Definition: image.c:797
const char * BKE_main_blendfile_path_from_global(void)
Definition: main.c:439
const char * BKE_scene_multiview_view_id_suffix_get(const struct RenderData *rd, const int view_id)
void BKE_scene_multiview_view_prefix_get(struct Scene *scene, const char *name, char *r_prefix, const char **r_ext)
Definition: scene.c:3301
void * BLI_pophead(ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:257
BLI_INLINE void BLI_listbase_clear(struct ListBase *lb)
Definition: BLI_listbase.h:128
void void void BLI_movelisttolist(struct ListBase *dst, struct ListBase *src) ATTR_NONNULL(1
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
Definition: listbase.c:395
#define FILE_MAX
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
Definition: path_util.c:1737
bool BLI_path_abs(char *path, const char *basepath) ATTR_NONNULL()
Definition: path_util.c:1016
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Definition: string.c:108
#define ARRAY_HAS_ITEM(arr_item, arr_start, arr_len)
#define MAX2(a, b)
#define ELEM(...)
#define MIN2(a, b)
#define STREQ(a, b)
#define R_MULTIVIEW
@ R_IMF_VIEWS_INDIVIDUAL
eSeqImageFitMethod
@ SEQ_SCALE_TO_FILL
@ SEQ_STRETCH_TO_FILL
@ SEQ_USE_ORIGINAL_SIZE
@ SEQ_SCALE_TO_FIT
@ SEQ_MUTE
@ SEQ_FILTERY
@ SEQ_SCENE_STRIPS
@ SEQ_USE_VIEWS
#define SEQ_NAME_MAXSTR
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
#define SEQ_EDIT_PROXY_DIR_STORAGE
@ SEQ_TYPE_TRANSFORM
@ SEQ_TYPE_SOUND_RAM
@ SEQ_TYPE_CROSS
@ SEQ_TYPE_GLOW
@ SEQ_TYPE_COLORMIX
@ SEQ_TYPE_WIPE
@ SEQ_TYPE_META
@ SEQ_TYPE_OVERDROP
@ SEQ_TYPE_ALPHAUNDER
@ SEQ_TYPE_SCENE
@ SEQ_TYPE_GAMCROSS
@ SEQ_TYPE_MULTICAM
@ SEQ_TYPE_MOVIECLIP
@ SEQ_TYPE_MUL
@ SEQ_TYPE_GAUSSIAN_BLUR
@ SEQ_TYPE_ADD
@ SEQ_TYPE_ALPHAOVER
@ SEQ_TYPE_TEXT
@ SEQ_TYPE_IMAGE
@ SEQ_TYPE_SUB
@ SEQ_TYPE_SPEED
@ SEQ_TYPE_COLOR
@ SEQ_TYPE_EFFECT
@ SEQ_TYPE_MOVIE
@ SEQ_TYPE_MASK
@ SEQ_TYPE_ADJUSTMENT
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
void IMB_suffix_anim(struct anim *anim, const char *suffix)
Definition: anim_movie.c:328
Contains defines and structs used throughout the imbuf module.
@ IB_animdeinterlace
@ IB_rect
Read Guarded memory(de)allocation.
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
Scene scene
#define str(s)
int SEQ_iterator_seqbase_recursive_apply(ListBase *seqbase, int(*apply_fn)(Sequence *seq, void *), void *arg)
Definition: iterator.c:142
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:47
int seq_num_files(Scene *scene, char views_format, const bool is_multiview)
Definition: multiview.c:44
void seq_proxy_index_dir_set(struct anim *anim, const char *base_dir)
Definition: proxy.c:600
Editing * SEQ_editing_get(Scene *scene, bool alloc)
Definition: sequencer.c:232
void SEQ_relations_sequence_free_anim(Sequence *seq)
Sequence * SEQ_select_active_get(Scene *scene)
Definition: strip_select.c:35
ListBase seqbase
ListBase * seqbasep
char proxy_dir[1024]
void * first
Definition: DNA_listBase.h:47
struct Editing * ed
struct RenderData r
char name_dest[SEQ_NAME_MAXSTR]
Definition: utils.c:109
int match
Definition: utils.c:111
char name_src[SEQ_NAME_MAXSTR]
Definition: utils.c:108
Sequence * seq
Definition: utils.c:107
int count
Definition: utils.c:110
struct MovieClip * clip
struct Scene * scene
ListBase anims
struct Mask * mask
ListBase seqbase
struct bSound * sound
struct Sequence * next
struct anim * anim
char name[256]
ColorManagedColorspaceSettings colorspace_settings
StripProxy * proxy
StripTransform * transform
StripElem * stripdata
char dir[768]
ccl_device_inline float dot(const float2 &a, const float2 &b)
bool sequencer_seq_generates_image(Sequence *seq)
Definition: utils.c:542
const Sequence * SEQ_get_topmost_sequence(const Scene *scene, int frame)
Definition: utils.c:395
const char * SEQ_sequence_give_name(Sequence *seq)
Definition: utils.c:227
Mask * SEQ_active_mask_get(Scene *scene)
Definition: utils.c:505
ListBase * SEQ_get_seqbase_from_sequence(Sequence *seq, int *r_offset)
Definition: utils.c:241
void SEQ_sequence_base_unique_name_recursive(ListBase *seqbasep, Sequence *seq)
Definition: utils.c:139
bool SEQ_sequence_has_source(Sequence *seq)
Definition: utils.c:526
void SEQ_sort(Scene *scene)
Definition: utils.c:58
static void seqbase_unique_name(ListBase *seqbasep, SeqUniqueInfo *sui)
Definition: utils.c:114
void seq_open_anim_file(Scene *scene, Sequence *seq, bool openfile)
Definition: utils.c:266
void SEQ_alpha_mode_from_file_extension(Sequence *seq)
Definition: utils.c:516
struct SeqUniqueInfo SeqUniqueInfo
void SEQ_set_scale_to_fit(const Sequence *seq, const int image_width, const int image_height, const int preview_width, const int preview_height, const eSeqImageFitMethod fit_method)
Definition: utils.c:557
ListBase * SEQ_get_seqbase_by_seq(ListBase *seqbase, Sequence *seq)
Definition: utils.c:428
Sequence * SEQ_get_sequence_by_name(ListBase *seqbase, const char *name, bool recursive)
Definition: utils.c:487
static const char * give_seqname_by_type(int type)
Definition: utils.c:169
Sequence * seq_find_metastrip_by_sequence(ListBase *seqbase, Sequence *meta, Sequence *seq)
Definition: utils.c:445
Sequence * SEQ_sequence_from_strip_elem(ListBase *seqbase, StripElem *se)
Definition: utils.c:468
static int seqbase_unique_name_recursive_fn(Sequence *seq, void *arg_pt)
Definition: utils.c:131