Blender  V3.3
rna_sequencer.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #include <limits.h>
8 #include <stdlib.h>
9 
10 #include "DNA_anim_types.h"
11 #include "DNA_movieclip_types.h"
12 #include "DNA_object_types.h"
13 #include "DNA_scene_types.h"
14 #include "DNA_sequence_types.h"
15 #include "DNA_vfont_types.h"
16 
17 #include "BLI_iterator.h"
18 #include "BLI_listbase.h"
19 #include "BLI_math.h"
20 #include "BLI_string_utils.h"
21 
22 #include "BLT_translation.h"
23 
24 #include "BKE_anim_data.h"
25 #include "BKE_animsys.h"
26 #include "BKE_sound.h"
27 
28 #include "IMB_metadata.h"
29 
30 #include "MEM_guardedalloc.h"
31 
32 #include "RNA_access.h"
33 #include "RNA_define.h"
34 #include "RNA_enum_types.h"
35 
36 #include "rna_internal.h"
37 
38 #include "SEQ_add.h"
39 #include "SEQ_channels.h"
40 #include "SEQ_effects.h"
41 #include "SEQ_iterator.h"
42 #include "SEQ_modifier.h"
43 #include "SEQ_prefetch.h"
44 #include "SEQ_proxy.h"
45 #include "SEQ_relations.h"
46 #include "SEQ_select.h"
47 #include "SEQ_sequencer.h"
48 #include "SEQ_sound.h"
49 #include "SEQ_time.h"
50 #include "SEQ_transform.h"
51 #include "SEQ_utils.h"
52 
53 #include "WM_types.h"
54 
55 typedef struct EffectInfo {
56  const char *struct_name;
57  const char *ui_name;
58  const char *ui_desc;
60  int inputs;
62 
64  {seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Bright/Contrast", ""},
65  {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""},
66  {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""},
67  {seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""},
68  {seqModifierType_Mask, "MASK", ICON_NONE, "Mask", ""},
69  {seqModifierType_Tonemap, "TONEMAP", ICON_NONE, "Tone Map", ""},
70  {seqModifierType_WhiteBalance, "WHITE_BALANCE", ICON_NONE, "White Balance", ""},
71  {0, NULL, 0, NULL, NULL},
72 };
73 
75  {SEQUENCE_COLOR_NONE, "NONE", ICON_X, "None", "Assign no color tag to the collection"},
76  {SEQUENCE_COLOR_01, "COLOR_01", ICON_SEQUENCE_COLOR_01, "Color 01", ""},
77  {SEQUENCE_COLOR_02, "COLOR_02", ICON_SEQUENCE_COLOR_02, "Color 02", ""},
78  {SEQUENCE_COLOR_03, "COLOR_03", ICON_SEQUENCE_COLOR_03, "Color 03", ""},
79  {SEQUENCE_COLOR_04, "COLOR_04", ICON_SEQUENCE_COLOR_04, "Color 04", ""},
80  {SEQUENCE_COLOR_05, "COLOR_05", ICON_SEQUENCE_COLOR_05, "Color 05", ""},
81  {SEQUENCE_COLOR_06, "COLOR_06", ICON_SEQUENCE_COLOR_06, "Color 06", ""},
82  {SEQUENCE_COLOR_07, "COLOR_07", ICON_SEQUENCE_COLOR_07, "Color 07", ""},
83  {SEQUENCE_COLOR_08, "COLOR_08", ICON_SEQUENCE_COLOR_08, "Color 08", ""},
84  {SEQUENCE_COLOR_09, "COLOR_09", ICON_SEQUENCE_COLOR_09, "Color 09", ""},
85  {0, NULL, 0, NULL, NULL},
86 };
87 
88 #ifdef RNA_RUNTIME
89 
90 # include "BKE_global.h"
91 # include "BKE_idprop.h"
92 # include "BKE_movieclip.h"
93 # include "BKE_report.h"
94 
95 # include "WM_api.h"
96 
97 # include "DEG_depsgraph.h"
98 # include "DEG_depsgraph_build.h"
99 
100 # include "IMB_imbuf.h"
101 
102 # include "SEQ_edit.h"
103 
104 typedef struct SequenceSearchData {
105  Sequence *seq;
106  void *data;
108 } SequenceSearchData;
109 
110 static void rna_SequenceElement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
111 {
112  Scene *scene = (Scene *)ptr->owner_id;
114 
115  if (ed) {
116  StripElem *se = (StripElem *)ptr->data;
117  Sequence *seq;
118 
119  /* slow but we can't avoid! */
120  seq = SEQ_sequence_from_strip_elem(&ed->seqbase, se);
121  if (seq) {
123  }
124  }
125 }
126 
127 static void rna_Sequence_invalidate_raw_update(Main *UNUSED(bmain),
128  Scene *UNUSED(scene),
129  PointerRNA *ptr)
130 {
131  Scene *scene = (Scene *)ptr->owner_id;
133 
134  if (ed) {
135  Sequence *seq = (Sequence *)ptr->data;
136 
138  }
139 }
140 
141 static void rna_Sequence_invalidate_preprocessed_update(Main *UNUSED(bmain),
142  Scene *UNUSED(scene),
143  PointerRNA *ptr)
144 {
145  Scene *scene = (Scene *)ptr->owner_id;
147 
148  if (ed) {
149  Sequence *seq = (Sequence *)ptr->data;
150 
152  }
153 }
154 
155 static void UNUSED_FUNCTION(rna_Sequence_invalidate_composite_update)(Main *UNUSED(bmain),
156  Scene *UNUSED(scene),
157  PointerRNA *ptr)
158 {
159  Scene *scene = (Scene *)ptr->owner_id;
161 
162  if (ed) {
163  Sequence *seq = (Sequence *)ptr->data;
164 
166  }
167 }
168 
169 static void rna_Sequence_scene_switch_update(Main *bmain, Scene *scene, PointerRNA *ptr)
170 {
171  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
174 }
175 
176 static void rna_Sequence_use_sequence(Main *bmain, Scene *scene, PointerRNA *ptr)
177 {
178  /* General update callback. */
179  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
180  /* Changing recursion changes set of IDs which needs to be remapped by the copy-on-write.
181  * the only way for this currently is to tag the ID for ID_RECALC_COPY_ON_WRITE. */
183  if (ed) {
184  Sequence *seq = (Sequence *)ptr->data;
185  if (seq->scene != NULL) {
187  }
188  }
189  /* The sequencer scene is to be updated as well, including new relations from the nested
190  * sequencer. */
193 }
194 
195 static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *iter,
196  PointerRNA *ptr)
197 {
198  Scene *scene = (Scene *)ptr->owner_id;
201 
202  BLI_Iterator *bli_iter = MEM_callocN(sizeof(BLI_Iterator), __func__);
203  bli_iter->data = MEM_callocN(sizeof(SeqIterator), __func__);
204  iter->internal.custom = bli_iter;
205 
206  if (!SEQ_iterator_ensure(all_strips, bli_iter->data, (Sequence **)&bli_iter->current)) {
207  SEQ_collection_free(all_strips);
208  }
209 
210  iter->valid = bli_iter->current != NULL;
211 }
212 
213 static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter)
214 {
215  BLI_Iterator *bli_iter = iter->internal.custom;
216  bli_iter->current = SEQ_iterator_yield(bli_iter->data);
217  iter->valid = bli_iter->current != NULL;
218 }
219 
220 static PointerRNA rna_SequenceEditor_sequences_all_get(CollectionPropertyIterator *iter)
221 {
222  Sequence *seq = ((BLI_Iterator *)iter->internal.custom)->current;
223  return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, seq);
224 }
225 
226 static void rna_SequenceEditor_sequences_all_end(CollectionPropertyIterator *iter)
227 {
228  BLI_Iterator *bli_iter = iter->internal.custom;
229  SeqIterator *seq_iter = bli_iter->data;
230  if (seq_iter->collection != NULL) {
231  SEQ_collection_free(seq_iter->collection);
232  }
233  MEM_freeN(seq_iter);
234  MEM_freeN(bli_iter);
235 }
236 
237 static int rna_SequenceEditor_sequences_all_lookup_string(PointerRNA *ptr,
238  const char *key,
239  PointerRNA *r_ptr)
240 {
241  ID *id = ptr->owner_id;
242  Scene *scene = (Scene *)id;
243 
245  if (seq) {
246  RNA_pointer_create(ptr->owner_id, &RNA_Sequence, seq, r_ptr);
247  return true;
248  }
249  return false;
250 }
251 
252 static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain),
253  Scene *scene,
255 {
256  Editing *ed = scene->ed;
257 
258  SEQ_relations_free_imbuf(scene, &ed->seqbase, false);
260 }
261 
262 /* internal use */
263 static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
264 {
265  Sequence *seq = (Sequence *)ptr->data;
266 
267  /* Hack? copied from sequencer.c::reload_sequence_new_file() */
268  size_t olen = MEM_allocN_len(seq->strip->stripdata) / sizeof(struct StripElem);
269 
270  /* The problem with seq->strip->len and seq->len is that it's discounted from the offset
271  * (hard cut trim). */
272  return (int)olen;
273 }
274 
275 static void rna_SequenceEditor_elements_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
276 {
277  Sequence *seq = (Sequence *)ptr->data;
279  (void *)seq->strip->stripdata,
280  sizeof(StripElem),
281  rna_SequenceEditor_elements_length(ptr),
282  0,
283  NULL);
284 }
285 
286 static void rna_Sequence_views_format_update(Main *bmain, Scene *scene, PointerRNA *ptr)
287 {
288  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
289 }
290 
291 static void do_sequence_frame_change_update(Scene *scene, Sequence *seq)
292 {
293  ListBase *seqbase = SEQ_get_seqbase_by_seq(scene, seq);
294 
295  if (SEQ_transform_test_overlap(scene, seqbase, seq)) {
296  SEQ_transform_seqbase_shuffle(seqbase, seq, scene);
297  }
298 
299  if (seq->type == SEQ_TYPE_SOUND_RAM) {
301  }
302 }
303 
304 /* A simple wrapper around above func, directly usable as prop update func.
305  * Also invalidate cache if needed.
306  */
307 static void rna_Sequence_frame_change_update(Main *UNUSED(bmain),
308  Scene *UNUSED(scene),
309  PointerRNA *ptr)
310 {
311  Scene *scene = (Scene *)ptr->owner_id;
312  do_sequence_frame_change_update(scene, (Sequence *)ptr->data);
313 }
314 
315 static int rna_Sequence_frame_final_start_get(PointerRNA *ptr)
316 {
317  Scene *scene = (Scene *)ptr->owner_id;
319 }
320 
321 static int rna_Sequence_frame_final_end_get(PointerRNA *ptr)
322 {
323  Scene *scene = (Scene *)ptr->owner_id;
325 }
326 
327 static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, float value)
328 {
329  Sequence *seq = (Sequence *)ptr->data;
330  Scene *scene = (Scene *)ptr->owner_id;
331 
334  do_sequence_frame_change_update(scene, seq);
336 }
337 
338 static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
339 {
340  Sequence *seq = (Sequence *)ptr->data;
341  Scene *scene = (Scene *)ptr->owner_id;
342 
345  do_sequence_frame_change_update(scene, seq);
347 }
348 
349 static void rna_Sequence_start_frame_set(PointerRNA *ptr, float value)
350 {
351  Sequence *seq = (Sequence *)ptr->data;
352  Scene *scene = (Scene *)ptr->owner_id;
353 
354  SEQ_transform_translate_sequence(scene, seq, value - seq->start);
355  do_sequence_frame_change_update(scene, seq);
357 }
358 
359 static void rna_Sequence_frame_offset_start_set(PointerRNA *ptr, float value)
360 {
361  Sequence *seq = (Sequence *)ptr->data;
362  Scene *scene = (Scene *)ptr->owner_id;
363 
365  seq->startofs = value;
366 }
367 
368 static void rna_Sequence_frame_offset_end_set(PointerRNA *ptr, float value)
369 {
370  Sequence *seq = (Sequence *)ptr->data;
371  Scene *scene = (Scene *)ptr->owner_id;
372 
374  seq->endofs = value;
375 }
376 
377 static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
378 {
379  Sequence *seq = (Sequence *)ptr->data;
380  Scene *scene = (Scene *)ptr->owner_id;
381 
382  seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
383 
384  SEQ_add_reload_new_file(G.main, scene, seq, false);
385  do_sequence_frame_change_update(scene, seq);
386 }
387 
388 static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
389 {
390  Sequence *seq = (Sequence *)ptr->data;
391  Scene *scene = (Scene *)ptr->owner_id;
392 
393  seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
394 
395  SEQ_add_reload_new_file(G.main, scene, seq, false);
396  do_sequence_frame_change_update(scene, seq);
397 }
398 
399 static void rna_Sequence_anim_endofs_final_range(
400  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
401 {
402  Sequence *seq = (Sequence *)ptr->data;
403 
404  *min = 0;
405  *max = seq->len + seq->anim_endofs - seq->startofs - seq->endofs - 1;
406 }
407 
408 static void rna_Sequence_anim_startofs_final_range(
409  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
410 {
411  Sequence *seq = (Sequence *)ptr->data;
412 
413  *min = 0;
414  *max = seq->len + seq->anim_startofs - seq->startofs - seq->endofs - 1;
415 }
416 
417 static void rna_Sequence_frame_offset_start_range(
418  PointerRNA *ptr, float *min, float *max, float *UNUSED(softmin), float *UNUSED(softmax))
419 {
420  Sequence *seq = (Sequence *)ptr->data;
421  *min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN;
422  *max = seq->len - seq->endofs - 1;
423 }
424 
425 static void rna_Sequence_frame_offset_end_range(
426  PointerRNA *ptr, float *min, float *max, float *UNUSED(softmin), float *UNUSED(softmax))
427 {
428  Sequence *seq = (Sequence *)ptr->data;
429  *min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN;
430  *max = seq->len - seq->startofs - 1;
431 }
432 
433 static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
434 {
435  Sequence *seq = (Sequence *)ptr->data;
436  Scene *scene = (Scene *)ptr->owner_id;
437 
439  do_sequence_frame_change_update(scene, seq);
441 }
442 
443 static int rna_Sequence_frame_length_get(PointerRNA *ptr)
444 {
445  Sequence *seq = (Sequence *)ptr->data;
446  Scene *scene = (Scene *)ptr->owner_id;
448 }
449 
450 static int rna_Sequence_frame_editable(PointerRNA *ptr, const char **UNUSED(r_info))
451 {
452  Sequence *seq = (Sequence *)ptr->data;
453  /* Effect sequences' start frame and length must be readonly! */
455 }
456 
457 static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
458 {
459  Sequence *seq = (Sequence *)ptr->data;
460  Scene *scene = (Scene *)ptr->owner_id;
461  ListBase *seqbase = SEQ_get_seqbase_by_seq(scene, seq);
462 
463  /* check channel increment or decrement */
464  const int channel_delta = (value >= seq->machine) ? 1 : -1;
465  seq->machine = value;
466 
467  if (SEQ_transform_test_overlap(scene, seqbase, seq)) {
468  SEQ_transform_seqbase_shuffle_ex(seqbase, seq, scene, channel_delta);
469  }
471 }
472 
473 static void rna_Sequence_use_proxy_set(PointerRNA *ptr, bool value)
474 {
475  Sequence *seq = (Sequence *)ptr->data;
476  SEQ_proxy_set(seq, value != 0);
477 }
478 
479 static bool transform_seq_cmp_fn(Sequence *seq, void *arg_pt)
480 {
481  SequenceSearchData *data = arg_pt;
482 
483  if (seq->strip && seq->strip->transform == data->data) {
484  data->seq = seq;
485  return false; /* done so bail out */
486  }
487  return true;
488 }
489 
490 static Sequence *sequence_get_by_transform(Editing *ed, StripTransform *transform)
491 {
492  SequenceSearchData data;
493 
494  data.seq = NULL;
495  data.data = transform;
496 
497  /* irritating we need to search for our sequence! */
498  SEQ_for_each_callback(&ed->seqbase, transform_seq_cmp_fn, &data);
499 
500  return data.seq;
501 }
502 
503 static char *rna_SequenceTransform_path(const PointerRNA *ptr)
504 {
505  Scene *scene = (Scene *)ptr->owner_id;
507  Sequence *seq = sequence_get_by_transform(ed, ptr->data);
508 
509  if (seq) {
510  char name_esc[(sizeof(seq->name) - 2) * 2];
511 
512  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
513  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform", name_esc);
514  }
515  else {
516  return BLI_strdup("");
517  }
518 }
519 
520 static void rna_SequenceTransform_update(Main *UNUSED(bmain),
521  Scene *UNUSED(scene),
522  PointerRNA *ptr)
523 {
524  Scene *scene = (Scene *)ptr->owner_id;
526  Sequence *seq = sequence_get_by_transform(ed, ptr->data);
527 
529 }
530 
531 static bool crop_seq_cmp_fn(Sequence *seq, void *arg_pt)
532 {
533  SequenceSearchData *data = arg_pt;
534 
535  if (seq->strip && seq->strip->crop == data->data) {
536  data->seq = seq;
537  return false; /* done so bail out */
538  }
539  return true;
540 }
541 
542 static Sequence *sequence_get_by_crop(Editing *ed, StripCrop *crop)
543 {
544  SequenceSearchData data;
545 
546  data.seq = NULL;
547  data.data = crop;
548 
549  /* irritating we need to search for our sequence! */
550  SEQ_for_each_callback(&ed->seqbase, crop_seq_cmp_fn, &data);
551 
552  return data.seq;
553 }
554 
555 static char *rna_SequenceCrop_path(const PointerRNA *ptr)
556 {
557  Scene *scene = (Scene *)ptr->owner_id;
559  Sequence *seq = sequence_get_by_crop(ed, ptr->data);
560 
561  if (seq) {
562  char name_esc[(sizeof(seq->name) - 2) * 2];
563 
564  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
565  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop", name_esc);
566  }
567  else {
568  return BLI_strdup("");
569  }
570 }
571 
572 static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
573 {
574  Scene *scene = (Scene *)ptr->owner_id;
576  Sequence *seq = sequence_get_by_crop(ed, ptr->data);
577 
579 }
580 
581 static void rna_Sequence_text_font_set(PointerRNA *ptr,
582  PointerRNA ptr_value,
583  struct ReportList *UNUSED(reports))
584 {
585  Sequence *seq = ptr->data;
586  TextVars *data = seq->effectdata;
587  VFont *value = ptr_value.data;
588 
590 
591  id_us_plus(&value->id);
592  data->text_blf_id = SEQ_FONT_NOT_LOADED;
593  data->text_font = value;
594 }
595 
596 /* name functions that ignore the first two characters */
597 static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
598 {
599  Sequence *seq = (Sequence *)ptr->data;
600  BLI_strncpy(value, seq->name + 2, sizeof(seq->name) - 2);
601 }
602 
603 static int rna_Sequence_name_length(PointerRNA *ptr)
604 {
605  Sequence *seq = (Sequence *)ptr->data;
606  return strlen(seq->name + 2);
607 }
608 
609 static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
610 {
611  Scene *scene = (Scene *)ptr->owner_id;
612  Sequence *seq = (Sequence *)ptr->data;
613  char oldname[sizeof(seq->name)];
614  AnimData *adt;
615 
617 
618  /* make a copy of the old name first */
619  BLI_strncpy(oldname, seq->name + 2, sizeof(seq->name) - 2);
620 
621  /* copy the new name into the name slot */
622  SEQ_edit_sequence_name_set(scene, seq, value);
623 
624  /* make sure the name is unique */
626  /* fix all the animation data which may link to this */
627 
628  /* Don't rename everywhere because these are per scene. */
629 # if 0
630  BKE_animdata_fix_paths_rename_all(NULL, "sequence_editor.sequences_all", oldname, seq->name + 2);
631 # endif
632  adt = BKE_animdata_from_id(&scene->id);
633  if (adt) {
635  &scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name + 2, 0, 0, 1);
636  }
637 }
638 
639 static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
640 {
641  Sequence *seq = (Sequence *)ptr->data;
642 
643  switch (seq->type) {
644  case SEQ_TYPE_IMAGE:
645  return &RNA_ImageSequence;
646  case SEQ_TYPE_META:
647  return &RNA_MetaSequence;
648  case SEQ_TYPE_SCENE:
649  return &RNA_SceneSequence;
650  case SEQ_TYPE_MOVIE:
651  return &RNA_MovieSequence;
652  case SEQ_TYPE_MOVIECLIP:
653  return &RNA_MovieClipSequence;
654  case SEQ_TYPE_MASK:
655  return &RNA_MaskSequence;
656  case SEQ_TYPE_SOUND_RAM:
657  return &RNA_SoundSequence;
658  case SEQ_TYPE_CROSS:
659  return &RNA_CrossSequence;
660  case SEQ_TYPE_ADD:
661  return &RNA_AddSequence;
662  case SEQ_TYPE_SUB:
663  return &RNA_SubtractSequence;
664  case SEQ_TYPE_ALPHAOVER:
665  return &RNA_AlphaOverSequence;
666  case SEQ_TYPE_ALPHAUNDER:
667  return &RNA_AlphaUnderSequence;
668  case SEQ_TYPE_GAMCROSS:
669  return &RNA_GammaCrossSequence;
670  case SEQ_TYPE_MUL:
671  return &RNA_MultiplySequence;
672  case SEQ_TYPE_OVERDROP:
673  return &RNA_OverDropSequence;
674  case SEQ_TYPE_MULTICAM:
675  return &RNA_MulticamSequence;
676  case SEQ_TYPE_ADJUSTMENT:
677  return &RNA_AdjustmentSequence;
678  case SEQ_TYPE_WIPE:
679  return &RNA_WipeSequence;
680  case SEQ_TYPE_GLOW:
681  return &RNA_GlowSequence;
682  case SEQ_TYPE_TRANSFORM:
683  return &RNA_TransformSequence;
684  case SEQ_TYPE_COLOR:
685  return &RNA_ColorSequence;
686  case SEQ_TYPE_SPEED:
687  return &RNA_SpeedControlSequence;
689  return &RNA_GaussianBlurSequence;
690  case SEQ_TYPE_TEXT:
691  return &RNA_TextSequence;
692  case SEQ_TYPE_COLORMIX:
693  return &RNA_ColorMixSequence;
694  default:
695  return &RNA_Sequence;
696  }
697 }
698 
699 static char *rna_Sequence_path(const PointerRNA *ptr)
700 {
701  const Sequence *seq = (Sequence *)ptr->data;
702 
703  /* sequencer data comes from scene...
704  * TODO: would be nice to make SequenceEditor data a data-block of its own (for shorter paths)
705  */
706  char name_esc[(sizeof(seq->name) - 2) * 2];
707 
708  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
709  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"]", name_esc);
710 }
711 
712 static IDProperty **rna_Sequence_idprops(PointerRNA *ptr)
713 {
714  Sequence *seq = ptr->data;
715  return &seq->prop;
716 }
717 
718 static bool rna_MovieSequence_reload_if_needed(ID *scene_id, Sequence *seq, Main *bmain)
719 {
720  Scene *scene = (Scene *)scene_id;
721 
722  bool has_reloaded;
723  bool can_produce_frames;
724 
725  SEQ_add_movie_reload_if_needed(bmain, scene, seq, &has_reloaded, &can_produce_frames);
726 
727  if (has_reloaded && can_produce_frames) {
729 
732  }
733 
734  return can_produce_frames;
735 }
736 
737 static PointerRNA rna_MovieSequence_metadata_get(Sequence *seq)
738 {
739  if (seq == NULL || seq->anims.first == NULL) {
740  return PointerRNA_NULL;
741  }
742 
743  StripAnim *sanim = seq->anims.first;
744  if (sanim->anim == NULL) {
745  return PointerRNA_NULL;
746  }
747 
748  IDProperty *metadata = IMB_anim_load_metadata(sanim->anim);
749  if (metadata == NULL) {
750  return PointerRNA_NULL;
751  }
752 
753  PointerRNA ptr;
754  RNA_pointer_create(NULL, &RNA_IDPropertyWrapPtr, metadata, &ptr);
755  return ptr;
756 }
757 
758 static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter)
759 {
760  ListBaseIterator *internal = &iter->internal.listbase;
761  MetaStack *ms = (MetaStack *)internal->link;
762 
763  return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
764 }
765 
766 /* TODO: expose seq path setting as a higher level sequencer BKE function. */
767 static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
768 {
769  Sequence *seq = (Sequence *)(ptr->data);
770  BLI_split_dirfile(value,
771  seq->strip->dir,
772  seq->strip->stripdata->name,
773  sizeof(seq->strip->dir),
774  sizeof(seq->strip->stripdata->name));
775 }
776 
777 static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
778 {
779  Sequence *seq = (Sequence *)(ptr->data);
780 
781  BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name);
782 }
783 
784 static int rna_Sequence_filepath_length(PointerRNA *ptr)
785 {
786  Sequence *seq = (Sequence *)(ptr->data);
787  char path[FILE_MAX];
788 
789  BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
790  return strlen(path);
791 }
792 
793 static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
794 {
795  StripProxy *proxy = (StripProxy *)(ptr->data);
796  BLI_split_dirfile(value, proxy->dir, proxy->file, sizeof(proxy->dir), sizeof(proxy->file));
797  if (proxy->anim) {
798  IMB_free_anim(proxy->anim);
799  proxy->anim = NULL;
800  }
801 }
802 
803 static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
804 {
805  StripProxy *proxy = (StripProxy *)(ptr->data);
806 
807  BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file);
808 }
809 
810 static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
811 {
812  StripProxy *proxy = (StripProxy *)(ptr->data);
813  char path[FILE_MAX];
814 
815  BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
816  return strlen(path);
817 }
818 
819 static void rna_Sequence_audio_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
820 {
822 }
823 
824 static void rna_Sequence_speed_factor_update(Main *bmain, Scene *scene, PointerRNA *ptr)
825 {
827  rna_Sequence_audio_update(bmain, scene, ptr);
828 }
829 
830 static void rna_Sequence_speed_factor_set(PointerRNA *ptr, float value)
831 {
832  Sequence *seq = (Sequence *)ptr->data;
833  Scene *scene = (Scene *)ptr->owner_id;
834  SEQ_time_speed_factor_set(scene, seq, value);
835 }
836 
837 static void rna_Sequence_pan_range(
838  PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
839 {
840  Scene *scene = (Scene *)ptr->owner_id;
841 
842  *min = -FLT_MAX;
843  *max = FLT_MAX;
844  *softmax = 1 + (int)(scene->r.ffcodecdata.audio_channels > 2);
845  *softmin = -*softmax;
846 }
847 
848 static int rna_Sequence_input_count_get(PointerRNA *ptr)
849 {
850  Sequence *seq = (Sequence *)(ptr->data);
851 
852  return SEQ_effect_get_num_inputs(seq->type);
853 }
854 
855 static void rna_Sequence_input_set(PointerRNA *ptr,
856  PointerRNA ptr_value,
857  struct ReportList *reports,
858  int input_num)
859 {
860 
861  Sequence *seq = ptr->data;
862  Sequence *input = ptr_value.data;
863 
865  BKE_report(reports, RPT_ERROR, "Cannot reassign inputs: recursion detected");
866  return;
867  }
868 
869  switch (input_num) {
870  case 1:
871  seq->seq1 = input;
872  break;
873  case 2:
874  seq->seq2 = input;
875  break;
876  }
877 }
878 
879 static void rna_Sequence_input_1_set(PointerRNA *ptr,
880  PointerRNA ptr_value,
881  struct ReportList *reports)
882 {
883  rna_Sequence_input_set(ptr, ptr_value, reports, 1);
884 }
885 
886 static void rna_Sequence_input_2_set(PointerRNA *ptr,
887  PointerRNA ptr_value,
888  struct ReportList *reports)
889 {
890  rna_Sequence_input_set(ptr, ptr_value, reports, 2);
891 }
892 # if 0
893 static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
894 {
895  Sequence *seq = (Sequence *)(ptr->data);
896  BLI_split_dirfile(value,
897  seq->strip->dir,
898  seq->strip->stripdata->name,
899  sizeof(seq->strip->dir),
900  sizeof(seq->strip->stripdata->name));
901 }
902 
903 static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
904 {
905  StripElem *elem = (StripElem *)(ptr->data);
906  BLI_split_file_part(value, elem->name, sizeof(elem->name));
907 }
908 # endif
909 
910 static void rna_Sequence_reopen_files_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
911 {
912  Scene *scene = (Scene *)ptr->owner_id;
914 
915  SEQ_relations_free_imbuf(scene, &ed->seqbase, false);
916  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
917 
918  if (RNA_struct_is_a(ptr->type, &RNA_SoundSequence)) {
920  }
921 }
922 
923 static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
924 {
925  Scene *scene = (Scene *)ptr->owner_id;
926  Sequence *seq = (Sequence *)(ptr->data);
927  SEQ_add_reload_new_file(bmain, scene, seq, true);
928  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
929 }
930 
931 static void rna_Sequence_sound_update(Main *bmain, Scene *UNUSED(active_scene), PointerRNA *ptr)
932 {
933  Scene *scene = (Scene *)ptr->owner_id;
936 }
937 
938 static bool seqproxy_seq_cmp_fn(Sequence *seq, void *arg_pt)
939 {
940  SequenceSearchData *data = arg_pt;
941 
942  if (seq->strip && seq->strip->proxy == data->data) {
943  data->seq = seq;
944  return false; /* done so bail out */
945  }
946  return true;
947 }
948 
949 static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
950 {
951  SequenceSearchData data;
952 
953  data.seq = NULL;
954  data.data = proxy;
955 
956  SEQ_for_each_callback(&ed->seqbase, seqproxy_seq_cmp_fn, &data);
957  return data.seq;
958 }
959 
960 static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
961 {
962  Scene *scene = (Scene *)ptr->owner_id;
964  Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
965 
966  SEQ_add_reload_new_file(bmain, scene, seq, false);
967  do_sequence_frame_change_update(scene, seq);
968 }
969 
970 static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
971 {
972  Scene *scene = (Scene *)ptr->owner_id;
974  Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
976 }
977 
978 /* do_versions? */
979 static float rna_Sequence_opacity_get(PointerRNA *ptr)
980 {
981  Sequence *seq = (Sequence *)(ptr->data);
982  return seq->blend_opacity / 100.0f;
983 }
984 static void rna_Sequence_opacity_set(PointerRNA *ptr, float value)
985 {
986  Sequence *seq = (Sequence *)(ptr->data);
987  CLAMP(value, 0.0f, 1.0f);
988  seq->blend_opacity = value * 100.0f;
989 }
990 
991 static int rna_Sequence_color_tag_get(PointerRNA *ptr)
992 {
993  Sequence *seq = (Sequence *)(ptr->data);
994  return seq->color_tag;
995 }
996 
997 static void rna_Sequence_color_tag_set(PointerRNA *ptr, int value)
998 {
999  Sequence *seq = (Sequence *)(ptr->data);
1000  seq->color_tag = value;
1001 }
1002 
1003 static bool colbalance_seq_cmp_fn(Sequence *seq, void *arg_pt)
1004 {
1005  SequenceSearchData *data = arg_pt;
1006 
1007  for (SequenceModifierData *smd = seq->modifiers.first; smd; smd = smd->next) {
1008  if (smd->type == seqModifierType_ColorBalance) {
1010 
1011  if (&cbmd->color_balance == data->data) {
1012  data->seq = seq;
1013  data->smd = smd;
1014  return false; /* done so bail out */
1015  }
1016  }
1017  }
1018 
1019  return true;
1020 }
1021 
1022 static Sequence *sequence_get_by_colorbalance(Editing *ed,
1023  StripColorBalance *cb,
1024  SequenceModifierData **r_smd)
1025 {
1026  SequenceSearchData data;
1027 
1028  data.seq = NULL;
1029  data.smd = NULL;
1030  data.data = cb;
1031 
1032  /* irritating we need to search for our sequence! */
1033  SEQ_for_each_callback(&ed->seqbase, colbalance_seq_cmp_fn, &data);
1034 
1035  *r_smd = data.smd;
1036 
1037  return data.seq;
1038 }
1039 
1040 static char *rna_SequenceColorBalance_path(const PointerRNA *ptr)
1041 {
1042  Scene *scene = (Scene *)ptr->owner_id;
1043  SequenceModifierData *smd;
1044  Editing *ed = SEQ_editing_get(scene);
1045  Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd);
1046 
1047  if (seq) {
1048  char name_esc[(sizeof(seq->name) - 2) * 2];
1049 
1050  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
1051 
1052  if (!smd) {
1053  /* path to old filter color balance */
1054  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", name_esc);
1055  }
1056  else {
1057  /* path to modifier */
1058  char name_esc_smd[sizeof(smd->name) * 2];
1059 
1060  BLI_str_escape(name_esc_smd, smd->name, sizeof(name_esc_smd));
1061  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"].color_balance",
1062  name_esc,
1063  name_esc_smd);
1064  }
1065  }
1066  else {
1067  return BLI_strdup("");
1068  }
1069 }
1070 
1071 static void rna_SequenceColorBalance_update(Main *UNUSED(bmain),
1072  Scene *UNUSED(scene),
1073  PointerRNA *ptr)
1074 {
1075  Scene *scene = (Scene *)ptr->owner_id;
1076  Editing *ed = SEQ_editing_get(scene);
1077  SequenceModifierData *smd;
1078  Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd);
1079 
1081 }
1082 
1083 static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value)
1084 {
1085  Scene *scene = (Scene *)ptr->owner_id;
1086  Editing *ed = SEQ_editing_get(scene);
1087 
1088  if (ed == NULL) {
1089  return;
1090  }
1091 
1092  /* convert from abs to relative and back */
1093  if ((ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) == 0 && value) {
1096  }
1097  else if ((ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) && !value) {
1100  }
1101 }
1102 
1103 static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
1104 {
1105  Scene *scene = (Scene *)ptr->owner_id;
1106  Editing *ed = SEQ_editing_get(scene);
1107 
1108  if (ed == NULL) {
1109  return scene->r.cfra;
1110  }
1111 
1113  return ed->overlay_frame_abs - scene->r.cfra;
1114  }
1115  else {
1116  return ed->overlay_frame_ofs;
1117  }
1118 }
1119 
1120 static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
1121 {
1122  Scene *scene = (Scene *)ptr->owner_id;
1123  Editing *ed = SEQ_editing_get(scene);
1124 
1125  if (ed == NULL) {
1126  return;
1127  }
1128 
1130  ed->overlay_frame_abs = (scene->r.cfra + value);
1131  }
1132  else {
1133  ed->overlay_frame_ofs = value;
1134  }
1135 }
1136 
1137 static void rna_SequenceEditor_display_stack(ID *id,
1138  Editing *ed,
1139  ReportList *reports,
1140  Sequence *seqm)
1141 {
1142  /* Check for non-meta sequence */
1143  if (seqm != NULL && seqm->type != SEQ_TYPE_META && SEQ_exists_in_seqbase(seqm, &ed->seqbase)) {
1144  BKE_report(reports, RPT_ERROR, "Sequence type must be 'META'");
1145  return;
1146  }
1147 
1148  /* Get editing base of meta sequence */
1149  Scene *scene = (Scene *)id;
1150  SEQ_meta_stack_set(scene, seqm);
1151  /* De-activate strip. This is to prevent strip from different timeline being drawn. */
1153 
1155 }
1156 
1157 static bool modifier_seq_cmp_fn(Sequence *seq, void *arg_pt)
1158 {
1159  SequenceSearchData *data = arg_pt;
1160 
1161  if (BLI_findindex(&seq->modifiers, data->data) != -1) {
1162  data->seq = seq;
1163  return false; /* done so bail out */
1164  }
1165 
1166  return true;
1167 }
1168 
1169 static Sequence *sequence_get_by_modifier(Editing *ed, SequenceModifierData *smd)
1170 {
1171  SequenceSearchData data;
1172 
1173  data.seq = NULL;
1174  data.data = smd;
1175 
1176  /* irritating we need to search for our sequence! */
1177  SEQ_for_each_callback(&ed->seqbase, modifier_seq_cmp_fn, &data);
1178 
1179  return data.seq;
1180 }
1181 
1182 static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr)
1183 {
1185 
1186  switch (smd->type) {
1188  return &RNA_ColorBalanceModifier;
1190  return &RNA_CurvesModifier;
1192  return &RNA_HueCorrectModifier;
1194  return &RNA_BrightContrastModifier;
1196  return &RNA_WhiteBalanceModifier;
1198  return &RNA_SequencerTonemapModifierData;
1199  default:
1200  return &RNA_SequenceModifier;
1201  }
1202 }
1203 
1204 static char *rna_SequenceModifier_path(const PointerRNA *ptr)
1205 {
1206  Scene *scene = (Scene *)ptr->owner_id;
1207  Editing *ed = SEQ_editing_get(scene);
1208  SequenceModifierData *smd = ptr->data;
1209  Sequence *seq = sequence_get_by_modifier(ed, smd);
1210 
1211  if (seq) {
1212  char name_esc[(sizeof(seq->name) - 2) * 2];
1213  char name_esc_smd[sizeof(smd->name) * 2];
1214 
1215  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
1216  BLI_str_escape(name_esc_smd, smd->name, sizeof(name_esc_smd));
1217  return BLI_sprintfN(
1218  "sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"]", name_esc, name_esc_smd);
1219  }
1220  else {
1221  return BLI_strdup("");
1222  }
1223 }
1224 
1225 static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value)
1226 {
1227  SequenceModifierData *smd = ptr->data;
1228  Scene *scene = (Scene *)ptr->owner_id;
1229  Editing *ed = SEQ_editing_get(scene);
1230  Sequence *seq = sequence_get_by_modifier(ed, smd);
1231  AnimData *adt;
1232  char oldname[sizeof(smd->name)];
1233 
1234  /* make a copy of the old name first */
1235  BLI_strncpy(oldname, smd->name, sizeof(smd->name));
1236 
1237  /* copy the new name into the name slot */
1238  BLI_strncpy_utf8(smd->name, value, sizeof(smd->name));
1239 
1240  /* make sure the name is truly unique */
1241  SEQ_modifier_unique_name(seq, smd);
1242 
1243  /* fix all the animation data which may link to this */
1244  adt = BKE_animdata_from_id(&scene->id);
1245  if (adt) {
1246  char path[1024];
1247 
1248  char seq_name_esc[(sizeof(seq->name) - 2) * 2];
1249  BLI_str_escape(seq_name_esc, seq->name + 2, sizeof(seq_name_esc));
1250 
1251  BLI_snprintf(
1252  path, sizeof(path), "sequence_editor.sequences_all[\"%s\"].modifiers", seq_name_esc);
1253  BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, path, oldname, smd->name, 0, 0, 1);
1254  }
1255 }
1256 
1257 static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
1258 {
1259  /* strip from other scenes could be modified, so using active scene is not reliable */
1260  Scene *scene = (Scene *)ptr->owner_id;
1261  Editing *ed = SEQ_editing_get(scene);
1262  Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
1263 
1265 }
1266 
1267 static bool rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
1268 {
1269  Scene *scene = (Scene *)ptr->owner_id;
1270  Editing *ed = SEQ_editing_get(scene);
1271  Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
1272  Sequence *cur = (Sequence *)value.data;
1273 
1274  if ((seq == cur) || (cur->type == SEQ_TYPE_SOUND_RAM)) {
1275  return false;
1276  }
1277 
1278  return true;
1279 }
1280 
1281 static SequenceModifierData *rna_Sequence_modifier_new(
1282  Sequence *seq, bContext *C, ReportList *reports, const char *name, int type)
1283 {
1284  if (!SEQ_sequence_supports_modifiers(seq)) {
1285  BKE_report(reports, RPT_ERROR, "Sequence type does not support modifiers");
1286 
1287  return NULL;
1288  }
1289  else {
1291  SequenceModifierData *smd;
1292 
1293  smd = SEQ_modifier_new(seq, name, type);
1294 
1296 
1298 
1299  return smd;
1300  }
1301 }
1302 
1303 static void rna_Sequence_modifier_remove(Sequence *seq,
1304  bContext *C,
1305  ReportList *reports,
1306  PointerRNA *smd_ptr)
1307 {
1308  SequenceModifierData *smd = smd_ptr->data;
1310 
1311  if (SEQ_modifier_remove(seq, smd) == false) {
1312  BKE_report(reports, RPT_ERROR, "Modifier was not found in the stack");
1313  return;
1314  }
1315 
1316  RNA_POINTER_INVALIDATE(smd_ptr);
1318 
1320 }
1321 
1322 static void rna_Sequence_modifier_clear(Sequence *seq, bContext *C)
1323 {
1325 
1326  SEQ_modifier_clear(seq);
1327 
1329 
1331 }
1332 
1333 static void rna_SequenceModifier_strip_set(PointerRNA *ptr,
1334  PointerRNA value,
1335  struct ReportList *reports)
1336 {
1337  SequenceModifierData *smd = ptr->data;
1338  Scene *scene = (Scene *)ptr->owner_id;
1339  Editing *ed = SEQ_editing_get(scene);
1340  Sequence *seq = sequence_get_by_modifier(ed, smd);
1341  Sequence *target = (Sequence *)value.data;
1342 
1343  if (target != NULL && SEQ_relations_render_loop_check(target, seq)) {
1344  BKE_report(reports, RPT_ERROR, "Recursion detected, can not use this strip");
1345  return;
1346  }
1347 
1348  smd->mask_sequence = target;
1349 }
1350 
1351 static float rna_Sequence_fps_get(PointerRNA *ptr)
1352 {
1353  Scene *scene = (Scene *)ptr->owner_id;
1354  Sequence *seq = (Sequence *)(ptr->data);
1355  return SEQ_time_sequence_get_fps(scene, seq);
1356 }
1357 
1358 static void rna_Sequence_separate(ID *id, Sequence *seqm, Main *bmain)
1359 {
1360  Scene *scene = (Scene *)id;
1361 
1362  /* Find the appropriate seqbase */
1363  ListBase *seqbase = SEQ_get_seqbase_by_seq(scene, seqm);
1364 
1365  LISTBASE_FOREACH_MUTABLE (Sequence *, seq, &seqm->seqbase) {
1366  SEQ_edit_move_strip_to_seqbase(scene, &seqm->seqbase, seq, seqbase);
1367  }
1368 
1369  SEQ_edit_flag_for_removal(scene, seqbase, seqm);
1371 
1372  /* Update depsgraph. */
1373  DEG_relations_tag_update(bmain);
1375 
1377 }
1378 
1379 /* Find channel owner. If NULL, owner is `Editing`, otherwise it's `Sequence`. */
1380 static Sequence *rna_SeqTimelineChannel_owner_get(Editing *ed, SeqTimelineChannel *channel)
1381 {
1383 
1384  Sequence *channel_owner = NULL;
1385  Sequence *seq;
1386  SEQ_ITERATOR_FOREACH (seq, strips) {
1387  if (seq->type != SEQ_TYPE_META) {
1388  continue;
1389  }
1390  if (BLI_findindex(&seq->channels, channel) >= 0) {
1391  channel_owner = seq;
1392  }
1393  }
1394 
1395  SEQ_collection_free(strips);
1396  return channel_owner;
1397 }
1398 
1399 static void rna_SequenceTimelineChannel_name_set(PointerRNA *ptr, const char *value)
1400 {
1402  Scene *scene = (Scene *)ptr->owner_id;
1403  Editing *ed = SEQ_editing_get(scene);
1404 
1405  Sequence *channel_owner = rna_SeqTimelineChannel_owner_get(ed, channel);
1406  ListBase *channels_base = &ed->channels;
1407 
1408  if (channel_owner != NULL) {
1409  channels_base = &channel_owner->channels;
1410  }
1411 
1412  BLI_strncpy_utf8(channel->name, value, sizeof(channel->name));
1413  BLI_uniquename(channels_base,
1414  channel,
1415  "Channel",
1416  '.',
1417  offsetof(SeqTimelineChannel, name),
1418  sizeof(channel->name));
1419 }
1420 
1421 static char *rna_SeqTimelineChannel_path(const PointerRNA *ptr)
1422 {
1423  Scene *scene = (Scene *)ptr->owner_id;
1424  Editing *ed = SEQ_editing_get(scene);
1426 
1427  Sequence *channel_owner = rna_SeqTimelineChannel_owner_get(ed, channel);
1428 
1429  char channel_name_esc[(sizeof(channel->name)) * 2];
1430  BLI_str_escape(channel_name_esc, channel->name, sizeof(channel_name_esc));
1431 
1432  if (channel_owner == NULL) {
1433  return BLI_sprintfN("sequence_editor.channels[\"%s\"]", channel_name_esc);
1434  }
1435  else {
1436  char owner_name_esc[(sizeof(channel_owner->name) - 2) * 2];
1437  BLI_str_escape(owner_name_esc, channel_owner->name + 2, sizeof(owner_name_esc));
1438  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].channels[\"%s\"]",
1439  owner_name_esc,
1440  channel_name_esc);
1441  }
1442 }
1443 
1444 #else
1445 
1447 {
1448  StructRNA *srna;
1449  PropertyRNA *prop;
1450 
1451  srna = RNA_def_struct(brna, "SequenceElement", NULL);
1452  RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame");
1453  RNA_def_struct_sdna(srna, "StripElem");
1454 
1455  prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
1456  RNA_def_property_string_sdna(prop, NULL, "name");
1457  RNA_def_property_ui_text(prop, "Filename", "Name of the source file");
1458  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceElement_update");
1459 
1460  prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
1461  RNA_def_property_int_sdna(prop, NULL, "orig_width");
1463  RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
1464 
1465  prop = RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
1466  RNA_def_property_int_sdna(prop, NULL, "orig_height");
1468  RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
1469 
1470  prop = RNA_def_property(srna, "orig_fps", PROP_FLOAT, PROP_NONE);
1471  RNA_def_property_float_sdna(prop, NULL, "orig_fps");
1473  RNA_def_property_ui_text(prop, "Orig FPS", "Original frames per second");
1474 }
1475 
1476 static void rna_def_strip_crop(BlenderRNA *brna)
1477 {
1478  StructRNA *srna;
1479  PropertyRNA *prop;
1480 
1481  srna = RNA_def_struct(brna, "SequenceCrop", NULL);
1482  RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip");
1483  RNA_def_struct_sdna(srna, "StripCrop");
1484 
1485  prop = RNA_def_property(srna, "max_y", PROP_INT, PROP_PIXEL);
1486  RNA_def_property_int_sdna(prop, NULL, "top");
1487  RNA_def_property_ui_text(prop, "Top", "Number of pixels to crop from the top");
1488  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1489  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1490 
1491  prop = RNA_def_property(srna, "min_y", PROP_INT, PROP_PIXEL);
1492  RNA_def_property_int_sdna(prop, NULL, "bottom");
1493  RNA_def_property_ui_text(prop, "Bottom", "Number of pixels to crop from the bottom");
1494  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1495  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1496 
1497  prop = RNA_def_property(srna, "min_x", PROP_INT, PROP_PIXEL);
1498  RNA_def_property_int_sdna(prop, NULL, "left");
1499  RNA_def_property_ui_text(prop, "Left", "Number of pixels to crop from the left side");
1500  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1501  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1502 
1503  prop = RNA_def_property(srna, "max_x", PROP_INT, PROP_PIXEL);
1504  RNA_def_property_int_sdna(prop, NULL, "right");
1505  RNA_def_property_ui_text(prop, "Right", "Number of pixels to crop from the right side");
1506  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1507  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1508 
1509  RNA_def_struct_path_func(srna, "rna_SequenceCrop_path");
1510 }
1511 
1513  {SEQ_TRANSFORM_FILTER_NEAREST, "NEAREST", 0, "Nearest", ""},
1514  {SEQ_TRANSFORM_FILTER_BILINEAR, "BILINEAR", 0, "Bilinear", ""},
1515  {0, NULL, 0, NULL, NULL},
1516 };
1517 
1519 {
1520  StructRNA *srna;
1521  PropertyRNA *prop;
1522 
1523  srna = RNA_def_struct(brna, "SequenceTransform", NULL);
1524  RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform parameters for a sequence strip");
1525  RNA_def_struct_sdna(srna, "StripTransform");
1526 
1527  prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
1528  RNA_def_property_float_sdna(prop, NULL, "scale_x");
1529  RNA_def_property_ui_text(prop, "Scale X", "Scale along X axis");
1530  RNA_def_property_ui_range(prop, 0, FLT_MAX, 3, 3);
1531  RNA_def_property_float_default(prop, 1.0f);
1532  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1533 
1534  prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
1535  RNA_def_property_float_sdna(prop, NULL, "scale_y");
1536  RNA_def_property_ui_text(prop, "Scale Y", "Scale along Y axis");
1537  RNA_def_property_ui_range(prop, 0, FLT_MAX, 3, 3);
1538  RNA_def_property_float_default(prop, 1.0f);
1539  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1540 
1541  prop = RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_PIXEL);
1542  RNA_def_property_float_sdna(prop, NULL, "xofs");
1543  RNA_def_property_ui_text(prop, "Translate X", "Move along X axis");
1544  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 100, 3);
1545  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1546 
1547  prop = RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_PIXEL);
1548  RNA_def_property_float_sdna(prop, NULL, "yofs");
1549  RNA_def_property_ui_text(prop, "Translate Y", "Move along Y axis");
1550  RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 100, 3);
1551  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1552 
1553  prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE);
1554  RNA_def_property_float_sdna(prop, NULL, "rotation");
1555  RNA_def_property_ui_text(prop, "Rotation", "Rotate around image center");
1556  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1557 
1558  prop = RNA_def_property(srna, "origin", PROP_FLOAT, PROP_NONE);
1559  RNA_def_property_float_sdna(prop, NULL, "origin");
1560  RNA_def_property_ui_text(prop, "Origin", "Origin of image for transformation");
1561  RNA_def_property_ui_range(prop, 0, 1, 1, 3);
1562  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1563 
1564  prop = RNA_def_property(srna, "filter", PROP_ENUM, PROP_NONE);
1565  RNA_def_property_enum_sdna(prop, NULL, "filter");
1568  RNA_def_property_ui_text(prop, "Filter", "Type of filter to use for image transformation");
1569  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1570 
1571  RNA_def_struct_path_func(srna, "rna_SequenceTransform_path");
1572 }
1573 
1575 {
1576  StructRNA *srna;
1577  PropertyRNA *prop;
1578 
1579  static const EnumPropertyItem seq_tc_items[] = {
1580  {SEQ_PROXY_TC_NONE, "NONE", 0, "None", ""},
1582  "RECORD_RUN",
1583  0,
1584  "Record Run",
1585  "Use images in the order as they are recorded"},
1587  "FREE_RUN",
1588  0,
1589  "Free Run",
1590  "Use global timestamp written by recording device"},
1592  "FREE_RUN_REC_DATE",
1593  0,
1594  "Free Run (rec date)",
1595  "Interpolate a global timestamp using the "
1596  "record date and time written by recording device"},
1598  "RECORD_RUN_NO_GAPS",
1599  0,
1600  "Record Run No Gaps",
1601  "Like record run, but ignore timecode, "
1602  "changes in framerate or dropouts"},
1603  {0, NULL, 0, NULL, NULL},
1604  };
1605 
1606  srna = RNA_def_struct(brna, "SequenceProxy", NULL);
1607  RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
1608  RNA_def_struct_sdna(srna, "StripProxy");
1609 
1610  prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
1611  RNA_def_property_string_sdna(prop, NULL, "dir");
1612  RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
1613  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
1614 
1615  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
1616  RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
1618  "rna_Sequence_proxy_filepath_get",
1619  "rna_Sequence_proxy_filepath_length",
1620  "rna_Sequence_proxy_filepath_set");
1621 
1622  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
1623 
1624  prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
1626  RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing proxy files when building");
1627 
1628  prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
1629  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
1630  RNA_def_property_ui_text(prop, "25%", "Build 25% proxy resolution");
1631 
1632  prop = RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
1633  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_50);
1634  RNA_def_property_ui_text(prop, "50%", "Build 50% proxy resolution");
1635 
1636  prop = RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
1637  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_75);
1638  RNA_def_property_ui_text(prop, "75%", "Build 75% proxy resolution");
1639 
1640  prop = RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
1641  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_100);
1642  RNA_def_property_ui_text(prop, "100%", "Build 100% proxy resolution");
1643 
1644  prop = RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
1646  RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
1647 
1648  prop = RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
1649  RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_FREE_RUN);
1650  RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index");
1651 
1652  prop = RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
1654  prop, NULL, "build_tc_flags", SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN);
1656  prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time");
1657 
1658  prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
1659  RNA_def_property_int_sdna(prop, NULL, "quality");
1660  RNA_def_property_ui_text(prop, "Quality", "Quality of proxies to build");
1661  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
1662 
1663  prop = RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
1664  RNA_def_property_enum_sdna(prop, NULL, "tc");
1665  RNA_def_property_enum_items(prop, seq_tc_items);
1666  RNA_def_property_ui_text(prop, "Timecode", "Method for reading the inputs timecode");
1667  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_tcindex_update");
1668 
1669  prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
1671  RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
1673  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1674 
1675  prop = RNA_def_property(srna, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
1677  RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
1679  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1680 }
1681 
1683 {
1684  StructRNA *srna;
1685  PropertyRNA *prop;
1686 
1687  static const EnumPropertyItem method_items[] = {
1688  {SEQ_COLOR_BALANCE_METHOD_LIFTGAMMAGAIN, "LIFT_GAMMA_GAIN", 0, "Lift/Gamma/Gain", ""},
1690  "OFFSET_POWER_SLOPE",
1691  0,
1692  "Offset/Power/Slope (ASC-CDL)",
1693  "ASC-CDL standard color correction"},
1694  {0, NULL, 0, NULL, NULL},
1695  };
1696 
1697  srna = RNA_def_struct(brna, "SequenceColorBalanceData", NULL);
1699  "Sequence Color Balance Data",
1700  "Color balance parameters for a sequence strip and its modifiers");
1701  RNA_def_struct_sdna(srna, "StripColorBalance");
1702 
1703  prop = RNA_def_property(srna, "correction_method", PROP_ENUM, PROP_NONE);
1704  RNA_def_property_enum_sdna(prop, NULL, "method");
1705  RNA_def_property_enum_items(prop, method_items);
1706  RNA_def_property_ui_text(prop, "Correction Method", "");
1707  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1708 
1709  prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR_GAMMA);
1710  RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
1711  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1712  RNA_def_property_float_default(prop, 1.0f);
1713  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1714 
1715  prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR_GAMMA);
1716  RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
1717  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1718  RNA_def_property_float_default(prop, 1.0f);
1719  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1720 
1721  prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR_GAMMA);
1722  RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
1723  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1724  RNA_def_property_float_default(prop, 1.0f);
1725  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1726 
1727  prop = RNA_def_property(srna, "slope", PROP_FLOAT, PROP_COLOR_GAMMA);
1728  RNA_def_property_ui_text(prop, "Slope", "Correction for highlights");
1729  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1730  RNA_def_property_float_default(prop, 1.0f);
1731  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1732 
1733  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_COLOR_GAMMA);
1734  RNA_def_property_ui_text(prop, "Offset", "Correction for entire tonal range");
1735  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1736  RNA_def_property_float_default(prop, 1.0f);
1737  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1738 
1739  prop = RNA_def_property(srna, "power", PROP_FLOAT, PROP_COLOR_GAMMA);
1740  RNA_def_property_ui_text(prop, "Power", "Correction for midtones");
1741  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1742  RNA_def_property_float_default(prop, 1.0f);
1743  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1744 
1745  prop = RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
1747  RNA_def_property_ui_text(prop, "Inverse Lift", "Invert the lift color");
1748  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1749 
1750  prop = RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
1752  RNA_def_property_ui_text(prop, "Inverse Gamma", "Invert the gamma color");
1753  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1754 
1755  prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
1757  RNA_def_property_ui_text(prop, "Inverse Gain", "Invert the gain color");
1758  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1759 
1760  prop = RNA_def_property(srna, "invert_slope", PROP_BOOLEAN, PROP_NONE);
1762  RNA_def_property_ui_text(prop, "Inverse Slope", "Invert the slope color");
1763  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1764 
1765  prop = RNA_def_property(srna, "invert_offset", PROP_BOOLEAN, PROP_NONE);
1767  RNA_def_property_ui_text(prop, "Inverse Offset", "Invert the offset color");
1768  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1769 
1770  prop = RNA_def_property(srna, "invert_power", PROP_BOOLEAN, PROP_NONE);
1772  RNA_def_property_ui_text(prop, "Inverse Power", "Invert the power color");
1773  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1774 
1775  /* not yet used */
1776 # if 0
1777  prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
1778  RNA_def_property_range(prop, 0.0f, 1.0f);
1779  RNA_def_property_ui_text(prop, "Exposure", "");
1780  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
1781 
1782  prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
1783  RNA_def_property_range(prop, 0.0f, 1.0f);
1784  RNA_def_property_ui_text(prop, "Saturation", "");
1785  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
1786 # endif
1787 
1788  RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
1789 }
1790 
1792 {
1793  StructRNA *srna;
1794 
1795  srna = RNA_def_struct(brna, "SequenceColorBalance", "SequenceColorBalanceData");
1797  srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
1798  RNA_def_struct_sdna(srna, "StripColorBalance");
1799 }
1800 
1802  {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
1803  {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
1805  {SEQ_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
1806  {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
1807  {SEQ_TYPE_COLOR_BURN, "BURN", 0, "Color Burn", ""},
1808  {SEQ_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
1810  {SEQ_TYPE_LIGHTEN, "LIGHTEN", 0, "Lighten", ""},
1811  {SEQ_TYPE_SCREEN, "SCREEN", 0, "Screen", ""},
1812  {SEQ_TYPE_DODGE, "DODGE", 0, "Color Dodge", ""},
1813  {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
1815  {SEQ_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
1816  {SEQ_TYPE_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
1817  {SEQ_TYPE_HARD_LIGHT, "HARD_LIGHT", 0, "Hard Light", ""},
1818  {SEQ_TYPE_VIVID_LIGHT, "VIVID_LIGHT", 0, "Vivid Light", ""},
1819  {SEQ_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
1820  {SEQ_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
1822  {SEQ_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
1823  {SEQ_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
1824  {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
1826  {SEQ_TYPE_HUE, "HUE", 0, "Hue", ""},
1827  {SEQ_TYPE_SATURATION, "SATURATION", 0, "Saturation", ""},
1828  {SEQ_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
1829  {SEQ_TYPE_VALUE, "VALUE", 0, "Value", ""},
1831  {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
1832  {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
1833  {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
1834  {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
1835  {0, NULL, 0, NULL, NULL},
1836 };
1837 
1839 {
1840  StructRNA *srna;
1841 
1842  FunctionRNA *func;
1843  PropertyRNA *parm;
1844 
1845  RNA_def_property_srna(cprop, "SequenceModifiers");
1846  srna = RNA_def_struct(brna, "SequenceModifiers", NULL);
1847  RNA_def_struct_sdna(srna, "Sequence");
1848  RNA_def_struct_ui_text(srna, "Strip Modifiers", "Collection of strip modifiers");
1849 
1850  /* add modifier */
1851  func = RNA_def_function(srna, "new", "rna_Sequence_modifier_new");
1853  RNA_def_function_ui_description(func, "Add a new modifier");
1854  parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier");
1856  /* modifier to add */
1857  parm = RNA_def_enum(func,
1858  "type",
1861  "",
1862  "Modifier type to add");
1864  /* return type */
1865  parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Newly created modifier");
1866  RNA_def_function_return(func, parm);
1867 
1868  /* remove modifier */
1869  func = RNA_def_function(srna, "remove", "rna_Sequence_modifier_remove");
1871  RNA_def_function_ui_description(func, "Remove an existing modifier from the sequence");
1872  /* modifier to remove */
1873  parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Modifier to remove");
1876 
1877  /* clear all modifiers */
1878  func = RNA_def_function(srna, "clear", "rna_Sequence_modifier_clear");
1880  RNA_def_function_ui_description(func, "Remove all modifiers from the sequence");
1881 }
1882 
1883 static void rna_def_sequence(BlenderRNA *brna)
1884 {
1885  StructRNA *srna;
1886  PropertyRNA *prop;
1887 
1888  static const EnumPropertyItem seq_type_items[] = {
1889  {SEQ_TYPE_IMAGE, "IMAGE", 0, "Image", ""},
1890  {SEQ_TYPE_META, "META", 0, "Meta", ""},
1891  {SEQ_TYPE_SCENE, "SCENE", 0, "Scene", ""},
1892  {SEQ_TYPE_MOVIE, "MOVIE", 0, "Movie", ""},
1893  {SEQ_TYPE_MOVIECLIP, "MOVIECLIP", 0, "Clip", ""},
1894  {SEQ_TYPE_MASK, "MASK", 0, "Mask", ""},
1895  {SEQ_TYPE_SOUND_RAM, "SOUND", 0, "Sound", ""},
1896  {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
1897  {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
1898  {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
1899  {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
1900  {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
1901  {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
1902  {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
1903  {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
1904  {SEQ_TYPE_WIPE, "WIPE", 0, "Wipe", ""},
1905  {SEQ_TYPE_GLOW, "GLOW", 0, "Glow", ""},
1906  {SEQ_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
1907  {SEQ_TYPE_COLOR, "COLOR", 0, "Color", ""},
1908  {SEQ_TYPE_SPEED, "SPEED", 0, "Speed", ""},
1909  {SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
1910  {SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
1911  {SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
1912  {SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
1913  {SEQ_TYPE_COLORMIX, "COLORMIX", 0, "Color Mix", ""},
1914  {0, NULL, 0, NULL, NULL},
1915  };
1916 
1917  srna = RNA_def_struct(brna, "Sequence", NULL);
1918  RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor");
1919  RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
1920  RNA_def_struct_path_func(srna, "rna_Sequence_path");
1921  RNA_def_struct_idprops_func(srna, "rna_Sequence_idprops");
1922 
1923  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
1925  prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
1926  RNA_def_property_string_maxlength(prop, sizeof(((Sequence *)NULL)->name) - 2);
1927  RNA_def_property_ui_text(prop, "Name", "");
1928  RNA_def_struct_name_property(srna, prop);
1930 
1931  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
1933  RNA_def_property_enum_items(prop, seq_type_items);
1934  RNA_def_property_ui_text(prop, "Type", "");
1936  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
1937 
1938  /* flags */
1939  prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
1940  RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
1941  RNA_def_property_ui_text(prop, "Select", "");
1943 
1944  prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
1946  RNA_def_property_ui_text(prop, "Left Handle Selected", "");
1948 
1949  prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
1951  RNA_def_property_ui_text(prop, "Right Handle Selected", "");
1953 
1954  prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
1956  RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1);
1958  prop, "Mute", "Disable strip so that it cannot be viewed in the output");
1959  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
1960 
1961  prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
1964  RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
1965  RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it cannot be transformed");
1967 
1968  /* strip positioning */
1969  /* Cache has to be invalidated before and after transformation. */
1970  prop = RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
1971  RNA_def_property_range(prop, 1, MAXFRAME);
1974  prop, "Length", "The length of the contents of this strip after the handles are applied");
1976  prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set", NULL);
1977  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1979  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1980 
1981  prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
1982  RNA_def_property_int_sdna(prop, NULL, "len");
1984  RNA_def_property_range(prop, 1, MAXFRAME);
1986  prop, "Length", "The length of the contents of this strip before the handles are applied");
1987 
1988  prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
1989  RNA_def_property_float_sdna(prop, NULL, "start");
1991  RNA_def_property_ui_text(prop, "Start Frame", "X position where the strip begins");
1994  prop, NULL, "rna_Sequence_start_frame_set", NULL); /* overlap tests and calc_seq_disp */
1995  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1997  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1998 
1999  prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
2000  RNA_def_property_int_sdna(prop, NULL, "startdisp");
2002  prop, "rna_Sequence_frame_final_start_get", "rna_Sequence_start_frame_final_set", NULL);
2003  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
2006  prop,
2007  "Start Frame",
2008  "Start frame displayed in the sequence editor after offsets are applied, setting this is "
2009  "equivalent to moving the handle, not the actual start frame");
2010  /* overlap tests and calc_seq_disp */
2012  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2013 
2014  prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
2015  RNA_def_property_int_sdna(prop, NULL, "enddisp");
2017  prop, "rna_Sequence_frame_final_end_get", "rna_Sequence_end_frame_final_set", NULL);
2018  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
2021  prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
2022  /* overlap tests and calc_seq_disp */
2024  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2025 
2026  prop = RNA_def_property(srna, "frame_offset_start", PROP_FLOAT, PROP_TIME);
2027  RNA_def_property_float_sdna(prop, NULL, "startofs");
2028  // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
2029  RNA_def_property_ui_text(prop, "Start Offset", "");
2032  prop, NULL, "rna_Sequence_frame_offset_start_set", "rna_Sequence_frame_offset_start_range");
2033  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
2034 
2035  prop = RNA_def_property(srna, "frame_offset_end", PROP_FLOAT, PROP_TIME);
2036  RNA_def_property_float_sdna(prop, NULL, "endofs");
2037  // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
2038  RNA_def_property_ui_text(prop, "End Offset", "");
2041  prop, NULL, "rna_Sequence_frame_offset_end_set", "rna_Sequence_frame_offset_end_range");
2042  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
2043 
2044  prop = RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
2045  RNA_def_property_int_sdna(prop, NULL, "machine");
2047  RNA_def_property_range(prop, 1, MAXSEQ);
2048  RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
2049  RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set", NULL); /* overlap test */
2051  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2052 
2053  prop = RNA_def_property(srna, "use_linear_modifiers", PROP_BOOLEAN, PROP_NONE);
2056  "Use Linear Modifiers",
2057  "Calculate modifiers in linear space instead of sequencer's space");
2059  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2060 
2061  /* blending */
2062 
2063  prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
2064  RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
2067  prop, "Blending Mode", "Method for controlling how the strip combines with other strips");
2069  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2070 
2071  prop = RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
2072  RNA_def_property_range(prop, 0.0f, 1.0f);
2074  prop, "Blend Opacity", "Percentage of how much the strip's colors affect other strips");
2075  /* stupid 0-100 -> 0-1 */
2076  RNA_def_property_float_funcs(prop, "rna_Sequence_opacity_get", "rna_Sequence_opacity_set", NULL);
2078  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2079 
2080  prop = RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_FACTOR);
2081  RNA_def_property_range(prop, 0.0f, 1.0f);
2082  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
2083  RNA_def_property_float_sdna(prop, NULL, "effect_fader");
2084  RNA_def_property_ui_text(prop, "Effect Fader Position", "Custom fade value");
2086  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2087 
2088  prop = RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
2091  prop,
2092  "Use Default Fade",
2093  "Fade effect using the built-in default (usually make transition as long as "
2094  "effect strip)");
2096  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2097 
2098  prop = RNA_def_property(srna, "color_tag", PROP_ENUM, PROP_NONE);
2099  RNA_def_property_enum_sdna(prop, NULL, "color_tag");
2101  prop, "rna_Sequence_color_tag_get", "rna_Sequence_color_tag_set", NULL);
2103  RNA_def_property_ui_text(prop, "Strip Color", "Color tag for a strip");
2105 
2106  /* modifiers */
2107  prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
2108  RNA_def_property_struct_type(prop, "SequenceModifier");
2109  RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting this strip");
2110  rna_def_sequence_modifiers(brna, prop);
2111 
2112  prop = RNA_def_property(srna, "use_cache_raw", PROP_BOOLEAN, PROP_NONE);
2115  "Cache Raw",
2116  "Cache raw images read from disk, for faster tweaking of strip "
2117  "parameters at the cost of memory usage");
2118 
2119  prop = RNA_def_property(srna, "use_cache_preprocessed", PROP_BOOLEAN, PROP_NONE);
2122  prop,
2123  "Cache Preprocessed",
2124  "Cache preprocessed images, for faster tweaking of effects at the cost of memory usage");
2125 
2126  prop = RNA_def_property(srna, "use_cache_composite", PROP_BOOLEAN, PROP_NONE);
2129  "Cache Composite",
2130  "Cache intermediate composited images, for faster tweaking of stacked "
2131  "strips at the cost of memory usage");
2132 
2133  prop = RNA_def_property(srna, "override_cache_settings", PROP_BOOLEAN, PROP_NONE);
2135  RNA_def_property_ui_text(prop, "Override Cache Settings", "Override global cache settings");
2136 
2137  RNA_api_sequence_strip(srna);
2138 }
2139 
2140 static void rna_def_channel(BlenderRNA *brna)
2141 {
2142  StructRNA *srna;
2143  PropertyRNA *prop;
2144 
2145  srna = RNA_def_struct(brna, "SequenceTimelineChannel", NULL);
2146  RNA_def_struct_sdna(srna, "SeqTimelineChannel");
2147  RNA_def_struct_path_func(srna, "rna_SeqTimelineChannel_path");
2148  RNA_def_struct_ui_text(srna, "Channel", "");
2149 
2150  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
2152  RNA_def_property_ui_text(prop, "Name", "");
2153  RNA_def_struct_name_property(srna, prop);
2154  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceTimelineChannel_name_set");
2156 
2157  prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
2159  RNA_def_property_ui_text(prop, "Lock channel", "");
2161 
2162  prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
2164  RNA_def_property_ui_text(prop, "Mute channel", "");
2165  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_sound_update");
2166 }
2167 
2168 static void rna_def_editor(BlenderRNA *brna)
2169 {
2170  StructRNA *srna;
2171  FunctionRNA *func;
2172  PropertyRNA *parm;
2173  PropertyRNA *prop;
2174 
2175  static const EnumPropertyItem editing_storage_items[] = {
2176  {0, "PER_STRIP", 0, "Per Strip", "Store proxies using per strip settings"},
2178  "PROJECT",
2179  0,
2180  "Project",
2181  "Store proxies using project directory"},
2182  {0, NULL, 0, NULL, NULL},
2183  };
2184  srna = RNA_def_struct(brna, "SequenceEditor", NULL);
2185  RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene data-block");
2186  RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
2187  RNA_def_struct_sdna(srna, "Editing");
2188 
2189  prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
2190  RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
2191  RNA_def_property_struct_type(prop, "Sequence");
2192  RNA_def_property_ui_text(prop, "Sequences", "Top-level strips only");
2193  RNA_api_sequences(brna, prop, false);
2194 
2195  prop = RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
2196  RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
2197  RNA_def_property_struct_type(prop, "Sequence");
2199  prop, "All Sequences", "All strips, recursively including those inside metastrips");
2201  "rna_SequenceEditor_sequences_all_begin",
2202  "rna_SequenceEditor_sequences_all_next",
2203  "rna_SequenceEditor_sequences_all_end",
2204  "rna_SequenceEditor_sequences_all_get",
2205  NULL,
2206  NULL,
2207  "rna_SequenceEditor_sequences_all_lookup_string",
2208  NULL);
2209 
2210  prop = RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
2211  RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
2212  RNA_def_property_struct_type(prop, "Sequence");
2214  prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
2216  prop, NULL, NULL, NULL, "rna_SequenceEditor_meta_stack_get", NULL, NULL, NULL, NULL);
2217 
2218  prop = RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
2219  RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
2220  RNA_def_property_struct_type(prop, "SequenceTimelineChannel");
2221  RNA_def_property_ui_text(prop, "Channels", "");
2222 
2223  prop = RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
2224  RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
2226  RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
2227 
2228  prop = RNA_def_property(srna, "show_overlay_frame", PROP_BOOLEAN, PROP_NONE);
2229  RNA_def_property_boolean_sdna(prop, NULL, "overlay_frame_flag", SEQ_EDIT_OVERLAY_FRAME_SHOW);
2231  prop, "Show Overlay", "Partial overlay on top of the sequencer with a frame offset");
2233 
2234  prop = RNA_def_property(srna, "use_overlay_frame_lock", PROP_BOOLEAN, PROP_NONE);
2235  RNA_def_property_boolean_sdna(prop, NULL, "overlay_frame_flag", SEQ_EDIT_OVERLAY_FRAME_ABS);
2236  RNA_def_property_ui_text(prop, "Overlay Lock", "");
2237  RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
2239 
2240  /* access to fixed and relative frame */
2241  prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
2242  RNA_def_property_ui_text(prop, "Overlay Offset", "Number of frames to offset");
2244  prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL);
2246 
2247  prop = RNA_def_property(srna, "proxy_storage", PROP_ENUM, PROP_NONE);
2248  RNA_def_property_enum_items(prop, editing_storage_items);
2249  RNA_def_property_ui_text(prop, "Proxy Storage", "How to store proxies for this project");
2250  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
2251 
2252  prop = RNA_def_property(srna, "proxy_dir", PROP_STRING, PROP_DIRPATH);
2253  RNA_def_property_string_sdna(prop, NULL, "proxy_dir");
2254  RNA_def_property_ui_text(prop, "Proxy Directory", "");
2255  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
2256 
2257  /* cache flags */
2258 
2259  prop = RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE);
2261  RNA_def_property_ui_text(prop, "Show Cache", "Visualize cached images on the timeline");
2263 
2264  prop = RNA_def_property(srna, "show_cache_final_out", PROP_BOOLEAN, PROP_NONE);
2266  RNA_def_property_ui_text(prop, "Final Images", "Visualize cached complete frames");
2268 
2269  prop = RNA_def_property(srna, "show_cache_raw", PROP_BOOLEAN, PROP_NONE);
2271  RNA_def_property_ui_text(prop, "Raw Images", "Visualize cached raw images");
2273 
2274  prop = RNA_def_property(srna, "show_cache_preprocessed", PROP_BOOLEAN, PROP_NONE);
2276  RNA_def_property_ui_text(prop, "Pre-processed Images", "Visualize cached pre-processed images");
2278 
2279  prop = RNA_def_property(srna, "show_cache_composite", PROP_BOOLEAN, PROP_NONE);
2281  RNA_def_property_ui_text(prop, "Composite Images", "Visualize cached composite images");
2283 
2284  prop = RNA_def_property(srna, "use_cache_raw", PROP_BOOLEAN, PROP_NONE);
2287  "Cache Raw",
2288  "Cache raw images read from disk, for faster tweaking of strip "
2289  "parameters at the cost of memory usage");
2290 
2291  prop = RNA_def_property(srna, "use_cache_preprocessed", PROP_BOOLEAN, PROP_NONE);
2294  prop,
2295  "Cache Pre-processed",
2296  "Cache pre-processed images, for faster tweaking of effects at the cost of memory usage");
2297 
2298  prop = RNA_def_property(srna, "use_cache_composite", PROP_BOOLEAN, PROP_NONE);
2301  "Cache Composite",
2302  "Cache intermediate composited images, for faster tweaking of stacked "
2303  "strips at the cost of memory usage");
2304 
2305  prop = RNA_def_property(srna, "use_cache_final", PROP_BOOLEAN, PROP_NONE);
2307  RNA_def_property_ui_text(prop, "Cache Final", "Cache final image for each frame");
2308 
2309  prop = RNA_def_property(srna, "use_prefetch", PROP_BOOLEAN, PROP_NONE);
2312  prop,
2313  "Prefetch Frames",
2314  "Render frames ahead of current frame in the background for faster playback");
2316 
2317  /* functions */
2318 
2319  func = RNA_def_function(srna, "display_stack", "rna_SequenceEditor_display_stack");
2321  RNA_def_function_ui_description(func, "Display sequences stack");
2322  parm = RNA_def_pointer(
2323  func, "meta_sequence", "Sequence", "Meta Sequence", "Meta to display its stack");
2325 }
2326 
2328 {
2329  PropertyRNA *prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
2330  RNA_def_property_float_sdna(prop, NULL, "speed_factor");
2331  RNA_def_property_float_default(prop, 1.0f);
2332  RNA_def_property_range(prop, 0.1f, FLT_MAX);
2333  RNA_def_property_ui_range(prop, 1.0f, 100.0f, 10.0, 3);
2334  RNA_def_property_ui_text(prop, "Speed Factor", "Multiply playback speed");
2336  prop, NULL, "rna_Sequence_speed_factor_set", NULL); /* overlap test */
2337  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_speed_factor_update");
2338 }
2339 
2341 {
2342  PropertyRNA *prop;
2343 
2344  static const EnumPropertyItem alpha_mode_items[] = {
2346  "STRAIGHT",
2347  0,
2348  "Straight",
2349  "RGB channels in transparent pixels are unaffected by the alpha channel"},
2351  "PREMUL",
2352  0,
2353  "Premultiplied",
2354  "RGB channels in transparent pixels are multiplied by the alpha channel"},
2355  {0, NULL, 0, NULL, NULL},
2356  };
2357 
2358  prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
2360  RNA_def_property_ui_text(prop, "Deinterlace", "Remove fields from video movies");
2361  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_reopen_files_update");
2362 
2363  prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
2364  RNA_def_property_enum_items(prop, alpha_mode_items);
2366  prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
2367  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2368 
2369  prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
2371  RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
2372  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2373 
2374  prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
2376  RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
2377  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2378 
2379  prop = RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
2381  RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
2382  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2383 
2384  prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
2386  RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse frame order");
2388  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2389 
2390  prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
2391  RNA_def_property_float_sdna(prop, NULL, "mul");
2392  RNA_def_property_range(prop, 0.0f, 20.0f);
2393  RNA_def_property_float_default(prop, 1.0f);
2394  RNA_def_property_ui_text(prop, "Multiply Colors", "");
2396  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2397 
2398  prop = RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
2399  RNA_def_property_float_sdna(prop, NULL, "sat");
2400  RNA_def_property_range(prop, 0.0f, 20.0f);
2401  RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
2402  RNA_def_property_float_default(prop, 1.0f);
2403  RNA_def_property_ui_text(prop, "Saturation", "Adjust the intensity of the input's color");
2405  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2406 
2407  prop = RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
2408  RNA_def_property_range(prop, 1.0f, 30.0f);
2409  RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
2411  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2412 
2413  prop = RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
2414  RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
2415  RNA_def_property_ui_text(prop, "Transform", "");
2416 
2417  prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
2418  RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
2419  RNA_def_property_ui_text(prop, "Crop", "");
2420 }
2421 
2422 static void rna_def_proxy(StructRNA *srna)
2423 {
2424  PropertyRNA *prop;
2425 
2426  prop = RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
2429  prop, "Use Proxy / Timecode", "Use a preview proxy and/or time-code index for this strip");
2430  RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set");
2432  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2433 
2434  prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
2435  RNA_def_property_pointer_sdna(prop, NULL, "strip->proxy");
2436  RNA_def_property_ui_text(prop, "Proxy", "");
2437 }
2438 
2439 static void rna_def_input(StructRNA *srna)
2440 {
2441  PropertyRNA *prop;
2442 
2443  prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED);
2444  RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
2447  NULL,
2448  "rna_Sequence_anim_startofs_final_set",
2449  "rna_Sequence_anim_startofs_final_range"); /* overlap tests */
2450  RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
2452  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2453 
2454  prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
2455  RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
2458  NULL,
2459  "rna_Sequence_anim_endofs_final_set",
2460  "rna_Sequence_anim_endofs_final_range"); /* overlap tests */
2461  RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
2463  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2464 }
2465 
2466 static void rna_def_effect_inputs(StructRNA *srna, int count)
2467 {
2468  PropertyRNA *prop;
2469 
2470  prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
2472  RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
2473 
2474  if (count >= 1) {
2475  prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
2476  RNA_def_property_pointer_sdna(prop, NULL, "seq1");
2478  RNA_def_property_pointer_funcs(prop, NULL, "rna_Sequence_input_1_set", NULL, NULL);
2479  RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
2480  }
2481 
2482  if (count >= 2) {
2483  prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
2484  RNA_def_property_pointer_sdna(prop, NULL, "seq2");
2486  RNA_def_property_pointer_funcs(prop, NULL, "rna_Sequence_input_2_set", NULL, NULL);
2487  RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
2488  }
2489 
2490 # if 0
2491  if (count == 3) {
2492  /* Not used by any effects (perhaps one day plugins?). */
2493  prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
2494  RNA_def_property_pointer_sdna(prop, NULL, "seq3");
2496  RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
2497  }
2498 # endif
2499 }
2500 
2502 {
2503  PropertyRNA *prop;
2504 
2505  prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
2506  RNA_def_property_pointer_sdna(prop, NULL, "strip->colorspace_settings");
2507  RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
2508  RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
2509 }
2510 
2511 static void rna_def_movie_types(StructRNA *srna)
2512 {
2513  PropertyRNA *prop;
2514 
2515  prop = RNA_def_property(srna, "fps", PROP_FLOAT, PROP_NONE);
2516  RNA_def_property_ui_text(prop, "FPS", "Frames per second");
2518  RNA_def_property_float_funcs(prop, "rna_Sequence_fps_get", NULL, NULL);
2519 }
2520 
2521 static void rna_def_image(BlenderRNA *brna)
2522 {
2523  StructRNA *srna;
2524  PropertyRNA *prop;
2525 
2526  srna = RNA_def_struct(brna, "ImageSequence", "Sequence");
2527  RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images");
2528  RNA_def_struct_sdna(srna, "Sequence");
2529 
2530  prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
2531  RNA_def_property_string_sdna(prop, NULL, "strip->dir");
2532  RNA_def_property_ui_text(prop, "Directory", "");
2533  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2534 
2535  prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
2536  RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
2537  RNA_def_property_struct_type(prop, "SequenceElement");
2538  RNA_def_property_ui_text(prop, "Elements", "");
2540  "rna_SequenceEditor_elements_begin",
2541  "rna_iterator_array_next",
2542  "rna_iterator_array_end",
2543  "rna_iterator_array_get",
2544  "rna_SequenceEditor_elements_length",
2545  NULL,
2546  NULL,
2547  NULL);
2548  RNA_api_sequence_elements(brna, prop);
2549 
2550  /* multiview */
2551  prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
2553  RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
2554  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_views_format_update");
2555 
2556  prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
2557  RNA_def_property_enum_sdna(prop, NULL, "views_format");
2559  RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views");
2560  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update");
2561 
2562  prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
2563  RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
2565  RNA_def_property_struct_type(prop, "Stereo3dFormat");
2566  RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3D");
2567 
2568  rna_def_filter_video(srna);
2569  rna_def_proxy(srna);
2570  rna_def_input(srna);
2572  rna_def_speed_factor(srna);
2573 }
2574 
2575 static void rna_def_meta(BlenderRNA *brna)
2576 {
2577  StructRNA *srna;
2578  FunctionRNA *func;
2579  PropertyRNA *prop;
2580 
2581  srna = RNA_def_struct(brna, "MetaSequence", "Sequence");
2583  srna, "Meta Sequence", "Sequence strip to group other strips as a single sequence strip");
2584  RNA_def_struct_sdna(srna, "Sequence");
2585 
2586  prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
2587  RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
2588  RNA_def_property_struct_type(prop, "Sequence");
2589  RNA_def_property_ui_text(prop, "Sequences", "Sequences nested in meta strip");
2590  RNA_api_sequences(brna, prop, true);
2591 
2592  prop = RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
2593  RNA_def_property_collection_sdna(prop, NULL, "channels", NULL);
2594  RNA_def_property_struct_type(prop, "SequenceTimelineChannel");
2595  RNA_def_property_ui_text(prop, "Channels", "");
2596 
2597  func = RNA_def_function(srna, "separate", "rna_Sequence_separate");
2599  RNA_def_function_ui_description(func, "Separate meta");
2600 
2601  rna_def_filter_video(srna);
2602  rna_def_proxy(srna);
2603  rna_def_input(srna);
2604  rna_def_speed_factor(srna);
2605 }
2606 
2607 static void rna_def_scene(BlenderRNA *brna)
2608 {
2609  StructRNA *srna;
2610  PropertyRNA *prop;
2611 
2612  static const EnumPropertyItem scene_input_items[] = {
2613  {0, "CAMERA", ICON_VIEW3D, "Camera", "Use the Scene's 3D camera as input"},
2615  "SEQUENCER",
2616  ICON_SEQUENCE,
2617  "Sequencer",
2618  "Use the Scene's Sequencer timeline as input"},
2619  {0, NULL, 0, NULL, NULL},
2620  };
2621 
2622  srna = RNA_def_struct(brna, "SceneSequence", "Sequence");
2624  srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene");
2625  RNA_def_struct_sdna(srna, "Sequence");
2626 
2627  prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
2629  RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
2630  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_scene_switch_update");
2631 
2632  prop = RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
2634  RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
2635  RNA_def_property_ui_text(prop, "Camera Override", "Override the scenes active camera");
2636  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2637 
2638  prop = RNA_def_property(srna, "scene_input", PROP_ENUM, PROP_NONE);
2640  RNA_def_property_enum_items(prop, scene_input_items);
2641  RNA_def_property_ui_text(prop, "Input", "Input type to use for the Scene strip");
2642  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_use_sequence");
2643 
2644  prop = RNA_def_property(srna, "use_annotations", PROP_BOOLEAN, PROP_NONE);
2646  RNA_def_property_ui_text(prop, "Use Annotations", "Show Annotations in OpenGL previews");
2647  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2648 
2649  rna_def_filter_video(srna);
2650  rna_def_proxy(srna);
2651  rna_def_input(srna);
2652  rna_def_movie_types(srna);
2653  rna_def_speed_factor(srna);
2654 }
2655 
2656 static void rna_def_movie(BlenderRNA *brna)
2657 {
2658  StructRNA *srna;
2659  PropertyRNA *prop;
2660  FunctionRNA *func;
2661  PropertyRNA *parm;
2662 
2663  srna = RNA_def_struct(brna, "MovieSequence", "Sequence");
2664  RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video");
2665  RNA_def_struct_sdna(srna, "Sequence");
2666 
2667  prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
2668  RNA_def_property_int_sdna(prop, NULL, "streamindex");
2669  RNA_def_property_range(prop, 0, 20);
2671  prop,
2672  "Stream Index",
2673  "For files with several movie streams, use the stream with the given index");
2674  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_reopen_files_update");
2675 
2676  prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
2677  RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
2678  RNA_def_property_struct_type(prop, "SequenceElement");
2679  RNA_def_property_ui_text(prop, "Elements", "");
2681  "rna_SequenceEditor_elements_begin",
2682  "rna_iterator_array_next",
2683  "rna_iterator_array_end",
2684  "rna_iterator_array_get",
2685  "rna_SequenceEditor_elements_length",
2686  NULL,
2687  NULL,
2688  NULL);
2689 
2690  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
2691  RNA_def_property_ui_text(prop, "File", "");
2693  "rna_Sequence_filepath_get",
2694  "rna_Sequence_filepath_length",
2695  "rna_Sequence_filepath_set");
2696  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
2697 
2698  func = RNA_def_function(srna, "reload_if_needed", "rna_MovieSequence_reload_if_needed");
2700  /* return type */
2701  parm = RNA_def_boolean(
2702  func, "can_produce_frames", 0, "True if the strip can produce frames, False otherwise", "");
2703  RNA_def_function_return(func, parm);
2704 
2705  /* metadata */
2706  func = RNA_def_function(srna, "metadata", "rna_MovieSequence_metadata_get");
2707  RNA_def_function_ui_description(func, "Retrieve metadata of the movie file");
2708  /* return type */
2709  parm = RNA_def_pointer(
2710  func, "metadata", "IDPropertyWrapPtr", "", "Dict-like object containing the metadata");
2712  RNA_def_function_return(func, parm);
2713 
2714  /* multiview */
2715  prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
2717  RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
2718  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_views_format_update");
2719 
2720  prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
2721  RNA_def_property_enum_sdna(prop, NULL, "views_format");
2723  RNA_def_property_ui_text(prop, "Views Format", "Mode to load movie views");
2724  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update");
2725 
2726  prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
2727  RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
2729  RNA_def_property_struct_type(prop, "Stereo3dFormat");
2730  RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3D");
2731 
2732  rna_def_filter_video(srna);
2733  rna_def_proxy(srna);
2734  rna_def_input(srna);
2736  rna_def_movie_types(srna);
2737  rna_def_speed_factor(srna);
2738 }
2739 
2740 static void rna_def_movieclip(BlenderRNA *brna)
2741 {
2742  StructRNA *srna;
2743  PropertyRNA *prop;
2744 
2745  srna = RNA_def_struct(brna, "MovieClipSequence", "Sequence");
2747  srna, "MovieClip Sequence", "Sequence strip to load a video from the clip editor");
2748  RNA_def_struct_sdna(srna, "Sequence");
2749 
2750  /* TODO: add clip property? */
2751 
2752  prop = RNA_def_property(srna, "undistort", PROP_BOOLEAN, PROP_NONE);
2754  RNA_def_property_ui_text(prop, "Undistort Clip", "Use the undistorted version of the clip");
2755  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2756 
2757  prop = RNA_def_property(srna, "stabilize2d", PROP_BOOLEAN, PROP_NONE);
2759  RNA_def_property_ui_text(prop, "Stabilize 2D Clip", "Use the 2D stabilized version of the clip");
2760  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2761 
2762  rna_def_filter_video(srna);
2763  rna_def_input(srna);
2764  rna_def_movie_types(srna);
2765  rna_def_speed_factor(srna);
2766 }
2767 
2768 static void rna_def_mask(BlenderRNA *brna)
2769 {
2770  StructRNA *srna;
2771  PropertyRNA *prop;
2772 
2773  srna = RNA_def_struct(brna, "MaskSequence", "Sequence");
2774  RNA_def_struct_ui_text(srna, "Mask Sequence", "Sequence strip to load a video from a mask");
2775  RNA_def_struct_sdna(srna, "Sequence");
2776 
2777  prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
2779  RNA_def_property_ui_text(prop, "Mask", "Mask that this sequence uses");
2780  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2781 
2782  rna_def_filter_video(srna);
2783  rna_def_input(srna);
2784  rna_def_speed_factor(srna);
2785 }
2786 
2787 static void rna_def_sound(BlenderRNA *brna)
2788 {
2789  StructRNA *srna;
2790  PropertyRNA *prop;
2791 
2792  srna = RNA_def_struct(brna, "SoundSequence", "Sequence");
2794  "Sound Sequence",
2795  "Sequence strip defining a sound to be played over a period of time");
2796  RNA_def_struct_sdna(srna, "Sequence");
2797 
2798  prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
2800  RNA_def_property_struct_type(prop, "Sound");
2801  RNA_def_property_ui_text(prop, "Sound", "Sound data-block used by this sequence");
2802  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_sound_update");
2803 
2804  prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
2805  RNA_def_property_float_sdna(prop, NULL, "volume");
2806  RNA_def_property_range(prop, 0.0f, 100.0f);
2807  RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
2809  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_audio_update");
2810 
2811  prop = RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
2812  RNA_def_property_float_sdna(prop, NULL, "pan");
2813  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2814  RNA_def_property_ui_range(prop, -2, 2, 1, 2);
2815  RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
2816  RNA_def_property_float_funcs(prop, NULL, NULL, "rna_Sequence_pan_range");
2817  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_audio_update");
2818 
2819  prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
2822  prop, "Display Waveform", "Display the audio waveform inside the strip");
2824 
2825  rna_def_input(srna);
2826  rna_def_speed_factor(srna);
2827 }
2828 
2829 static void rna_def_effect(BlenderRNA *brna)
2830 {
2831  StructRNA *srna;
2832 
2833  srna = RNA_def_struct(brna, "EffectSequence", "Sequence");
2835  srna,
2836  "Effect Sequence",
2837  "Sequence strip applying an effect on the images created by other strips");
2838  RNA_def_struct_sdna(srna, "Sequence");
2839 
2840  rna_def_filter_video(srna);
2841  rna_def_proxy(srna);
2842 }
2843 
2844 static void rna_def_multicam(StructRNA *srna)
2845 {
2846  PropertyRNA *prop;
2847 
2848  prop = RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
2849  RNA_def_property_int_sdna(prop, NULL, "multicam_source");
2850  RNA_def_property_range(prop, 0, MAXSEQ - 1);
2851  RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
2852  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2853 
2854  rna_def_input(srna);
2855 }
2856 
2857 static void rna_def_wipe(StructRNA *srna)
2858 {
2859  PropertyRNA *prop;
2860 
2861  static const EnumPropertyItem wipe_type_items[] = {
2862  {DO_SINGLE_WIPE, "SINGLE", 0, "Single", ""},
2863  {DO_DOUBLE_WIPE, "DOUBLE", 0, "Double", ""},
2864  /* not used yet {DO_BOX_WIPE, "BOX", 0, "Box", ""}, */
2865  /* not used yet {DO_CROSS_WIPE, "CROSS", 0, "Cross", ""}, */
2866  {DO_IRIS_WIPE, "IRIS", 0, "Iris", ""},
2867  {DO_CLOCK_WIPE, "CLOCK", 0, "Clock", ""},
2868  {0, NULL, 0, NULL, NULL},
2869  };
2870 
2871  static const EnumPropertyItem wipe_direction_items[] = {
2872  {0, "OUT", 0, "Out", ""},
2873  {1, "IN", 0, "In", ""},
2874  {0, NULL, 0, NULL, NULL},
2875  };
2876 
2877  RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
2878 
2879  prop = RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_FACTOR);
2880  RNA_def_property_float_sdna(prop, NULL, "edgeWidth");
2881  RNA_def_property_range(prop, 0.0f, 1.0f);
2883  prop, "Blur Width", "Width of the blur edge, in percentage relative to the image size");
2884  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2885 
2886  prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
2887  RNA_def_property_range(prop, DEG2RADF(-90.0f), DEG2RADF(90.0f));
2888  RNA_def_property_ui_text(prop, "Angle", "Edge angle");
2889  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2890 
2891  prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
2892  RNA_def_property_enum_sdna(prop, NULL, "forward");
2893  RNA_def_property_enum_items(prop, wipe_direction_items);
2894  RNA_def_property_ui_text(prop, "Direction", "Wipe direction");
2895  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2896 
2897  prop = RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
2898  RNA_def_property_enum_sdna(prop, NULL, "wipetype");
2899  RNA_def_property_enum_items(prop, wipe_type_items);
2901  RNA_def_property_ui_text(prop, "Transition Type", "");
2902  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2903 }
2904 
2905 static void rna_def_glow(StructRNA *srna)
2906 {
2907  PropertyRNA *prop;
2908 
2909  RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
2910 
2911  prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_FACTOR);
2912  RNA_def_property_float_sdna(prop, NULL, "fMini");
2913  RNA_def_property_range(prop, 0.0f, 1.0f);
2914  RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
2915  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2916 
2917  prop = RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_FACTOR);
2918  RNA_def_property_float_sdna(prop, NULL, "fClamp");
2919  RNA_def_property_range(prop, 0.0f, 1.0f);
2920  RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
2921  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2922 
2923  prop = RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
2924  RNA_def_property_float_sdna(prop, NULL, "fBoost");
2925  RNA_def_property_range(prop, 0.0f, 10.0f);
2926  RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
2927  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2928 
2929  prop = RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
2930  RNA_def_property_float_sdna(prop, NULL, "dDist");
2931  RNA_def_property_range(prop, 0.5f, 20.0f);
2932  RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
2933  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2934 
2935  prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
2936  RNA_def_property_int_sdna(prop, NULL, "dQuality");
2937  RNA_def_property_range(prop, 1, 5);
2938  RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
2939  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2940 
2941  prop = RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
2942  RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
2943  RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
2944  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2945 }
2946 
2947 static void rna_def_transform(StructRNA *srna)
2948 {
2949  PropertyRNA *prop;
2950 
2951  static const EnumPropertyItem interpolation_items[] = {
2952  {0, "NONE", 0, "None", "No interpolation"},
2953  {1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation"},
2954  {2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation"},
2955  {0, NULL, 0, NULL, NULL},
2956  };
2957 
2958  static const EnumPropertyItem translation_unit_items[] = {
2959  {0, "PIXELS", 0, "Pixels", ""},
2960  {1, "PERCENT", 0, "Percent", ""},
2961  {0, NULL, 0, NULL, NULL},
2962  };
2963 
2964  RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
2965 
2966  prop = RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
2967  RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
2968  RNA_def_property_ui_text(prop, "Scale X", "Amount to scale the input in the X axis");
2969  RNA_def_property_ui_range(prop, 0, 10, 3, 6);
2970  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2971 
2972  prop = RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
2973  RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
2974  RNA_def_property_ui_text(prop, "Scale Y", "Amount to scale the input in the Y axis");
2975  RNA_def_property_ui_range(prop, 0, 10, 3, 6);
2976  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2977 
2978  prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
2979  RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
2980  RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
2981  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2982 
2983  prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
2984  RNA_def_property_float_sdna(prop, NULL, "xIni");
2985  RNA_def_property_ui_text(prop, "Translate X", "Amount to move the input on the X axis");
2986  RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
2987  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2988 
2989  prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
2990  RNA_def_property_float_sdna(prop, NULL, "yIni");
2991  RNA_def_property_ui_text(prop, "Translate Y", "Amount to move the input on the Y axis");
2992  RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
2993  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2994 
2995  prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
2996  RNA_def_property_float_sdna(prop, NULL, "rotIni");
2997  RNA_def_property_ui_text(prop, "Rotation", "Degrees to rotate the input");
2998  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2999 
3000  prop = RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
3001  RNA_def_property_enum_sdna(prop, NULL, "percent");
3002  RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
3003  RNA_def_property_enum_items(prop, translation_unit_items);
3004  RNA_def_property_ui_text(prop, "Translation Unit", "Unit of measure to translate the input");
3005  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3006 
3007  prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
3008  RNA_def_property_enum_items(prop, interpolation_items);
3009  RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
3011  prop, "Interpolation", "Method to determine how missing pixels are created");
3012  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3013 }
3014 
3015 static void rna_def_solid_color(StructRNA *srna)
3016 {
3017  PropertyRNA *prop;
3018 
3019  RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
3020 
3021  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
3022  RNA_def_property_float_sdna(prop, NULL, "col");
3023  RNA_def_property_ui_text(prop, "Color", "Effect Strip color");
3024  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3025 }
3026 
3028 {
3029  PropertyRNA *prop;
3030 
3031  RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
3032 
3033  static const EnumPropertyItem speed_control_items[] = {
3035  "STRETCH",
3036  0,
3037  "Stretch",
3038  "Adjust input playback speed, so its duration fits strip length"},
3039  {SEQ_SPEED_MULTIPLY, "MULTIPLY", 0, "Multiply", "Multiply with the speed factor"},
3041  "FRAME_NUMBER",
3042  0,
3043  "Frame Number",
3044  "Frame number of the input strip"},
3045  {SEQ_SPEED_LENGTH, "LENGTH", 0, "Length", "Percentage of the input strip length"},
3046  {0, NULL, 0, NULL, NULL},
3047  };
3048 
3049  prop = RNA_def_property(srna, "speed_control", PROP_ENUM, PROP_NONE);
3050  RNA_def_property_enum_sdna(prop, NULL, "speed_control_type");
3051  RNA_def_property_enum_items(prop, speed_control_items);
3053  RNA_def_property_ui_text(prop, "Speed Control", "Speed control method");
3054  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3055 
3056  prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
3057  RNA_def_property_float_sdna(prop, NULL, "speed_fader");
3059  prop,
3060  "Multiply Factor",
3061  "Multiply the current speed of the sequence with this number or remap current frame "
3062  "to this frame");
3063  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3064 
3065  prop = RNA_def_property(srna, "speed_frame_number", PROP_FLOAT, PROP_NONE);
3066  RNA_def_property_float_sdna(prop, NULL, "speed_fader_frame_number");
3067  RNA_def_property_ui_text(prop, "Frame Number", "Frame number of input strip");
3068  RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 1.0, -1);
3069  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3070 
3071  prop = RNA_def_property(srna, "speed_length", PROP_FLOAT, PROP_PERCENTAGE);
3072  RNA_def_property_float_sdna(prop, NULL, "speed_fader_length");
3073  RNA_def_property_ui_text(prop, "Length", "Percentage of input strip length");
3074  RNA_def_property_ui_range(prop, 0.0, 100.0, 1, -1);
3075  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3076 
3077  prop = RNA_def_property(srna, "use_frame_interpolate", PROP_BOOLEAN, PROP_NONE);
3080  prop, "Frame Interpolation", "Do crossfade blending between current and next frame");
3081  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3082 }
3083 
3085 {
3086  PropertyRNA *prop;
3087 
3088  RNA_def_struct_sdna_from(srna, "GaussianBlurVars", "effectdata");
3089  prop = RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_UNSIGNED);
3090  RNA_def_property_ui_text(prop, "Size X", "Size of the blur along X axis");
3091  RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
3092  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3093 
3094  prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_UNSIGNED);
3095  RNA_def_property_ui_text(prop, "Size Y", "Size of the blur along Y axis");
3096  RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
3097  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3098 }
3099 
3100 static void rna_def_text(StructRNA *srna)
3101 {
3102  /* Avoid text icons because they imply this aligns within a frame, see: T71082 */
3103  static const EnumPropertyItem text_align_x_items[] = {
3104  {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", ICON_ANCHOR_LEFT, "Left", ""},
3105  {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
3106  {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", ICON_ANCHOR_RIGHT, "Right", ""},
3107  {0, NULL, 0, NULL, NULL},
3108  };
3109  static const EnumPropertyItem text_align_y_items[] = {
3110  {SEQ_TEXT_ALIGN_Y_TOP, "TOP", ICON_ANCHOR_TOP, "Top", ""},
3111  {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
3112  {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", ICON_ANCHOR_BOTTOM, "Bottom", ""},
3113  {0, NULL, 0, NULL, NULL},
3114  };
3115 
3116  PropertyRNA *prop;
3117 
3118  RNA_def_struct_sdna_from(srna, "TextVars", "effectdata");
3119 
3120  prop = RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
3121  RNA_def_property_pointer_sdna(prop, NULL, "text_font");
3122  RNA_def_property_ui_icon(prop, ICON_FILE_FONT, false);
3123  RNA_def_property_ui_text(prop, "Font", "Font of the text. Falls back to the UI font by default");
3125  RNA_def_property_pointer_funcs(prop, NULL, "rna_Sequence_text_font_set", NULL, NULL);
3126  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3127 
3128  prop = RNA_def_property(srna, "font_size", PROP_FLOAT, PROP_UNSIGNED);
3129  RNA_def_property_float_sdna(prop, NULL, "text_size");
3130  RNA_def_property_ui_text(prop, "Size", "Size of the text");
3131  RNA_def_property_range(prop, 0.0, 2000);
3132  RNA_def_property_ui_range(prop, 0.0f, 2000, 10.0f, 1);
3133  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3134 
3135  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
3136  RNA_def_property_float_sdna(prop, NULL, "color");
3137  RNA_def_property_ui_text(prop, "Color", "Text color");
3138  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3139 
3140  prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR_GAMMA);
3141  RNA_def_property_float_sdna(prop, NULL, "shadow_color");
3142  RNA_def_property_ui_text(prop, "Shadow Color", "");
3143  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3144 
3145  prop = RNA_def_property(srna, "box_color", PROP_FLOAT, PROP_COLOR_GAMMA);
3146  RNA_def_property_float_sdna(prop, NULL, "box_color");
3147  RNA_def_property_ui_text(prop, "Box Color", "");
3148  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3149 
3150  prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
3151  RNA_def_property_float_sdna(prop, NULL, "loc");
3152  RNA_def_property_ui_text(prop, "Location", "Location of the text");
3153  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3154  RNA_def_property_ui_range(prop, -10.0, 10.0, 1, -1);
3155  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3156 
3157  prop = RNA_def_property(srna, "wrap_width", PROP_FLOAT, PROP_NONE);
3158  RNA_def_property_float_sdna(prop, NULL, "wrap_width");
3159  RNA_def_property_ui_text(prop, "Wrap Width", "Word wrap width as factor, zero disables");
3160  RNA_def_property_range(prop, 0, FLT_MAX);
3161  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
3162  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3163 
3164  prop = RNA_def_property(srna, "box_margin", PROP_FLOAT, PROP_NONE);
3165  RNA_def_property_float_sdna(prop, NULL, "box_margin");
3166  RNA_def_property_ui_text(prop, "Box Margin", "Box margin as factor of image width");
3167  RNA_def_property_range(prop, 0, 1.0);
3168  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
3169  RNA_def_property_float_default(prop, 0.01f);
3170  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3171 
3172  prop = RNA_def_property(srna, "align_x", PROP_ENUM, PROP_NONE);
3173  RNA_def_property_enum_sdna(prop, NULL, "align");
3174  RNA_def_property_enum_items(prop, text_align_x_items);
3176  prop, "Align X", "Align the text along the X axis, relative to the text bounds");
3177  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3178 
3179  prop = RNA_def_property(srna, "align_y", PROP_ENUM, PROP_NONE);
3180  RNA_def_property_enum_sdna(prop, NULL, "align_y");
3181  RNA_def_property_enum_items(prop, text_align_y_items);
3183  prop, "Align Y", "Align the text along the Y axis, relative to the text bounds");
3184  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3185 
3186  prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
3187  RNA_def_property_ui_text(prop, "Text", "Text that will be displayed");
3188  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3189 
3190  prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
3192  RNA_def_property_ui_text(prop, "Shadow", "Display shadow behind text");
3193  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3194 
3195  prop = RNA_def_property(srna, "use_box", PROP_BOOLEAN, PROP_NONE);
3197  RNA_def_property_ui_text(prop, "Box", "Display colored box behind text");
3198  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3199 
3200  prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
3202  RNA_def_property_ui_text(prop, "Bold", "Display text as bold");
3203  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3204 
3205  prop = RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE);
3207  RNA_def_property_ui_text(prop, "Italic", "Display text as italic");
3208  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3209 }
3210 
3211 static void rna_def_color_mix(StructRNA *srna)
3212 {
3213  static EnumPropertyItem blend_color_items[] = {
3214  {SEQ_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
3215  {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
3216  {SEQ_TYPE_COLOR_BURN, "BURN", 0, "Color Burn", ""},
3217  {SEQ_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
3219  {SEQ_TYPE_LIGHTEN, "LIGHTEN", 0, "Lighten", ""},
3220  {SEQ_TYPE_SCREEN, "SCREEN", 0, "Screen", ""},
3221  {SEQ_TYPE_DODGE, "DODGE", 0, "Color Dodge", ""},
3222  {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
3224  {SEQ_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
3225  {SEQ_TYPE_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
3226  {SEQ_TYPE_HARD_LIGHT, "HARD_LIGHT", 0, "Hard Light", ""},
3227  {SEQ_TYPE_VIVID_LIGHT, "VIVID_LIGHT", 0, "Vivid Light", ""},
3228  {SEQ_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
3229  {SEQ_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
3231  {SEQ_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
3232  {SEQ_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
3233  {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
3235  {SEQ_TYPE_HUE, "HUE", 0, "Hue", ""},
3236  {SEQ_TYPE_SATURATION, "SATURATION", 0, "Saturation", ""},
3237  {SEQ_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
3238  {SEQ_TYPE_VALUE, "VALUE", 0, "Value", ""},
3239  {0, NULL, 0, NULL, NULL},
3240  };
3241 
3242  PropertyRNA *prop;
3243 
3244  RNA_def_struct_sdna_from(srna, "ColorMixVars", "effectdata");
3245 
3246  prop = RNA_def_property(srna, "blend_effect", PROP_ENUM, PROP_NONE);
3247  RNA_def_property_enum_sdna(prop, NULL, "blend_effect");
3248  RNA_def_property_enum_items(prop, blend_color_items);
3250  prop, "Blending Mode", "Method for controlling how the strip combines with other strips");
3251  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3252 
3253  prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_FACTOR);
3254  RNA_def_property_range(prop, 0.0f, 1.0f);
3256  prop, "Blend Factor", "Percentage of how much the strip's colors affect other strips");
3257  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
3258 }
3259 
3261  {"AddSequence", "Add Sequence", "Add Sequence", NULL, 2},
3262  {"AdjustmentSequence",
3263  "Adjustment Layer Sequence",
3264  "Sequence strip to perform filter adjustments to layers below",
3265  rna_def_input,
3266  0},
3267  {"AlphaOverSequence", "Alpha Over Sequence", "Alpha Over Sequence", NULL, 2},
3268  {"AlphaUnderSequence", "Alpha Under Sequence", "Alpha Under Sequence", NULL, 2},
3269  {"ColorSequence",
3270  "Color Sequence",
3271  "Sequence strip creating an image filled with a single color",
3273  0},
3274  {"CrossSequence", "Cross Sequence", "Cross Sequence", NULL, 2},
3275  {"GammaCrossSequence", "Gamma Cross Sequence", "Gamma Cross Sequence", NULL, 2},
3276  {"GlowSequence", "Glow Sequence", "Sequence strip creating a glow effect", rna_def_glow, 1},
3277  {"MulticamSequence",
3278  "Multicam Select Sequence",
3279  "Sequence strip to perform multicam editing",
3281  0},
3282  {"MultiplySequence", "Multiply Sequence", "Multiply Sequence", NULL, 2},
3283  {"OverDropSequence", "Over Drop Sequence", "Over Drop Sequence", NULL, 2},
3284  {"SpeedControlSequence",
3285  "SpeedControl Sequence",
3286  "Sequence strip to control the speed of other strips",
3288  1},
3289  {"SubtractSequence", "Subtract Sequence", "Subtract Sequence", NULL, 2},
3290  {"TransformSequence",
3291  "Transform Sequence",
3292  "Sequence strip applying affine transformations to other strips",
3294  1},
3295  {"WipeSequence",
3296  "Wipe Sequence",
3297  "Sequence strip creating a wipe transition",
3298  rna_def_wipe,
3299  2},
3300  {"GaussianBlurSequence",
3301  "Gaussian Blur Sequence",
3302  "Sequence strip creating a gaussian blur",
3304  1},
3305  {"TextSequence", "Text Sequence", "Sequence strip creating text", rna_def_text, 0},
3306  {"ColorMixSequence", "Color Mix Sequence", "Color Mix Sequence", rna_def_color_mix, 2},
3307  {"", "", "", NULL, 0},
3308 };
3309 
3310 static void rna_def_effects(BlenderRNA *brna)
3311 {
3312  StructRNA *srna;
3313  EffectInfo *effect;
3314 
3315  for (effect = def_effects; effect->struct_name[0] != '\0'; effect++) {
3316  srna = RNA_def_struct(brna, effect->struct_name, "EffectSequence");
3317  RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
3318  RNA_def_struct_sdna(srna, "Sequence");
3319 
3320  rna_def_effect_inputs(srna, effect->inputs);
3321 
3322  if (effect->func) {
3323  effect->func(srna);
3324  }
3325  }
3326 }
3327 
3328 static void rna_def_modifier(BlenderRNA *brna)
3329 {
3330  StructRNA *srna;
3331  PropertyRNA *prop;
3332 
3333  static const EnumPropertyItem mask_input_type_items[] = {
3334  {SEQUENCE_MASK_INPUT_STRIP, "STRIP", 0, "Strip", "Use sequencer strip as mask input"},
3335  {SEQUENCE_MASK_INPUT_ID, "ID", 0, "Mask", "Use mask ID as mask input"},
3336  {0, NULL, 0, NULL, NULL},
3337  };
3338 
3339  static const EnumPropertyItem mask_time_items[] = {
3341  "RELATIVE",
3342  0,
3343  "Relative",
3344  "Mask animation is offset to start of strip"},
3346  "ABSOLUTE",
3347  0,
3348  "Absolute",
3349  "Mask animation is in sync with scene frame"},
3350  {0, NULL, 0, NULL, NULL},
3351  };
3352 
3353  srna = RNA_def_struct(brna, "SequenceModifier", NULL);
3354  RNA_def_struct_sdna(srna, "SequenceModifierData");
3355  RNA_def_struct_ui_text(srna, "SequenceModifier", "Modifier for sequence strip");
3356  RNA_def_struct_refine_func(srna, "rna_SequenceModifier_refine");
3357  RNA_def_struct_path_func(srna, "rna_SequenceModifier_path");
3358 
3359  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
3360  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceModifier_name_set");
3361  RNA_def_property_ui_text(prop, "Name", "");
3362  RNA_def_struct_name_property(srna, prop);
3364 
3365  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3368  RNA_def_property_ui_text(prop, "Type", "");
3370 
3371  prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
3373  RNA_def_property_ui_text(prop, "Mute", "Mute this modifier");
3374  RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, -1);
3375  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3376 
3377  prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
3380  RNA_def_property_ui_text(prop, "Expanded", "Mute expanded settings for the modifier");
3381  RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
3383 
3384  prop = RNA_def_property(srna, "input_mask_type", PROP_ENUM, PROP_NONE);
3385  RNA_def_property_enum_sdna(prop, NULL, "mask_input_type");
3386  RNA_def_property_enum_items(prop, mask_input_type_items);
3387  RNA_def_property_ui_text(prop, "Mask Input Type", "Type of input data used for mask");
3388  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3389 
3390  prop = RNA_def_property(srna, "mask_time", PROP_ENUM, PROP_NONE);
3391  RNA_def_property_enum_sdna(prop, NULL, "mask_time");
3392  RNA_def_property_enum_items(prop, mask_time_items);
3393  RNA_def_property_ui_text(prop, "Mask Time", "Time to use for the Mask animation");
3394  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3395 
3396  prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE);
3397  RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
3399  NULL,
3400  "rna_SequenceModifier_strip_set",
3401  NULL,
3402  "rna_SequenceModifier_otherSequence_poll");
3404  RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier");
3405  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3406 
3407  prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE);
3408  RNA_def_property_pointer_sdna(prop, NULL, "mask_id");
3410  RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier");
3411  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3412 }
3413 
3415 {
3416  StructRNA *srna;
3417  PropertyRNA *prop;
3418 
3419  srna = RNA_def_struct(brna, "ColorBalanceModifier", "SequenceModifier");
3420  RNA_def_struct_sdna(srna, "ColorBalanceModifierData");
3422  srna, "ColorBalanceModifier", "Color balance modifier for sequence strip");
3423 
3424  prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
3425  RNA_def_property_struct_type(prop, "SequenceColorBalanceData");
3426 
3427  prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
3428  RNA_def_property_float_sdna(prop, NULL, "color_multiply");
3429  RNA_def_property_range(prop, 0.0f, 20.0f);
3430  RNA_def_property_float_default(prop, 1.0f);
3431  RNA_def_property_ui_text(prop, "Multiply Colors", "Multiply the intensity of each pixel");
3432  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3433 }
3434 
3436 {
3437  StructRNA *srna;
3438  PropertyRNA *prop;
3439 
3440  srna = RNA_def_struct(brna, "WhiteBalanceModifier", "SequenceModifier");
3441  RNA_def_struct_sdna(srna, "WhiteBalanceModifierData");
3443  srna, "WhiteBalanceModifier", "White balance modifier for sequence strip");
3444 
3445  prop = RNA_def_property(srna, "white_value", PROP_FLOAT, PROP_COLOR_GAMMA);
3446  RNA_def_property_range(prop, 0.0, 1.0);
3447  RNA_def_property_float_sdna(prop, NULL, "white_value");
3448  RNA_def_property_ui_text(prop, "White Value", "This color defines white in the strip");
3449  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3450 }
3451 
3453 {
3454  StructRNA *srna;
3455  PropertyRNA *prop;
3456 
3457  srna = RNA_def_struct(brna, "CurvesModifier", "SequenceModifier");
3458  RNA_def_struct_sdna(srna, "CurvesModifierData");
3459  RNA_def_struct_ui_text(srna, "CurvesModifier", "RGB curves modifier for sequence strip");
3460 
3461  prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
3462  RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
3463  RNA_def_property_struct_type(prop, "CurveMapping");
3464  RNA_def_property_ui_text(prop, "Curve Mapping", "");
3465  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3466 }
3467 
3469 {
3470  StructRNA *srna;
3471  PropertyRNA *prop;
3472 
3473  srna = RNA_def_struct(brna, "HueCorrectModifier", "SequenceModifier");
3474  RNA_def_struct_sdna(srna, "HueCorrectModifierData");
3475  RNA_def_struct_ui_text(srna, "HueCorrectModifier", "Hue correction modifier for sequence strip");
3476 
3477  prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
3478  RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
3479  RNA_def_property_struct_type(prop, "CurveMapping");
3480  RNA_def_property_ui_text(prop, "Curve Mapping", "");
3481  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3482 }
3483 
3485 {
3486  StructRNA *srna;
3487  PropertyRNA *prop;
3488 
3489  srna = RNA_def_struct(brna, "BrightContrastModifier", "SequenceModifier");
3490  RNA_def_struct_sdna(srna, "BrightContrastModifierData");
3492  srna, "BrightContrastModifier", "Bright/contrast modifier data for sequence strip");
3493 
3494  prop = RNA_def_property(srna, "bright", PROP_FLOAT, PROP_UNSIGNED);
3495  RNA_def_property_float_sdna(prop, NULL, "bright");
3496  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3497  RNA_def_property_ui_text(prop, "Bright", "Adjust the luminosity of the colors");
3498  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3499 
3500  prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_UNSIGNED);
3501  RNA_def_property_float_sdna(prop, NULL, "contrast");
3502  RNA_def_property_range(prop, -100.0f, 100.0f);
3503  RNA_def_property_ui_text(prop, "Contrast", "Adjust the difference in luminosity between pixels");
3504  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3505 }
3506 
3508 {
3509  StructRNA *srna;
3510  PropertyRNA *prop;
3511 
3512  static const EnumPropertyItem type_items[] = {
3513  {SEQ_TONEMAP_RD_PHOTORECEPTOR, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""},
3514  {SEQ_TONEMAP_RH_SIMPLE, "RH_SIMPLE", 0, "Rh Simple", ""},
3515  {0, NULL, 0, NULL, NULL},
3516  };
3517 
3518  srna = RNA_def_struct(brna, "SequencerTonemapModifierData", "SequenceModifier");
3519  RNA_def_struct_sdna(srna, "SequencerTonemapModifierData");
3520  RNA_def_struct_ui_text(srna, "SequencerTonemapModifierData", "Tone mapping modifier");
3521 
3522  prop = RNA_def_property(srna, "tonemap_type", PROP_ENUM, PROP_NONE);
3523  RNA_def_property_enum_sdna(prop, NULL, "type");
3524  RNA_def_property_enum_items(prop, type_items);
3525  RNA_def_property_ui_text(prop, "Tonemap Type", "Tone mapping algorithm");
3526  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3527 
3528  prop = RNA_def_property(srna, "key", PROP_FLOAT, PROP_FACTOR);
3529  RNA_def_property_range(prop, 0.0f, 1.0f);
3530  RNA_def_property_ui_text(prop, "Key", "The value the average luminance is mapped to");
3531  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3532 
3533  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
3534  RNA_def_property_range(prop, 0.001f, 10.0f);
3536  prop,
3537  "Offset",
3538  "Normally always 1, but can be used as an extra control to alter the brightness curve");
3539  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3540 
3541  prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
3542  RNA_def_property_range(prop, 0.001f, 3.0f);
3543  RNA_def_property_ui_text(prop, "Gamma", "If not used, set to 1");
3544  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3545 
3546  prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
3547  RNA_def_property_range(prop, -8.0f, 8.0f);
3549  prop, "Intensity", "If less than zero, darkens image; otherwise, makes it brighter");
3550  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3551 
3552  prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_FACTOR);
3553  RNA_def_property_range(prop, 0.0f, 1.0f);
3554  RNA_def_property_ui_text(prop, "Contrast", "Set to 0 to use estimate from input image");
3555  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3556 
3557  prop = RNA_def_property(srna, "adaptation", PROP_FLOAT, PROP_FACTOR);
3558  RNA_def_property_range(prop, 0.0f, 1.0f);
3559  RNA_def_property_ui_text(prop, "Adaptation", "If 0, global; if 1, based on pixel intensity");
3560  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3561 
3562  prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_FACTOR);
3563  RNA_def_property_range(prop, 0.0f, 1.0f);
3565  prop, "Color Correction", "If 0, same for all channels; if 1, each independent");
3566  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3567 }
3568 
3569 static void rna_def_modifiers(BlenderRNA *brna)
3570 {
3571  rna_def_modifier(brna);
3572 
3575  rna_def_hue_modifier(brna);
3579 }
3580 
3582 {
3583  rna_def_color_balance(brna);
3584 
3585  rna_def_strip_element(brna);
3586  rna_def_strip_proxy(brna);
3588  rna_def_strip_crop(brna);
3590 
3591  rna_def_sequence(brna);
3592  rna_def_editor(brna);
3593  rna_def_channel(brna);
3594 
3595  rna_def_image(brna);
3596  rna_def_meta(brna);
3597  rna_def_scene(brna);
3598  rna_def_movie(brna);
3599  rna_def_movieclip(brna);
3600  rna_def_mask(brna);
3601  rna_def_sound(brna);
3602  rna_def_effect(brna);
3603  rna_def_effects(brna);
3604  rna_def_modifiers(brna);
3605 }
3606 
3607 #endif
struct AnimData * BKE_animdata_from_id(const struct ID *id)
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
Definition: anim_data.c:1287
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:958
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1090
void id_us_plus(struct ID *id)
Definition: lib_id.c:305
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition: report.c:83
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
Definition: BLI_listbase.h:354
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define DEG2RADF(_deg)
void BLI_split_dirfile(const char *string, char *dir, char *file, size_t dirlen, size_t filelen)
Definition: path_util.c:1465
#define FILE_MAX
void BLI_split_file_part(const char *string, char *file, size_t filelen)
Definition: path_util.c:1495
void BLI_join_dirfile(char *__restrict dst, size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
Definition: path_util.c:1531
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:42
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string.c:64
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL()
Definition: string.c:250
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL(1
bool BLI_uniquename(struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_len)
Definition: string_utils.c:309
#define UNUSED_FUNCTION(x)
#define UNUSED(x)
#define ELEM(...)
#define MIN2(a, b)
#define BLT_I18NCONTEXT_ID_SEQUENCE
#define BLT_I18NCONTEXT_ID_SOUND
void DEG_id_tag_update(struct ID *id, int flag)
void DEG_relations_tag_update(struct Main *bmain)
@ ID_RECALC_COPY_ON_WRITE
Definition: DNA_ID.h:834
@ ID_RECALC_AUDIO
Definition: DNA_ID.h:848
@ ID_RECALC_SEQUENCER_STRIPS
Definition: DNA_ID.h:838
Object is a sort of wrapper for general info.
#define MINFRAME
#define MAXFRAME
#define SEQ_BLEND_REPLACE
@ SEQ_TYPE_TRANSFORM
@ SEQ_TYPE_COLOR_BURN
@ SEQ_TYPE_HARD_LIGHT
@ SEQ_TYPE_EXCLUSION
@ SEQ_TYPE_SOUND_RAM
@ SEQ_TYPE_CROSS
@ SEQ_TYPE_SOUND_HD
@ SEQ_TYPE_GLOW
@ SEQ_TYPE_VALUE
@ SEQ_TYPE_COLORMIX
@ SEQ_TYPE_WIPE
@ SEQ_TYPE_META
@ SEQ_TYPE_OVERDROP
@ SEQ_TYPE_PIN_LIGHT
@ SEQ_TYPE_ALPHAUNDER
@ SEQ_TYPE_DODGE
@ SEQ_TYPE_SCENE
@ SEQ_TYPE_HUE
@ SEQ_TYPE_LINEAR_BURN
@ SEQ_TYPE_GAMCROSS
@ SEQ_TYPE_MULTICAM
@ SEQ_TYPE_BLEND_COLOR
@ SEQ_TYPE_MOVIECLIP
@ SEQ_TYPE_DARKEN
@ SEQ_TYPE_MUL
@ SEQ_TYPE_GAUSSIAN_BLUR
@ SEQ_TYPE_ADD
@ SEQ_TYPE_ALPHAOVER
@ SEQ_TYPE_TEXT
@ SEQ_TYPE_IMAGE
@ SEQ_TYPE_SCREEN
@ SEQ_TYPE_SOFT_LIGHT
@ SEQ_TYPE_SUB
@ SEQ_TYPE_VIVID_LIGHT
@ SEQ_TYPE_OVERLAY
@ SEQ_TYPE_SPEED
@ SEQ_TYPE_COLOR
@ SEQ_TYPE_SATURATION
@ SEQ_TYPE_LIN_LIGHT
@ SEQ_TYPE_MOVIE
@ SEQ_TYPE_MASK
@ SEQ_TYPE_DIFFERENCE
@ SEQ_TYPE_ADJUSTMENT
@ SEQ_TYPE_LIGHTEN
#define SEQ_PROXY_IMAGE_SIZE_75
#define SEQ_COLOR_BALANCE_INVERSE_GAMMA
#define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS
@ SEQUENCE_MODIFIER_MUTE
@ SEQUENCE_MODIFIER_EXPANDED
@ SEQ_ALPHA_PREMUL
@ SEQ_ALPHA_STRAIGHT
@ SEQ_TEXT_ALIGN_X_RIGHT
@ SEQ_TEXT_ALIGN_X_CENTER
@ SEQ_TEXT_ALIGN_X_LEFT
#define SEQ_PROXY_IMAGE_SIZE_100
#define SEQ_MOVIECLIP_RENDER_STABILIZED
@ seqModifierType_Curves
@ seqModifierType_Mask
@ seqModifierType_WhiteBalance
@ seqModifierType_BrightContrast
@ seqModifierType_ColorBalance
@ seqModifierType_HueCorrect
@ seqModifierType_Tonemap
#define SEQ_PROXY_TC_FREE_RUN
@ SEQUENCE_MASK_INPUT_STRIP
@ SEQUENCE_MASK_INPUT_ID
#define SEQ_FONT_NOT_LOADED
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED
#define SEQ_EDIT_OVERLAY_FRAME_ABS
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
#define SEQ_COLOR_BALANCE_INVERSE_POWER
@ SEQUENCE_COLOR_NONE
@ SEQUENCE_COLOR_05
@ SEQUENCE_COLOR_02
@ SEQUENCE_COLOR_04
@ SEQUENCE_COLOR_06
@ SEQUENCE_COLOR_01
@ SEQUENCE_COLOR_09
@ SEQUENCE_COLOR_08
@ SEQUENCE_COLOR_03
@ SEQUENCE_COLOR_07
#define SEQ_EDIT_OVERLAY_FRAME_SHOW
@ SEQ_CACHE_VIEW_RAW
@ SEQ_CACHE_STORE_PREPROCESSED
@ SEQ_CACHE_STORE_RAW
@ SEQ_CACHE_STORE_FINAL_OUT
@ SEQ_CACHE_VIEW_ENABLE
@ SEQ_CACHE_STORE_COMPOSITE
@ SEQ_CACHE_VIEW_FINAL_OUT
@ SEQ_CACHE_VIEW_COMPOSITE
@ SEQ_CACHE_PREFETCH_ENABLE
@ SEQ_CACHE_VIEW_PREPROCESSED
@ SEQ_CACHE_OVERRIDE
@ SEQ_TONEMAP_RD_PHOTORECEPTOR
@ SEQ_TONEMAP_RH_SIMPLE
#define SEQ_SPEED_USE_INTERPOLATION
#define SEQ_COLOR_BALANCE_INVERSE_GAIN
@ SEQUENCE_MASK_TIME_RELATIVE
@ SEQUENCE_MASK_TIME_ABSOLUTE
@ SEQ_TEXT_ALIGN_Y_BOTTOM
@ SEQ_TEXT_ALIGN_Y_TOP
@ SEQ_TEXT_ALIGN_Y_CENTER
@ SEQ_SPEED_STRETCH
@ SEQ_SPEED_MULTIPLY
@ SEQ_SPEED_LENGTH
@ SEQ_SPEED_FRAME_NUMBER
@ SEQ_COLOR_BALANCE_METHOD_LIFTGAMMAGAIN
@ SEQ_COLOR_BALANCE_METHOD_SLOPEOFFSETPOWER
@ SEQ_CHANNEL_MUTE
@ SEQ_CHANNEL_LOCK
#define SEQ_PROXY_TC_NONE
#define SEQ_PROXY_IMAGE_SIZE_50
@ SEQ_MUTE
@ SEQ_FILTERY
@ SEQ_REVERSE_FRAMES
@ SEQ_FLIPX
@ SEQ_RIGHTSEL
@ SEQ_MAKE_FLOAT
@ SEQ_SCENE_STRIPS
@ SEQ_USE_PROXY
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_FLIPY
@ SEQ_LOCK
@ SEQ_USE_VIEWS
@ SEQ_USE_LINEAR_MODIFIERS
@ SEQ_SCENE_NO_ANNOTATION
@ SEQ_AUDIO_DRAW_WAVEFORM
@ SEQ_LEFTSEL
@ SEQ_PROXY_SKIP_EXISTING
#define SEQ_COLOR_BALANCE_INVERSE_SLOPE
#define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN
#define SEQ_COLOR_BALANCE_INVERSE_LIFT
#define MAXSEQ
@ SEQ_TEXT_ITALIC
@ SEQ_TEXT_SHADOW
@ SEQ_TEXT_BOLD
@ SEQ_TEXT_BOX
@ SEQ_TRANSFORM_FILTER_BILINEAR
@ SEQ_TRANSFORM_FILTER_NEAREST
#define SEQ_PROXY_TC_RECORD_RUN
struct StripElem StripElem
#define SEQ_EDIT_PROXY_DIR_STORAGE
#define SEQ_COLOR_BALANCE_INVERSE_OFFSET
#define SEQ_PROXY_IMAGE_SIZE_25
_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:193
struct IDProperty * IMB_anim_load_metadata(struct anim *anim)
Definition: anim_movie.c:233
Read Guarded memory(de)allocation.
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position CLAMP
#define RNA_POINTER_INVALIDATE(ptr)
Definition: RNA_access.h:744
@ PARM_RNAPTR
Definition: RNA_types.h:354
@ PARM_REQUIRED
Definition: RNA_types.h:352
@ FUNC_USE_REPORTS
Definition: RNA_types.h:663
@ FUNC_USE_MAIN
Definition: RNA_types.h:661
@ FUNC_USE_CONTEXT
Definition: RNA_types.h:662
@ FUNC_USE_SELF_ID
Definition: RNA_types.h:650
@ PROP_FLOAT
Definition: RNA_types.h:61
@ PROP_BOOLEAN
Definition: RNA_types.h:59
@ PROP_ENUM
Definition: RNA_types.h:63
@ PROP_INT
Definition: RNA_types.h:60
@ PROP_STRING
Definition: RNA_types.h:62
@ PROP_POINTER
Definition: RNA_types.h:64
@ PROP_COLLECTION
Definition: RNA_types.h:65
#define RNA_ENUM_ITEM_SEPR
Definition: RNA_types.h:483
@ PROP_THICK_WRAP
Definition: RNA_types.h:285
@ PROP_ANIMATABLE
Definition: RNA_types.h:202
@ PROP_EDITABLE
Definition: RNA_types.h:189
@ PROP_NEVER_NULL
Definition: RNA_types.h:239
@ PROP_NO_DEG_UPDATE
Definition: RNA_types.h:301
@ PROP_ID_SELF_CHECK
Definition: RNA_types.h:232
@ PROP_TIME
Definition: RNA_types.h:146
@ PROP_XYZ
Definition: RNA_types.h:162
@ PROP_FILENAME
Definition: RNA_types.h:131
@ PROP_PIXEL
Definition: RNA_types.h:141
@ PROP_ANGLE
Definition: RNA_types.h:145
@ PROP_NONE
Definition: RNA_types.h:126
@ PROP_DIRPATH
Definition: RNA_types.h:130
@ PROP_PERCENTAGE
Definition: RNA_types.h:143
@ PROP_FACTOR
Definition: RNA_types.h:144
@ PROP_COLOR_GAMMA
Definition: RNA_types.h:165
@ PROP_UNSIGNED
Definition: RNA_types.h:142
@ PROP_FILEPATH
Definition: RNA_types.h:129
#define C
Definition: RandGen.cpp:25
@ DO_IRIS_WIPE
Definition: SEQ_effects.h:25
@ DO_CLOCK_WIPE
Definition: SEQ_effects.h:26
@ DO_DOUBLE_WIPE
Definition: SEQ_effects.h:22
@ DO_SINGLE_WIPE
Definition: SEQ_effects.h:21
#define SEQ_ITERATOR_FOREACH(var, collection)
Definition: SEQ_iterator.h:35
#define ND_SEQUENCER
Definition: WM_types.h:385
#define ND_SPACE_SEQUENCER
Definition: WM_types.h:478
#define ND_DISPLAY
Definition: WM_types.h:439
#define NC_SCENE
Definition: WM_types.h:328
#define NC_IMAGE
Definition: WM_types.h:334
#define NC_SPACE
Definition: WM_types.h:342
#define NA_SELECTED
Definition: WM_types.h:528
return(oflags[bm->toolflag_index].f &oflag) !=0
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
#define SELECT
Scene scene
SyclQueue void void size_t num_bytes void
void SEQ_effect_text_font_unload(TextVars *data, const bool do_id_user)
Definition: effects.c:3227
int SEQ_effect_get_num_inputs(int seq_type)
Definition: effects.c:3741
void SEQ_cache_cleanup(Scene *scene)
Definition: image_cache.c:602
int count
Sequence * SEQ_iterator_yield(SeqIterator *iterator)
Definition: iterator.c:52
SeqCollection * SEQ_query_all_strips_recursive(ListBase *seqbase)
Definition: iterator.c:194
bool SEQ_iterator_ensure(SeqCollection *collection, SeqIterator *iterator, Sequence **r_seq)
Definition: iterator.c:32
void SEQ_collection_free(SeqCollection *collection)
Definition: iterator.c:81
void SEQ_for_each_callback(ListBase *seqbase, SeqForEachFunc callback, void *user_data)
Definition: iterator.c:76
ccl_global KernelShaderEvalInput * input
void(* MEM_freeN)(void *vmemh)
Definition: mallocn.c:27
size_t(* MEM_allocN_len)(const void *vmemh)
Definition: mallocn.c:26
void *(* MEM_callocN)(size_t len, const char *str)
Definition: mallocn.c:31
#define G(x, y, z)
void SEQ_prefetch_stop(Scene *scene)
Definition: prefetch.c:254
void SEQ_proxy_set(struct Sequence *seq, bool value)
Definition: proxy.c:571
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
Definition: rna_access.c:695
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:136
const PointerRNA PointerRNA_NULL
Definition: rna_access.c:61
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
Definition: rna_access.c:4781
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:186
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
Definition: rna_define.c:1148
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2740
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
Definition: rna_define.c:1193
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3493
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4170
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2236
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1526
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3285
void RNA_def_property_float_default(PropertyRNA *prop, float value)
Definition: rna_define.c:2022
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
Definition: rna_define.c:4312
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
Definition: rna_define.c:2106
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3126
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1645
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2695
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
Definition: rna_define.c:1653
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4273
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
Definition: rna_define.c:3474
void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, const char *next, const char *end, const char *get, const char *length, const char *lookupint, const char *lookupstring, const char *assignint)
Definition: rna_define.c:3420
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1237
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2944
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1872
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1048
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1737
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
Definition: rna_define.c:1920
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname)
Definition: rna_define.c:1075
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1772
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
Definition: rna_define.c:2769
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4347
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2900
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
Definition: rna_define.c:3224
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
Definition: rna_define.c:2855
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1257
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2669
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1103
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4342
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1495
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
Definition: rna_define.c:3385
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1028
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2601
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3028
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
Definition: rna_define.c:1245
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, int maxlen, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3687
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
Definition: rna_define.c:1160
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2848
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1490
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2493
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1664
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, int default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3783
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2343
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2327
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1518
void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop, bool metastrip)
void RNA_api_sequence_strip(StructRNA *srna)
void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_views_format_items[]
Definition: rna_scene.c:485
static void rna_def_effect_inputs(StructRNA *srna, int count)
static void rna_def_filter_video(StructRNA *srna)
static void rna_def_movieclip(BlenderRNA *brna)
static void rna_def_input(StructRNA *srna)
static void rna_def_color_balance(BlenderRNA *brna)
static void rna_def_modifiers(BlenderRNA *brna)
static void rna_def_gaussian_blur(StructRNA *srna)
static void rna_def_brightcontrast_modifier(BlenderRNA *brna)
void RNA_def_sequencer(BlenderRNA *brna)
static void rna_def_image(BlenderRNA *brna)
static void rna_def_editor(BlenderRNA *brna)
static void rna_def_effect(BlenderRNA *brna)
static void rna_def_channel(BlenderRNA *brna)
static void rna_def_whitebalance_modifier(BlenderRNA *brna)
static void rna_def_mask(BlenderRNA *brna)
static void rna_def_strip_element(BlenderRNA *brna)
static void rna_def_movie_types(StructRNA *srna)
const EnumPropertyItem rna_enum_sequence_modifier_type_items[]
Definition: rna_sequencer.c:63
static void rna_def_transform(StructRNA *srna)
static void rna_def_speed_control(StructRNA *srna)
struct EffectInfo EffectInfo
static void rna_def_sound(BlenderRNA *brna)
static void rna_def_tonemap_modifier(BlenderRNA *brna)
static void rna_def_text(StructRNA *srna)
static void rna_def_sequence(BlenderRNA *brna)
static void rna_def_colorbalance_modifier(BlenderRNA *brna)
static void rna_def_strip_crop(BlenderRNA *brna)
static void rna_def_modifier(BlenderRNA *brna)
static void rna_def_color_mix(StructRNA *srna)
static void rna_def_solid_color(StructRNA *srna)
static void rna_def_strip_transform(BlenderRNA *brna)
static void rna_def_movie(BlenderRNA *brna)
static void rna_def_speed_factor(StructRNA *srna)
static void rna_def_wipe(StructRNA *srna)
static void rna_def_multicam(StructRNA *srna)
static void rna_def_scene(BlenderRNA *brna)
const EnumPropertyItem rna_enum_strip_color_items[]
Definition: rna_sequencer.c:74
static void rna_def_effects(BlenderRNA *brna)
static void rna_def_color_management(StructRNA *srna)
static void rna_def_curves_modifier(BlenderRNA *brna)
static void rna_def_strip_color_balance(BlenderRNA *brna)
static EffectInfo def_effects[]
static const EnumPropertyItem transform_filter_items[]
static void rna_def_hue_modifier(BlenderRNA *brna)
static void rna_def_strip_proxy(BlenderRNA *brna)
static void rna_def_proxy(StructRNA *srna)
static void rna_def_glow(StructRNA *srna)
static void rna_def_meta(BlenderRNA *brna)
static const EnumPropertyItem blend_mode_items[]
static void rna_def_sequence_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
Sequence * SEQ_sequence_lookup_seq_by_name(const Scene *scene, const char *key)
bool SEQ_modifier_remove(Sequence *seq, SequenceModifierData *smd)
SequenceModifierData * SEQ_modifier_new(Sequence *seq, const char *name, int type)
void SEQ_modifier_clear(Sequence *seq)
int SEQ_sequence_supports_modifiers(Sequence *seq)
void SEQ_modifier_unique_name(Sequence *seq, SequenceModifierData *smd)
void SEQ_sound_update_bounds(Scene *scene, Sequence *seq)
void SEQ_meta_stack_set(const Scene *scene, Sequence *seqm)
Definition: sequencer.c:429
Editing * SEQ_editing_get(const Scene *scene)
Definition: sequencer.c:241
#define min(a, b)
Definition: sort.c:35
void SEQ_add_movie_reload_if_needed(struct Main *bmain, struct Scene *scene, struct Sequence *seq, bool *r_was_reloaded, bool *r_can_produce_frames)
Definition: strip_add.c:677
void SEQ_add_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const bool lock_range)
Definition: strip_add.c:506
void SEQ_edit_flag_for_removal(Scene *scene, ListBase *seqbase, Sequence *seq)
Definition: strip_edit.c:163
bool SEQ_edit_move_strip_to_seqbase(Scene *scene, ListBase *seqbase, Sequence *seq, ListBase *dst_seqbase)
Definition: strip_edit.c:195
void SEQ_edit_sequence_name_set(Scene *scene, Sequence *seq, const char *new_name)
Definition: strip_edit.c:516
void SEQ_edit_remove_flagged_sequences(Scene *scene, ListBase *seqbase)
Definition: strip_edit.c:180
bool SEQ_relations_render_loop_check(Sequence *seq_main, Sequence *seq)
void SEQ_relations_invalidate_cache_raw(Scene *scene, Sequence *seq)
bool SEQ_exists_in_seqbase(const Sequence *seq, const ListBase *seqbase)
void SEQ_relations_free_imbuf(Scene *scene, ListBase *seqbase, bool for_render)
void SEQ_relations_invalidate_cache_preprocessed(Scene *scene, Sequence *seq)
void SEQ_relations_invalidate_cache_composite(Scene *scene, Sequence *seq)
void SEQ_select_active_set(Scene *scene, Sequence *seq)
Definition: strip_select.c:29
void SEQ_time_speed_factor_set(const Scene *scene, Sequence *seq, const float speed_factor)
Definition: strip_time.c:445
void SEQ_time_right_handle_frame_set(const Scene *scene, Sequence *seq, int val)
Definition: strip_time.c:539
int SEQ_time_left_handle_frame_get(const Scene *UNUSED(scene), const Sequence *seq)
Definition: strip_time.c:506
void SEQ_time_left_handle_frame_set(const Scene *scene, Sequence *seq, int val)
Definition: strip_time.c:524
float SEQ_time_sequence_get_fps(Scene *scene, Sequence *seq)
Definition: strip_time.c:313
int SEQ_time_right_handle_frame_get(const Scene *scene, const Sequence *seq)
Definition: strip_time.c:515
bool SEQ_transform_seqbase_shuffle_ex(ListBase *seqbasep, Sequence *test, Scene *evil_scene, int channel_delta)
bool SEQ_transform_seqbase_shuffle(ListBase *seqbasep, Sequence *test, Scene *evil_scene)
bool SEQ_transform_test_overlap(const Scene *scene, ListBase *seqbasep, Sequence *test)
void SEQ_transform_fix_single_image_seq_offsets(const Scene *scene, Sequence *seq)
void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delta)
void * current
Definition: BLI_iterator.h:14
ListBaseIterator listbase
Definition: RNA_types.h:409
union CollectionPropertyIterator::@1147 internal
StripColorBalance color_balance
ListBase seqbase
ListBase channels
int overlay_frame_flag
const char * ui_name
Definition: rna_sequencer.c:57
const char * struct_name
Definition: rna_sequencer.c:56
const char * ui_desc
Definition: rna_sequencer.c:58
void(* func)(StructRNA *)
Definition: rna_sequencer.c:59
Definition: DNA_ID.h:368
void * first
Definition: DNA_listBase.h:31
Definition: BKE_main.h:121
Sequence * parseq
struct StructRNA * type
Definition: RNA_types.h:37
void * data
Definition: RNA_types.h:38
struct ID * owner_id
Definition: RNA_types.h:36
struct FFMpegCodecData ffcodecdata
struct Editing * ed
struct RenderData r
SeqCollection * collection
Definition: SEQ_iterator.h:46
struct Sequence * mask_sequence
struct Scene * scene
ListBase anims
ListBase channels
ListBase modifiers
ListBase seqbase
struct Sequence * seq1
struct Sequence * seq2
struct IDProperty * prop
struct anim * anim
char name[256]
struct anim * anim
char file[256]
StripProxy * proxy
StripTransform * transform
StripElem * stripdata
char dir[768]
StripCrop * crop
float max
ListBase * SEQ_get_seqbase_by_seq(const Scene *scene, Sequence *seq)
Definition: utils.c:373
void SEQ_sequence_base_unique_name_recursive(struct Scene *scene, ListBase *seqbasep, Sequence *seq)
Definition: utils.c:78
Sequence * SEQ_sequence_from_strip_elem(ListBase *seqbase, StripElem *se)
Definition: utils.c:403
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3480