Blender  V2.93
sequencer.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 "MEM_guardedalloc.h"
28 
29 #include "DNA_anim_types.h"
30 #include "DNA_scene_types.h"
31 #include "DNA_sequence_types.h"
32 
33 #include "BLI_listbase.h"
34 #include "BLI_string.h"
35 
36 #include "BKE_animsys.h"
37 #include "BKE_fcurve.h"
38 #include "BKE_idprop.h"
39 #include "BKE_lib_id.h"
40 #include "BKE_sound.h"
41 
42 #include "DEG_depsgraph.h"
43 
44 #include "IMB_colormanagement.h"
45 #include "IMB_imbuf.h"
46 
47 #include "SEQ_effects.h"
48 #include "SEQ_iterator.h"
49 #include "SEQ_modifier.h"
50 #include "SEQ_relations.h"
51 #include "SEQ_select.h"
52 #include "SEQ_sequencer.h"
53 #include "SEQ_utils.h"
54 
55 #include "image_cache.h"
56 #include "prefetch.h"
57 #include "sequencer.h"
58 #include "utils.h"
59 
60 static void seq_free_animdata(Scene *scene, Sequence *seq);
61 
62 /* -------------------------------------------------------------------- */
67 {
68  Strip *strip = MEM_callocN(sizeof(Strip), "strip");
69 
71  strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
72  strip->transform->scale_x = 1;
73  strip->transform->scale_y = 1;
74  strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
75  }
76 
77  strip->us = 1;
78  return strip;
79 }
80 
81 static void seq_free_strip(Strip *strip)
82 {
83  strip->us--;
84  if (strip->us > 0) {
85  return;
86  }
87  if (strip->us < 0) {
88  printf("error: negative users in strip\n");
89  return;
90  }
91 
92  if (strip->stripdata) {
93  MEM_freeN(strip->stripdata);
94  }
95 
96  if (strip->proxy) {
97  if (strip->proxy->anim) {
98  IMB_free_anim(strip->proxy->anim);
99  }
100 
101  MEM_freeN(strip->proxy);
102  }
103  if (strip->crop) {
104  MEM_freeN(strip->crop);
105  }
106  if (strip->transform) {
107  MEM_freeN(strip->transform);
108  }
109 
110  MEM_freeN(strip);
111 }
112 
113 Sequence *SEQ_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int type)
114 {
115  Sequence *seq;
116 
117  seq = MEM_callocN(sizeof(Sequence), "addseq");
118  BLI_addtail(lb, seq);
119 
120  *((short *)seq->name) = ID_SEQ;
121  seq->name[2] = 0;
122 
123  seq->flag = SELECT;
124  seq->start = timeline_frame;
125  seq->machine = machine;
126  seq->sat = 1.0;
127  seq->mul = 1.0;
128  seq->blend_opacity = 100.0;
129  seq->volume = 1.0f;
130  seq->pitch = 1.0f;
131  seq->scene_sound = NULL;
132  seq->type = type;
133 
134  seq->strip = seq_strip_alloc(type);
135  seq->stereo3d_format = MEM_callocN(sizeof(Stereo3dFormat), "Sequence Stereo Format");
136 
138 
139  return seq;
140 }
141 
142 /* only give option to skip cache locally (static func) */
144  Sequence *seq,
145  const bool do_cache,
146  const bool do_id_user,
147  const bool do_clean_animdata)
148 {
149  if (seq->strip) {
150  seq_free_strip(seq->strip);
151  }
152 
154 
155  if (seq->type & SEQ_TYPE_EFFECT) {
156  struct SeqEffectHandle sh = SEQ_effect_handle_get(seq);
157  sh.free(seq, do_id_user);
158  }
159 
160  if (seq->sound && do_id_user) {
161  id_us_min(((ID *)seq->sound));
162  }
163 
164  if (seq->stereo3d_format) {
166  }
167 
168  /* clipboard has no scene and will never have a sound handle or be active
169  * same goes to sequences copy for proxy rebuild job
170  */
171  if (scene) {
172  Editing *ed = scene->ed;
173 
174  if (ed->act_seq == seq) {
175  ed->act_seq = NULL;
176  }
177 
178  if (seq->scene_sound && ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SCENE)) {
180  }
181 
182  /* XXX This must not be done in BKE code. */
183  if (do_clean_animdata) {
184  seq_free_animdata(scene, seq);
185  }
186  }
187 
188  if (seq->prop) {
189  IDP_FreePropertyContent_ex(seq->prop, do_id_user);
190  MEM_freeN(seq->prop);
191  }
192 
193  /* free modifiers */
194  SEQ_modifier_clear(seq);
195 
196  /* free cached data used by this strip,
197  * also invalidate cache for all dependent sequences
198  *
199  * be _very_ careful here, invalidating cache loops over the scene sequences and
200  * assumes the listbase is valid for all strips,
201  * this may not be the case if lists are being freed.
202  * this is optional SEQ_relations_invalidate_cache
203  */
204  if (do_cache) {
205  if (scene) {
207  }
208  }
209 
210  MEM_freeN(seq);
211 }
212 
213 void SEQ_sequence_free(Scene *scene, Sequence *seq, const bool do_clean_animdata)
214 {
215  seq_sequence_free_ex(scene, seq, true, true, do_clean_animdata);
216 }
217 
218 /* cache must be freed before calling this function
219  * since it leaves the seqbase in an invalid state */
220 void seq_free_sequence_recurse(Scene *scene, Sequence *seq, const bool do_id_user)
221 {
222  Sequence *iseq, *iseq_next;
223 
224  for (iseq = seq->seqbase.first; iseq; iseq = iseq_next) {
225  iseq_next = iseq->next;
226  seq_free_sequence_recurse(scene, iseq, do_id_user);
227  }
228 
229  seq_sequence_free_ex(scene, seq, false, do_id_user, true);
230 }
231 
233 {
234  if (alloc) {
236  }
237  return scene->ed;
238 }
239 
241 {
242  if (scene->ed == NULL) {
243  Editing *ed;
244 
245  ed = scene->ed = MEM_callocN(sizeof(Editing), "addseq");
246  ed->seqbasep = &ed->seqbase;
247  ed->cache = NULL;
250  }
251 
252  return scene->ed;
253 }
254 
255 void SEQ_editing_free(Scene *scene, const bool do_id_user)
256 {
257  Editing *ed = scene->ed;
258  Sequence *seq;
259 
260  if (ed == NULL) {
261  return;
262  }
263 
266 
267  SEQ_ALL_BEGIN (ed, seq) {
268  /* handle cache freeing above */
269  seq_sequence_free_ex(scene, seq, false, do_id_user, false);
270  }
271  SEQ_ALL_END;
272 
273  BLI_freelistN(&ed->metastack);
274  MEM_freeN(ed);
275 
276  scene->ed = NULL;
277 }
278 
280 {
282 
283  if (seq->type & SEQ_TYPE_EFFECT) {
284  if (seq->seq1 && seq->seq1->tmp) {
285  seq->seq1 = seq->seq1->tmp;
286  }
287  if (seq->seq2 && seq->seq2->tmp) {
288  seq->seq2 = seq->seq2->tmp;
289  }
290  if (seq->seq3 && seq->seq3->tmp) {
291  seq->seq3 = seq->seq3->tmp;
292  }
293  }
294  else if (seq->type == SEQ_TYPE_META) {
295  Sequence *seqn;
296  for (seqn = seq->seqbase.first; seqn; seqn = seqn->next) {
298  }
299  }
300 
301  for (smd = seq->modifiers.first; smd; smd = smd->next) {
302  if (smd->mask_sequence && smd->mask_sequence->tmp) {
303  smd->mask_sequence = smd->mask_sequence->tmp;
304  }
305  }
306 }
307 
309 {
311  "Sequencer tool settings");
312  tool_settings->fit_method = SEQ_SCALE_TO_FIT;
313  return tool_settings;
314 }
315 
317 {
319  if (tool_settings == NULL) {
321  tool_settings = scene->toolsettings->sequencer_tool_settings;
322  }
323 
324  return tool_settings;
325 }
326 
328 {
329  MEM_freeN(tool_settings);
330 }
331 
333 {
334  const SequencerToolSettings *tool_settings = SEQ_tool_settings_ensure(scene);
335  return tool_settings->fit_method;
336 }
337 
339 {
341  tool_settings->fit_method = fit_method;
342 }
343 
351 {
352  if (ed == NULL) {
353  return NULL;
354  }
355 
356  return ed->seqbasep;
357 }
358 
366 {
367  ed->seqbasep = seqbase;
368 }
369 
378 {
379  MetaStack *ms = MEM_mallocN(sizeof(MetaStack), "metastack");
380  BLI_addtail(&ed->metastack, ms);
381  ms->parseq = seq_meta;
382  ms->oldbasep = ed->seqbasep;
384  return ms;
385 }
386 
394 {
395  BLI_remlink(&ed->metastack, ms);
396  MEM_freeN(ms);
397 }
398 
406 {
407  return ed->metastack.last;
408 }
409 
412 /* -------------------------------------------------------------------- */
415 static Sequence *seq_dupli(const Scene *scene_src,
416  Scene *scene_dst,
417  ListBase *new_seq_list,
418  Sequence *seq,
419  int dupe_flag,
420  const int flag)
421 {
422  Sequence *seqn = MEM_dupallocN(seq);
423 
424  if ((flag & LIB_ID_CREATE_NO_MAIN) == 0) {
426  }
427 
428  seq->tmp = seqn;
429  seqn->strip = MEM_dupallocN(seq->strip);
430 
432 
433  /* XXX: add F-Curve duplication stuff? */
434 
435  if (seq->strip->crop) {
436  seqn->strip->crop = MEM_dupallocN(seq->strip->crop);
437  }
438 
439  if (seq->strip->transform) {
440  seqn->strip->transform = MEM_dupallocN(seq->strip->transform);
441  }
442 
443  if (seq->strip->proxy) {
444  seqn->strip->proxy = MEM_dupallocN(seq->strip->proxy);
445  seqn->strip->proxy->anim = NULL;
446  }
447 
448  if (seq->prop) {
449  seqn->prop = IDP_CopyProperty_ex(seq->prop, flag);
450  }
451 
452  if (seqn->modifiers.first) {
454 
455  SEQ_modifier_list_copy(seqn, seq);
456  }
457 
458  if (seq->type == SEQ_TYPE_META) {
459  seqn->strip->stripdata = NULL;
460 
461  BLI_listbase_clear(&seqn->seqbase);
462  /* WATCH OUT!!! - This metastrip is not recursively duplicated here - do this after!!! */
463  /* - seq_dupli_recursive(&seq->seqbase, &seqn->seqbase);*/
464  }
465  else if (seq->type == SEQ_TYPE_SCENE) {
466  seqn->strip->stripdata = NULL;
467  if (seq->scene_sound) {
468  seqn->scene_sound = BKE_sound_scene_add_scene_sound_defaults(scene_dst, seqn);
469  }
470  }
471  else if (seq->type == SEQ_TYPE_MOVIECLIP) {
472  /* avoid assert */
473  }
474  else if (seq->type == SEQ_TYPE_MASK) {
475  /* avoid assert */
476  }
477  else if (seq->type == SEQ_TYPE_MOVIE) {
478  seqn->strip->stripdata = MEM_dupallocN(seq->strip->stripdata);
479  BLI_listbase_clear(&seqn->anims);
480  }
481  else if (seq->type == SEQ_TYPE_SOUND_RAM) {
482  seqn->strip->stripdata = MEM_dupallocN(seq->strip->stripdata);
483  seqn->scene_sound = NULL;
484  if ((flag & LIB_ID_CREATE_NO_USER_REFCOUNT) == 0) {
485  id_us_plus((ID *)seqn->sound);
486  }
487  }
488  else if (seq->type == SEQ_TYPE_IMAGE) {
489  seqn->strip->stripdata = MEM_dupallocN(seq->strip->stripdata);
490  }
491  else if (seq->type & SEQ_TYPE_EFFECT) {
492  struct SeqEffectHandle sh;
493  sh = SEQ_effect_handle_get(seq);
494  if (sh.copy) {
495  sh.copy(seqn, seq, flag);
496  }
497 
498  seqn->strip->stripdata = NULL;
499  }
500  else {
501  /* sequence type not handled in duplicate! Expect a crash now... */
503  }
504 
505  /* When using SEQ_DUPE_UNIQUE_NAME, it is mandatory to add new sequences in relevant container
506  * (scene or meta's one), *before* checking for unique names. Otherwise the meta's list is empty
507  * and hence we miss all seqs in that meta that have already been duplicated (see T55668).
508  * Note that unique name check itself could be done at a later step in calling code, once all
509  * seqs have bee duplicated (that was first, simpler solution), but then handling of animation
510  * data will be broken (see T60194). */
511  if (new_seq_list != NULL) {
512  BLI_addtail(new_seq_list, seqn);
513  }
514 
515  if (scene_src == scene_dst) {
516  if (dupe_flag & SEQ_DUPE_UNIQUE_NAME) {
518  }
519 
520  if (dupe_flag & SEQ_DUPE_ANIM) {
521  SEQ_dupe_animdata(scene_dst, seq->name + 2, seqn->name + 2);
522  }
523  }
524 
525  return seqn;
526 }
527 
528 static Sequence *sequence_dupli_recursive_do(const Scene *scene_src,
529  Scene *scene_dst,
530  ListBase *new_seq_list,
531  Sequence *seq,
532  const int dupe_flag)
533 {
534  Sequence *seqn;
535 
536  seq->tmp = NULL;
537  seqn = seq_dupli(scene_src, scene_dst, new_seq_list, seq, dupe_flag, 0);
538  if (seq->type == SEQ_TYPE_META) {
539  Sequence *s;
540  for (s = seq->seqbase.first; s; s = s->next) {
541  sequence_dupli_recursive_do(scene_src, scene_dst, &seqn->seqbase, s, dupe_flag);
542  }
543  }
544 
545  return seqn;
546 }
547 
549  const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Sequence *seq, int dupe_flag)
550 {
551  Sequence *seqn = sequence_dupli_recursive_do(scene_src, scene_dst, new_seq_list, seq, dupe_flag);
552 
553  /* This does not need to be in recursive call itself, since it is already recursive... */
555 
556  return seqn;
557 }
558 
560  Scene *scene_dst,
561  ListBase *nseqbase,
562  const ListBase *seqbase,
563  int dupe_flag,
564  const int flag)
565 {
566  Sequence *seq;
567  Sequence *seqn = NULL;
568  Sequence *last_seq = SEQ_select_active_get((Scene *)scene_src);
569  /* always include meta's strips */
570  int dupe_flag_recursive = dupe_flag | SEQ_DUPE_ALL | SEQ_DUPE_IS_RECURSIVE_CALL;
571 
572  for (seq = seqbase->first; seq; seq = seq->next) {
573  seq->tmp = NULL;
574  if ((seq->flag & SELECT) || (dupe_flag & SEQ_DUPE_ALL)) {
575  seqn = seq_dupli(scene_src, scene_dst, nseqbase, seq, dupe_flag, flag);
576  if (seqn) { /*should never fail */
577  if (dupe_flag & SEQ_DUPE_CONTEXT) {
578  seq->flag &= ~SEQ_ALLSEL;
579  seqn->flag &= ~(SEQ_LEFTSEL + SEQ_RIGHTSEL + SEQ_LOCK);
580  }
581 
582  if (seq->type == SEQ_TYPE_META) {
584  scene_src, scene_dst, &seqn->seqbase, &seq->seqbase, dupe_flag_recursive, flag);
585  }
586 
587  if (dupe_flag & SEQ_DUPE_CONTEXT) {
588  if (seq == last_seq) {
589  SEQ_select_active_set(scene_dst, seqn);
590  }
591  }
592  }
593  }
594  }
595 
596  /* Fix modifier links recursively from the top level only, when all sequences have been
597  * copied. */
598  if (dupe_flag & SEQ_DUPE_IS_RECURSIVE_CALL) {
599  return;
600  }
601 
602  /* fix modifier linking */
603  for (seq = nseqbase->first; seq; seq = seq->next) {
605  }
606 }
607 /* r_prefix + [" + escaped_name + "] + \0 */
608 #define SEQ_RNAPATH_MAXSTR ((30 + 2 + (SEQ_NAME_MAXSTR * 2) + 2) + 1)
609 
610 static size_t sequencer_rna_path_prefix(char str[SEQ_RNAPATH_MAXSTR], const char *name)
611 {
612  char name_esc[SEQ_NAME_MAXSTR * 2];
613 
614  BLI_str_escape(name_esc, name, sizeof(name_esc));
615  return BLI_snprintf_rlen(
616  str, SEQ_RNAPATH_MAXSTR, "sequence_editor.sequences_all[\"%s\"]", name_esc);
617 }
618 
619 /* XXX - hackish function needed for transforming strips! TODO - have some better solution */
621 {
622  char str[SEQ_RNAPATH_MAXSTR];
623  size_t str_len;
624  FCurve *fcu;
625 
626  if (scene->adt == NULL || ofs == 0 || scene->adt->action == NULL) {
627  return;
628  }
629 
630  str_len = sequencer_rna_path_prefix(str, seq->name + 2);
631 
632  for (fcu = scene->adt->action->curves.first; fcu; fcu = fcu->next) {
633  if (STREQLEN(fcu->rna_path, str, str_len)) {
634  unsigned int i;
635  if (fcu->bezt) {
636  for (i = 0; i < fcu->totvert; i++) {
637  BezTriple *bezt = &fcu->bezt[i];
638  bezt->vec[0][0] += ofs;
639  bezt->vec[1][0] += ofs;
640  bezt->vec[2][0] += ofs;
641  }
642  }
643  if (fcu->fpt) {
644  for (i = 0; i < fcu->totvert; i++) {
645  FPoint *fpt = &fcu->fpt[i];
646  fpt->vec[0] += ofs;
647  }
648  }
649  }
650  }
651 
653 }
654 
655 void SEQ_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst)
656 {
657  char str_from[SEQ_RNAPATH_MAXSTR];
658  size_t str_from_len;
659  FCurve *fcu;
660  FCurve *fcu_last;
661  FCurve *fcu_cpy;
662  ListBase lb = {NULL, NULL};
663 
664  if (scene->adt == NULL || scene->adt->action == NULL) {
665  return;
666  }
667 
668  str_from_len = sequencer_rna_path_prefix(str_from, name_src);
669 
670  fcu_last = scene->adt->action->curves.last;
671 
672  for (fcu = scene->adt->action->curves.first; fcu && fcu->prev != fcu_last; fcu = fcu->next) {
673  if (STREQLEN(fcu->rna_path, str_from, str_from_len)) {
674  fcu_cpy = BKE_fcurve_copy(fcu);
675  BLI_addtail(&lb, fcu_cpy);
676  }
677  }
678 
679  /* notice validate is 0, keep this because the seq may not be added to the scene yet */
681  &scene->id, scene->adt, NULL, "sequence_editor.sequences_all", name_src, name_dst, 0, 0, 0);
682 
683  /* add the original fcurves back */
685 }
686 
687 /* XXX - hackish function needed to remove all fcurves belonging to a sequencer strip */
689 {
690  char str[SEQ_RNAPATH_MAXSTR];
691  size_t str_len;
692  FCurve *fcu;
693 
694  if (scene->adt == NULL || scene->adt->action == NULL) {
695  return;
696  }
697 
698  str_len = sequencer_rna_path_prefix(str, seq->name + 2);
699 
700  fcu = scene->adt->action->curves.first;
701 
702  while (fcu) {
703  if (STREQLEN(fcu->rna_path, str, str_len)) {
704  FCurve *next_fcu = fcu->next;
705 
706  BLI_remlink(&scene->adt->action->curves, fcu);
707  BKE_fcurve_free(fcu);
708 
709  fcu = next_fcu;
710  }
711  else {
712  fcu = fcu->next;
713  }
714  }
715 }
716 
717 #undef SEQ_RNAPATH_MAXSTR
718 
720 {
721  SequencerToolSettings *tool_settings_copy = MEM_dupallocN(tool_settings);
722  return tool_settings_copy;
723 }
724 
void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
Definition: anim_data.c:1079
void BKE_fcurve_free(struct FCurve *fcu)
Definition: fcurve.c:81
struct FCurve * BKE_fcurve_copy(const struct FCurve *fcu)
void IDP_FreePropertyContent_ex(struct IDProperty *prop, const bool do_id_user)
Definition: idprop.c:1006
struct IDProperty * IDP_CopyProperty_ex(const struct IDProperty *prop, const int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void id_us_min(struct ID *id)
Definition: lib_id.c:297
@ LIB_ID_CREATE_NO_USER_REFCOUNT
Definition: BKE_lib_id.h:92
@ LIB_ID_CREATE_NO_MAIN
Definition: BKE_lib_id.h:88
void id_us_plus(struct ID *id)
Definition: lib_id.c:288
void BKE_sound_remove_scene_sound(struct Scene *scene, void *handle)
void * BKE_sound_scene_add_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence)
#define BLI_assert_unreachable()
Definition: BLI_assert.h:96
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 void BLI_freelistN(struct ListBase *listbase) ATTR_NONNULL(1)
Definition: listbase.c:547
void BLI_addtail(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:110
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
Definition: listbase.c:133
MINLINE void copy_v2_v2_int(int r[2], const int a[2])
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const size_t dst_maxncpy) ATTR_NONNULL()
Definition: string.c:333
size_t BLI_snprintf_rlen(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
#define STREQLEN(a, b, n)
#define ELEM(...)
void DEG_id_tag_update(struct ID *id, int flag)
@ ID_RECALC_ANIMATION
Definition: DNA_ID.h:614
#define ID_SEQ
Definition: DNA_ID_enums.h:106
eSeqImageFitMethod
@ SEQ_SCALE_TO_FIT
@ SEQ_RIGHTSEL
@ SEQ_LOCK
@ SEQ_LEFTSEL
#define SEQ_NAME_MAXSTR
@ SEQ_CACHE_STORE_RAW
@ SEQ_CACHE_STORE_FINAL_OUT
#define SEQ_ALLSEL
@ SEQ_TYPE_SOUND_RAM
@ SEQ_TYPE_SOUND_HD
@ SEQ_TYPE_META
@ SEQ_TYPE_SCENE
@ SEQ_TYPE_MOVIECLIP
@ SEQ_TYPE_IMAGE
@ SEQ_TYPE_EFFECT
@ SEQ_TYPE_MOVIE
@ SEQ_TYPE_MASK
_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_free_anim(struct anim *anim)
Definition: anim_movie.c:207
Read Guarded memory(de)allocation.
#define SEQ_ALL_END
Definition: SEQ_iterator.h:48
#define SEQ_ALL_BEGIN(ed, _seq)
Definition: SEQ_iterator.h:41
#define SEQ_DUPE_UNIQUE_NAME
Definition: SEQ_sequencer.h:50
#define SEQ_DUPE_CONTEXT
Definition: SEQ_sequencer.h:51
#define SEQ_DUPE_ANIM
Definition: SEQ_sequencer.h:52
#define SEQ_DUPE_ALL
Definition: SEQ_sequencer.h:53
#define SEQ_DUPE_IS_RECURSIVE_CALL
Definition: SEQ_sequencer.h:54
#define SELECT
Scene scene
struct SeqEffectHandle SEQ_effect_handle_get(Sequence *seq)
Definition: effects.c:4291
#define str(s)
void seq_cache_destruct(Scene *scene)
Definition: image_cache.c:1223
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:41
void *(* MEM_dupallocN)(const void *vmemh)
Definition: mallocn.c:42
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:45
void *(* MEM_mallocN)(size_t len, const char *str)
Definition: mallocn.c:47
void seq_prefetch_free(Scene *scene)
Definition: prefetch.c:343
void SEQ_modifier_clear(Sequence *seq)
void SEQ_modifier_list_copy(Sequence *seqn, Sequence *seq)
void SEQ_tool_settings_free(SequencerToolSettings *tool_settings)
Definition: sequencer.c:327
void SEQ_sequence_base_dupli_recursive(const Scene *scene_src, Scene *scene_dst, ListBase *nseqbase, const ListBase *seqbase, int dupe_flag, const int flag)
Definition: sequencer.c:559
static void seq_new_fix_links_recursive(Sequence *seq)
Definition: sequencer.c:279
MetaStack * SEQ_meta_stack_alloc(Editing *ed, Sequence *seq_meta)
Definition: sequencer.c:377
#define SEQ_RNAPATH_MAXSTR
Definition: sequencer.c:608
ListBase * SEQ_active_seqbase_get(const Editing *ed)
Definition: sequencer.c:350
static void seq_free_animdata(Scene *scene, Sequence *seq)
Definition: sequencer.c:688
SequencerToolSettings * SEQ_tool_settings_init(void)
Definition: sequencer.c:308
static size_t sequencer_rna_path_prefix(char str[SEQ_RNAPATH_MAXSTR], const char *name)
Definition: sequencer.c:610
static void seq_sequence_free_ex(Scene *scene, Sequence *seq, const bool do_cache, const bool do_id_user, const bool do_clean_animdata)
Definition: sequencer.c:143
Sequence * SEQ_sequence_dupli_recursive(const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Sequence *seq, int dupe_flag)
Definition: sequencer.c:548
MetaStack * SEQ_meta_stack_active_get(const Editing *ed)
Definition: sequencer.c:405
void SEQ_offset_animdata(Scene *scene, Sequence *seq, int ofs)
Definition: sequencer.c:620
void SEQ_dupe_animdata(Scene *scene, const char *name_src, const char *name_dst)
Definition: sequencer.c:655
void SEQ_editing_free(Scene *scene, const bool do_id_user)
Definition: sequencer.c:255
static Strip * seq_strip_alloc(int type)
Definition: sequencer.c:66
SequencerToolSettings * SEQ_tool_settings_copy(SequencerToolSettings *tool_settings)
Definition: sequencer.c:719
Editing * SEQ_editing_ensure(Scene *scene)
Definition: sequencer.c:240
void SEQ_seqbase_active_set(Editing *ed, ListBase *seqbase)
Definition: sequencer.c:365
void seq_free_sequence_recurse(Scene *scene, Sequence *seq, const bool do_id_user)
Definition: sequencer.c:220
void SEQ_sequence_free(Scene *scene, Sequence *seq, const bool do_clean_animdata)
Definition: sequencer.c:213
void SEQ_meta_stack_free(Editing *ed, MetaStack *ms)
Definition: sequencer.c:393
static void seq_free_strip(Strip *strip)
Definition: sequencer.c:81
Sequence * SEQ_sequence_alloc(ListBase *lb, int timeline_frame, int machine, int type)
Definition: sequencer.c:113
eSeqImageFitMethod SEQ_tool_settings_fit_method_get(Scene *scene)
Definition: sequencer.c:332
static Sequence * seq_dupli(const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Sequence *seq, int dupe_flag, const int flag)
Definition: sequencer.c:415
void SEQ_tool_settings_fit_method_set(Scene *scene, eSeqImageFitMethod fit_method)
Definition: sequencer.c:338
SequencerToolSettings * SEQ_tool_settings_ensure(Scene *scene)
Definition: sequencer.c:316
Editing * SEQ_editing_get(Scene *scene, bool alloc)
Definition: sequencer.c:232
static Sequence * sequence_dupli_recursive_do(const Scene *scene_src, Scene *scene_dst, ListBase *new_seq_list, Sequence *seq, const int dupe_flag)
Definition: sequencer.c:528
void SEQ_relations_invalidate_cache_raw(Scene *scene, Sequence *seq)
void SEQ_relations_sequence_free_anim(Sequence *seq)
void SEQ_relations_session_uuid_generate(struct Sequence *sequence)
Sequence * SEQ_select_active_get(Scene *scene)
Definition: strip_select.c:35
void SEQ_select_active_set(Scene *scene, Sequence *seq)
Definition: strip_select.c:46
bAction * action
float vec[3][3]
ListBase seqbase
ListBase * seqbasep
Sequence * act_seq
ListBase metastack
struct SeqCache * cache
struct FCurve * next
char * rna_path
FPoint * fpt
BezTriple * bezt
struct FCurve * prev
unsigned int totvert
float vec[2]
Definition: DNA_ID.h:273
void * last
Definition: DNA_listBase.h:47
void * first
Definition: DNA_listBase.h:47
Sequence * parseq
ListBase * oldbasep
struct ToolSettings * toolsettings
struct Editing * ed
struct AnimData * adt
void(* copy)(struct Sequence *dst, struct Sequence *src, const int flag)
Definition: SEQ_effects.h:62
void(* free)(struct Sequence *seq, const bool do_id_user)
Definition: SEQ_effects.h:65
struct SequenceModifierData * next
struct Sequence * mask_sequence
ListBase anims
struct Sequence * seq3
void * scene_sound
ListBase modifiers
ListBase seqbase
struct bSound * sound
struct Sequence * seq1
struct Sequence * seq2
struct Sequence * next
struct IDProperty * prop
struct Stereo3dFormat * stereo3d_format
struct anim * anim
StripProxy * proxy
StripTransform * transform
StripElem * stripdata
StripCrop * crop
struct SequencerToolSettings * sequencer_tool_settings
ListBase curves
void SEQ_sequence_base_unique_name_recursive(ListBase *seqbasep, Sequence *seq)
Definition: utils.c:139