Blender  V2.93
rna_sequencer.c
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  */
16 
21 #include <limits.h>
22 #include <stdlib.h>
23 
24 #include "DNA_anim_types.h"
25 #include "DNA_movieclip_types.h"
26 #include "DNA_object_types.h"
27 #include "DNA_scene_types.h"
28 #include "DNA_sequence_types.h"
29 #include "DNA_vfont_types.h"
30 
31 #include "BLI_math.h"
32 
33 #include "BLT_translation.h"
34 
35 #include "BKE_anim_data.h"
36 #include "BKE_animsys.h"
37 #include "BKE_sound.h"
38 
39 #include "IMB_metadata.h"
40 
41 #include "MEM_guardedalloc.h"
42 
43 #include "RNA_access.h"
44 #include "RNA_define.h"
45 #include "RNA_enum_types.h"
46 
47 #include "rna_internal.h"
48 
49 #include "SEQ_add.h"
50 #include "SEQ_effects.h"
51 #include "SEQ_iterator.h"
52 #include "SEQ_modifier.h"
53 #include "SEQ_prefetch.h"
54 #include "SEQ_proxy.h"
55 #include "SEQ_relations.h"
56 #include "SEQ_sequencer.h"
57 #include "SEQ_sound.h"
58 #include "SEQ_time.h"
59 #include "SEQ_transform.h"
60 #include "SEQ_utils.h"
61 
62 #include "WM_types.h"
63 
64 typedef struct EffectInfo {
65  const char *struct_name;
66  const char *ui_name;
67  const char *ui_desc;
68  void (*func)(StructRNA *);
69  int inputs;
71 
73  {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""},
74  {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""},
75  {seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""},
76  {seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Bright/Contrast", ""},
77  {seqModifierType_Mask, "MASK", ICON_NONE, "Mask", ""},
78  {seqModifierType_WhiteBalance, "WHITE_BALANCE", ICON_NONE, "White Balance", ""},
79  {seqModifierType_Tonemap, "TONEMAP", ICON_NONE, "Tone Map", ""},
80  {0, NULL, 0, NULL, NULL},
81 };
82 
83 #ifdef RNA_RUNTIME
84 
85 # include "BKE_global.h"
86 # include "BKE_idprop.h"
87 # include "BKE_movieclip.h"
88 # include "BKE_report.h"
89 
90 # include "WM_api.h"
91 
92 # include "DEG_depsgraph.h"
93 # include "DEG_depsgraph_build.h"
94 
95 # include "IMB_imbuf.h"
96 
97 typedef struct SequenceSearchData {
98  Sequence *seq;
99  void *data;
101 } SequenceSearchData;
102 
103 /* build a temp reference to the parent */
104 static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
105 {
106  for (; seq; seq = seq->next) {
107  seq->tmp = seq_par;
108  if (seq->type == SEQ_TYPE_META) {
109  meta_tmp_ref(seq, seq->seqbase.first);
110  }
111  }
112 }
113 
114 static void rna_SequenceElement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
115 {
116  Scene *scene = (Scene *)ptr->owner_id;
117  Editing *ed = SEQ_editing_get(scene, false);
118 
119  if (ed) {
120  StripElem *se = (StripElem *)ptr->data;
121  Sequence *seq;
122 
123  /* slow but we can't avoid! */
124  seq = SEQ_sequence_from_strip_elem(&ed->seqbase, se);
125  if (seq) {
127  }
128  }
129 }
130 
131 static void rna_Sequence_invalidate_raw_update(Main *UNUSED(bmain),
132  Scene *UNUSED(scene),
133  PointerRNA *ptr)
134 {
135  Scene *scene = (Scene *)ptr->owner_id;
136  Editing *ed = SEQ_editing_get(scene, false);
137 
138  if (ed) {
139  Sequence *seq = (Sequence *)ptr->data;
140 
142  }
143 }
144 
145 static void rna_Sequence_invalidate_preprocessed_update(Main *UNUSED(bmain),
146  Scene *UNUSED(scene),
147  PointerRNA *ptr)
148 {
149  Scene *scene = (Scene *)ptr->owner_id;
150  Editing *ed = SEQ_editing_get(scene, false);
151 
152  if (ed) {
153  Sequence *seq = (Sequence *)ptr->data;
154 
156  }
157 }
158 
159 static void rna_Sequence_invalidate_composite_update(Main *UNUSED(bmain),
160  Scene *UNUSED(scene),
161  PointerRNA *ptr)
162 {
163  Scene *scene = (Scene *)ptr->owner_id;
164  Editing *ed = SEQ_editing_get(scene, false);
165 
166  if (ed) {
167  Sequence *seq = (Sequence *)ptr->data;
168 
170  }
171 }
172 
173 static void rna_Sequence_scene_switch_update(Main *bmain, Scene *scene, PointerRNA *ptr)
174 {
175  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
178 }
179 
180 static void rna_Sequence_use_sequence(Main *bmain, Scene *scene, PointerRNA *ptr)
181 {
182  /* General update callback. */
183  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
184  /* Changing recursion changes set of IDs which needs to be remapped by the copy-on-write.
185  * the only way for this currently is to tag the ID for ID_RECALC_COPY_ON_WRITE. */
186  Editing *ed = SEQ_editing_get(scene, false);
187  if (ed) {
188  Sequence *seq = (Sequence *)ptr->data;
189  if (seq->scene != NULL) {
191  }
192  }
193  /* The sequencer scene is to be updated as well, including new relations from the nested
194  * sequencer. */
197 }
198 
199 static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *iter,
200  PointerRNA *ptr)
201 {
202  Scene *scene = (Scene *)ptr->owner_id;
203  Editing *ed = SEQ_editing_get(scene, false);
204 
205  meta_tmp_ref(NULL, ed->seqbase.first);
206 
208 }
209 
210 static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain),
211  Scene *scene,
213 {
214  Editing *ed = scene->ed;
215 
216  SEQ_relations_free_imbuf(scene, &ed->seqbase, false);
218 }
219 
220 static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter)
221 {
222  ListBaseIterator *internal = &iter->internal.listbase;
223  Sequence *seq = (Sequence *)internal->link;
224 
225  if (seq->seqbase.first) {
226  internal->link = (Link *)seq->seqbase.first;
227  }
228  else if (seq->next) {
229  internal->link = (Link *)seq->next;
230  }
231  else {
232  internal->link = NULL;
233 
234  do {
235  seq = seq->tmp; /* XXX - seq's don't reference their parents! */
236  if (seq && seq->next) {
237  internal->link = (Link *)seq->next;
238  break;
239  }
240  } while (seq);
241  }
242 
243  iter->valid = (internal->link != NULL);
244 }
245 
246 /* internal use */
247 static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
248 {
249  Sequence *seq = (Sequence *)ptr->data;
250 
251  /* Hack? copied from sequencer.c::reload_sequence_new_file() */
252  size_t olen = MEM_allocN_len(seq->strip->stripdata) / sizeof(struct StripElem);
253 
254  /* The problem with seq->strip->len and seq->len is that it's discounted from the offset
255  * (hard cut trim). */
256  return (int)olen;
257 }
258 
259 static void rna_SequenceEditor_elements_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
260 {
261  Sequence *seq = (Sequence *)ptr->data;
263  (void *)seq->strip->stripdata,
264  sizeof(StripElem),
265  rna_SequenceEditor_elements_length(ptr),
266  0,
267  NULL);
268 }
269 
270 static void rna_Sequence_views_format_update(Main *bmain, Scene *scene, PointerRNA *ptr)
271 {
272  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
273 }
274 
275 static void do_sequence_frame_change_update(Scene *scene, Sequence *seq)
276 {
277  Editing *ed = SEQ_editing_get(scene, false);
278  ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq);
279  Sequence *tseq;
281 
282  /* ensure effects are always fit in length to their input */
283 
284  /* TODO(sergey): probably could be optimized.
285  * in terms skipping update of non-changing strips
286  */
287  for (tseq = seqbase->first; tseq; tseq = tseq->next) {
288  if (tseq->seq1 || tseq->seq2 || tseq->seq3) {
290  }
291  }
292 
293  if (SEQ_transform_test_overlap(seqbase, seq)) {
294  SEQ_transform_seqbase_shuffle(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
295  }
296  SEQ_sort(scene);
297 }
298 
299 /* A simple wrapper around above func, directly usable as prop update func.
300  * Also invalidate cache if needed.
301  */
302 static void rna_Sequence_frame_change_update(Main *UNUSED(bmain),
303  Scene *UNUSED(scene),
304  PointerRNA *ptr)
305 {
306  Scene *scene = (Scene *)ptr->owner_id;
307  do_sequence_frame_change_update(scene, (Sequence *)ptr->data);
308 }
309 
310 static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
311 {
312  Sequence *seq = (Sequence *)ptr->data;
313  Scene *scene = (Scene *)ptr->owner_id;
314 
316  SEQ_transform_translate_sequence(scene, seq, value - seq->start);
317  do_sequence_frame_change_update(scene, seq);
319 }
320 
321 static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
322 {
323  Sequence *seq = (Sequence *)ptr->data;
324  Scene *scene = (Scene *)ptr->owner_id;
325 
329  do_sequence_frame_change_update(scene, seq);
331 }
332 
333 static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
334 {
335  Sequence *seq = (Sequence *)ptr->data;
336  Scene *scene = (Scene *)ptr->owner_id;
337 
341  do_sequence_frame_change_update(scene, seq);
343 }
344 
345 static void rna_Sequence_frame_offset_start_set(PointerRNA *ptr, int value)
346 {
347  Sequence *seq = (Sequence *)ptr->data;
348  Scene *scene = (Scene *)ptr->owner_id;
349 
351  seq->startofs = value;
352 }
353 
354 static void rna_Sequence_frame_offset_end_set(PointerRNA *ptr, int value)
355 {
356  Sequence *seq = (Sequence *)ptr->data;
357  Scene *scene = (Scene *)ptr->owner_id;
358 
360  seq->endofs = value;
361 }
362 
363 static void rna_Sequence_frame_still_start_set(PointerRNA *ptr, int value)
364 {
365  Sequence *seq = (Sequence *)ptr->data;
366  Scene *scene = (Scene *)ptr->owner_id;
367 
369  seq->startstill = value;
370 }
371 
372 static void rna_Sequence_frame_still_end_set(PointerRNA *ptr, int value)
373 {
374  Sequence *seq = (Sequence *)ptr->data;
375  Scene *scene = (Scene *)ptr->owner_id;
376 
378  seq->endstill = value;
379 }
380 
381 static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
382 {
383  Sequence *seq = (Sequence *)ptr->data;
384  Scene *scene = (Scene *)ptr->owner_id;
385 
386  seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
387 
388  SEQ_add_reload_new_file(G.main, scene, seq, false);
389  do_sequence_frame_change_update(scene, seq);
390 }
391 
392 static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
393 {
394  Sequence *seq = (Sequence *)ptr->data;
395  Scene *scene = (Scene *)ptr->owner_id;
396 
397  seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
398 
399  SEQ_add_reload_new_file(G.main, scene, seq, false);
400  do_sequence_frame_change_update(scene, seq);
401 }
402 
403 static void rna_Sequence_anim_endofs_final_range(
404  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
405 {
406  Sequence *seq = (Sequence *)ptr->data;
407 
408  *min = 0;
409  *max = seq->len + seq->anim_endofs - seq->startofs - seq->endofs - 1;
410 }
411 
412 static void rna_Sequence_anim_startofs_final_range(
413  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
414 {
415  Sequence *seq = (Sequence *)ptr->data;
416 
417  *min = 0;
418  *max = seq->len + seq->anim_startofs - seq->startofs - seq->endofs - 1;
419 }
420 
421 static void rna_Sequence_frame_offset_start_range(
422  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
423 {
424  Sequence *seq = (Sequence *)ptr->data;
425  *min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN;
426  *max = seq->len - seq->endofs - 1;
427 }
428 
429 static void rna_Sequence_frame_offset_end_range(
430  PointerRNA *ptr, int *min, int *max, int *UNUSED(softmin), int *UNUSED(softmax))
431 {
432  Sequence *seq = (Sequence *)ptr->data;
433  *min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN;
434  *max = seq->len - seq->startofs - 1;
435 }
436 
437 static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
438 {
439  Sequence *seq = (Sequence *)ptr->data;
440  Scene *scene = (Scene *)ptr->owner_id;
441 
444  SEQ_transform_get_left_handle_frame(seq, false) + value);
445  do_sequence_frame_change_update(scene, seq);
447 }
448 
449 static int rna_Sequence_frame_length_get(PointerRNA *ptr)
450 {
451  Sequence *seq = (Sequence *)ptr->data;
452  return SEQ_transform_get_right_handle_frame(seq, false) -
454 }
455 
456 static int rna_Sequence_frame_editable(PointerRNA *ptr, const char **UNUSED(r_info))
457 {
458  Sequence *seq = (Sequence *)ptr->data;
459  /* Effect sequences' start frame and length must be readonly! */
461 }
462 
463 static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
464 {
465  Sequence *seq = (Sequence *)ptr->data;
466  Scene *scene = (Scene *)ptr->owner_id;
467  Editing *ed = SEQ_editing_get(scene, false);
468  ListBase *seqbase = SEQ_get_seqbase_by_seq(&ed->seqbase, seq);
469 
471  /* check channel increment or decrement */
472  const int channel_delta = (value >= seq->machine) ? 1 : -1;
473  seq->machine = value;
474 
475  if (SEQ_transform_test_overlap(seqbase, seq)) {
476  /* XXX - BROKEN!, uses context seqbasep */
477  SEQ_transform_seqbase_shuffle_ex(seqbase, seq, scene, channel_delta);
478  }
479  SEQ_sort(scene);
481 }
482 
483 static void rna_Sequence_use_proxy_set(PointerRNA *ptr, bool value)
484 {
485  Sequence *seq = (Sequence *)ptr->data;
486  SEQ_proxy_set(seq, value != 0);
487 }
488 
489 static int transform_seq_cmp_fn(Sequence *seq, void *arg_pt)
490 {
491  SequenceSearchData *data = arg_pt;
492 
493  if (seq->strip && seq->strip->transform == data->data) {
494  data->seq = seq;
495  return -1; /* done so bail out */
496  }
497  return 1;
498 }
499 
500 static Sequence *sequence_get_by_transform(Editing *ed, StripTransform *transform)
501 {
502  SequenceSearchData data;
503 
504  data.seq = NULL;
505  data.data = transform;
506 
507  /* irritating we need to search for our sequence! */
508  SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, transform_seq_cmp_fn, &data);
509 
510  return data.seq;
511 }
512 
513 static char *rna_SequenceTransform_path(PointerRNA *ptr)
514 {
515  Scene *scene = (Scene *)ptr->owner_id;
516  Editing *ed = SEQ_editing_get(scene, false);
517  Sequence *seq = sequence_get_by_transform(ed, ptr->data);
518 
519  if (seq && seq->name + 2) {
520  char name_esc[(sizeof(seq->name) - 2) * 2];
521 
522  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
523  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform", name_esc);
524  }
525  else {
526  return BLI_strdup("");
527  }
528 }
529 
530 static void rna_SequenceTransform_update(Main *UNUSED(bmain),
531  Scene *UNUSED(scene),
532  PointerRNA *ptr)
533 {
534  Scene *scene = (Scene *)ptr->owner_id;
535  Editing *ed = SEQ_editing_get(scene, false);
536  Sequence *seq = sequence_get_by_transform(ed, ptr->data);
537 
539 }
540 
541 static int crop_seq_cmp_fn(Sequence *seq, void *arg_pt)
542 {
543  SequenceSearchData *data = arg_pt;
544 
545  if (seq->strip && seq->strip->crop == data->data) {
546  data->seq = seq;
547  return -1; /* done so bail out */
548  }
549  return 1;
550 }
551 
552 static Sequence *sequence_get_by_crop(Editing *ed, StripCrop *crop)
553 {
554  SequenceSearchData data;
555 
556  data.seq = NULL;
557  data.data = crop;
558 
559  /* irritating we need to search for our sequence! */
560  SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, crop_seq_cmp_fn, &data);
561 
562  return data.seq;
563 }
564 
565 static char *rna_SequenceCrop_path(PointerRNA *ptr)
566 {
567  Scene *scene = (Scene *)ptr->owner_id;
568  Editing *ed = SEQ_editing_get(scene, false);
569  Sequence *seq = sequence_get_by_crop(ed, ptr->data);
570 
571  if (seq && seq->name + 2) {
572  char name_esc[(sizeof(seq->name) - 2) * 2];
573 
574  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
575  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop", name_esc);
576  }
577  else {
578  return BLI_strdup("");
579  }
580 }
581 
582 static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
583 {
584  Scene *scene = (Scene *)ptr->owner_id;
585  Editing *ed = SEQ_editing_get(scene, false);
586  Sequence *seq = sequence_get_by_crop(ed, ptr->data);
587 
589 }
590 
591 static void rna_Sequence_text_font_set(PointerRNA *ptr,
592  PointerRNA ptr_value,
593  struct ReportList *UNUSED(reports))
594 {
595  Sequence *seq = ptr->data;
596  TextVars *data = seq->effectdata;
597  VFont *value = ptr_value.data;
598 
600 
601  id_us_plus(&value->id);
602  data->text_blf_id = SEQ_FONT_NOT_LOADED;
603  data->text_font = value;
604 }
605 
606 /* name functions that ignore the first two characters */
607 static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
608 {
609  Sequence *seq = (Sequence *)ptr->data;
610  BLI_strncpy(value, seq->name + 2, sizeof(seq->name) - 2);
611 }
612 
613 static int rna_Sequence_name_length(PointerRNA *ptr)
614 {
615  Sequence *seq = (Sequence *)ptr->data;
616  return strlen(seq->name + 2);
617 }
618 
619 static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
620 {
621  Scene *scene = (Scene *)ptr->owner_id;
622  Sequence *seq = (Sequence *)ptr->data;
623  char oldname[sizeof(seq->name)];
624  AnimData *adt;
625 
627 
628  /* make a copy of the old name first */
629  BLI_strncpy(oldname, seq->name + 2, sizeof(seq->name) - 2);
630 
631  /* copy the new name into the name slot */
632  BLI_strncpy_utf8(seq->name + 2, value, sizeof(seq->name) - 2);
633 
634  /* make sure the name is unique */
636 
637  /* fix all the animation data which may link to this */
638 
639  /* Don't rename everywhere because these are per scene. */
640 # if 0
641  BKE_animdata_fix_paths_rename_all(NULL, "sequence_editor.sequences_all", oldname, seq->name + 2);
642 # endif
643  adt = BKE_animdata_from_id(&scene->id);
644  if (adt) {
646  &scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name + 2, 0, 0, 1);
647  }
648 }
649 
650 static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
651 {
652  Sequence *seq = (Sequence *)ptr->data;
653 
654  switch (seq->type) {
655  case SEQ_TYPE_IMAGE:
656  return &RNA_ImageSequence;
657  case SEQ_TYPE_META:
658  return &RNA_MetaSequence;
659  case SEQ_TYPE_SCENE:
660  return &RNA_SceneSequence;
661  case SEQ_TYPE_MOVIE:
662  return &RNA_MovieSequence;
663  case SEQ_TYPE_MOVIECLIP:
664  return &RNA_MovieClipSequence;
665  case SEQ_TYPE_MASK:
666  return &RNA_MaskSequence;
667  case SEQ_TYPE_SOUND_RAM:
668  return &RNA_SoundSequence;
669  case SEQ_TYPE_CROSS:
670  return &RNA_CrossSequence;
671  case SEQ_TYPE_ADD:
672  return &RNA_AddSequence;
673  case SEQ_TYPE_SUB:
674  return &RNA_SubtractSequence;
675  case SEQ_TYPE_ALPHAOVER:
676  return &RNA_AlphaOverSequence;
677  case SEQ_TYPE_ALPHAUNDER:
678  return &RNA_AlphaUnderSequence;
679  case SEQ_TYPE_GAMCROSS:
680  return &RNA_GammaCrossSequence;
681  case SEQ_TYPE_MUL:
682  return &RNA_MultiplySequence;
683  case SEQ_TYPE_OVERDROP:
684  return &RNA_OverDropSequence;
685  case SEQ_TYPE_MULTICAM:
686  return &RNA_MulticamSequence;
687  case SEQ_TYPE_ADJUSTMENT:
688  return &RNA_AdjustmentSequence;
689  case SEQ_TYPE_WIPE:
690  return &RNA_WipeSequence;
691  case SEQ_TYPE_GLOW:
692  return &RNA_GlowSequence;
693  case SEQ_TYPE_TRANSFORM:
694  return &RNA_TransformSequence;
695  case SEQ_TYPE_COLOR:
696  return &RNA_ColorSequence;
697  case SEQ_TYPE_SPEED:
698  return &RNA_SpeedControlSequence;
700  return &RNA_GaussianBlurSequence;
701  case SEQ_TYPE_TEXT:
702  return &RNA_TextSequence;
703  case SEQ_TYPE_COLORMIX:
704  return &RNA_ColorMixSequence;
705  default:
706  return &RNA_Sequence;
707  }
708 }
709 
710 static char *rna_Sequence_path(PointerRNA *ptr)
711 {
712  Sequence *seq = (Sequence *)ptr->data;
713 
714  /* sequencer data comes from scene...
715  * TODO: would be nice to make SequenceEditor data a data-block of its own (for shorter paths)
716  */
717  if (seq->name + 2) {
718  char name_esc[(sizeof(seq->name) - 2) * 2];
719 
720  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
721  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"]", name_esc);
722  }
723  else {
724  return BLI_strdup("");
725  }
726 }
727 
728 static IDProperty *rna_Sequence_idprops(PointerRNA *ptr, bool create)
729 {
730  Sequence *seq = ptr->data;
731 
732  if (create && !seq->prop) {
733  IDPropertyTemplate val = {0};
734  seq->prop = IDP_New(IDP_GROUP, &val, "Sequence ID properties");
735  }
736 
737  return seq->prop;
738 }
739 
740 static bool rna_MovieSequence_reload_if_needed(ID *scene_id, Sequence *seq, Main *bmain)
741 {
742  Scene *scene = (Scene *)scene_id;
743  bool has_reloaded;
744  bool can_produce_frames;
745 
746  SEQ_add_movie_reload_if_needed(bmain, scene, seq, &has_reloaded, &can_produce_frames);
747 
748  if (has_reloaded && can_produce_frames) {
751 
754  }
755 
756  return can_produce_frames;
757 }
758 
759 static PointerRNA rna_MovieSequence_metadata_get(Sequence *seq)
760 {
761  if (seq == NULL || seq->anims.first == NULL) {
762  return PointerRNA_NULL;
763  }
764 
765  StripAnim *sanim = seq->anims.first;
766  if (sanim->anim == NULL) {
767  return PointerRNA_NULL;
768  }
769 
770  IDProperty *metadata = IMB_anim_load_metadata(sanim->anim);
771  if (metadata == NULL) {
772  return PointerRNA_NULL;
773  }
774 
775  PointerRNA ptr;
776  RNA_pointer_create(NULL, &RNA_IDPropertyWrapPtr, metadata, &ptr);
777  return ptr;
778 }
779 
780 static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter)
781 {
782  ListBaseIterator *internal = &iter->internal.listbase;
783  MetaStack *ms = (MetaStack *)internal->link;
784 
786 }
787 
788 /* TODO, expose seq path setting as a higher level sequencer BKE function */
789 static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
790 {
791  Sequence *seq = (Sequence *)(ptr->data);
792  BLI_split_dirfile(value,
793  seq->strip->dir,
794  seq->strip->stripdata->name,
795  sizeof(seq->strip->dir),
796  sizeof(seq->strip->stripdata->name));
797 }
798 
799 static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
800 {
801  Sequence *seq = (Sequence *)(ptr->data);
802 
803  BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name);
804 }
805 
806 static int rna_Sequence_filepath_length(PointerRNA *ptr)
807 {
808  Sequence *seq = (Sequence *)(ptr->data);
809  char path[FILE_MAX];
810 
811  BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
812  return strlen(path);
813 }
814 
815 static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
816 {
817  StripProxy *proxy = (StripProxy *)(ptr->data);
818  BLI_split_dirfile(value, proxy->dir, proxy->file, sizeof(proxy->dir), sizeof(proxy->file));
819  if (proxy->anim) {
820  IMB_free_anim(proxy->anim);
821  proxy->anim = NULL;
822  }
823 }
824 
825 static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
826 {
827  StripProxy *proxy = (StripProxy *)(ptr->data);
828 
829  BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file);
830 }
831 
832 static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
833 {
834  StripProxy *proxy = (StripProxy *)(ptr->data);
835  char path[FILE_MAX];
836 
837  BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
838  return strlen(path);
839 }
840 
841 static void rna_Sequence_audio_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
842 {
844 }
845 
846 static int rna_Sequence_input_count_get(PointerRNA *ptr)
847 {
848  Sequence *seq = (Sequence *)(ptr->data);
849 
850  return SEQ_effect_get_num_inputs(seq->type);
851 }
852 
853 static void rna_Sequence_input_set(PointerRNA *ptr,
854  PointerRNA ptr_value,
855  struct ReportList *reports,
856  int input_num)
857 {
858 
859  Sequence *seq = ptr->data;
860  Sequence *input = ptr_value.data;
861 
862  if (SEQ_relations_render_loop_check(input, seq)) {
863  BKE_report(reports, RPT_ERROR, "Cannot reassign inputs: recursion detected");
864  return;
865  }
866 
867  switch (input_num) {
868  case 1:
869  seq->seq1 = input;
870  break;
871  case 2:
872  seq->seq2 = input;
873  break;
874  }
875 }
876 
877 static void rna_Sequence_input_1_set(PointerRNA *ptr,
878  PointerRNA ptr_value,
879  struct ReportList *reports)
880 {
881  rna_Sequence_input_set(ptr, ptr_value, reports, 1);
882 }
883 
884 static void rna_Sequence_input_2_set(PointerRNA *ptr,
885  PointerRNA ptr_value,
886  struct ReportList *reports)
887 {
888  rna_Sequence_input_set(ptr, ptr_value, reports, 2);
889 }
890 # if 0
891 static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
892 {
893  Sequence *seq = (Sequence *)(ptr->data);
894  BLI_split_dirfile(value,
895  seq->strip->dir,
896  seq->strip->stripdata->name,
897  sizeof(seq->strip->dir),
898  sizeof(seq->strip->stripdata->name));
899 }
900 
901 static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
902 {
903  StripElem *elem = (StripElem *)(ptr->data);
904  BLI_split_file_part(value, elem->name, sizeof(elem->name));
905 }
906 # endif
907 
908 static void rna_Sequence_reopen_files_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
909 {
910  Scene *scene = (Scene *)ptr->owner_id;
911  Editing *ed = SEQ_editing_get(scene, false);
912 
913  SEQ_relations_free_imbuf(scene, &ed->seqbase, false);
914  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
915 
918  }
919 }
920 
921 static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
922 {
923  Scene *scene = (Scene *)ptr->owner_id;
924  Sequence *seq = (Sequence *)(ptr->data);
925  SEQ_add_reload_new_file(bmain, scene, seq, true);
927  rna_Sequence_invalidate_raw_update(bmain, scene, ptr);
928 }
929 
930 static void rna_Sequence_sound_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr))
931 {
934 }
935 
936 static int seqproxy_seq_cmp_fn(Sequence *seq, void *arg_pt)
937 {
938  SequenceSearchData *data = arg_pt;
939 
940  if (seq->strip && seq->strip->proxy == data->data) {
941  data->seq = seq;
942  return -1; /* done so bail out */
943  }
944  return 1;
945 }
946 
947 static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
948 {
949  SequenceSearchData data;
950 
951  data.seq = NULL;
952  data.data = proxy;
953 
954  SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, seqproxy_seq_cmp_fn, &data);
955  return data.seq;
956 }
957 
958 static void rna_Sequence_tcindex_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
959 {
960  Scene *scene = (Scene *)ptr->owner_id;
961  Editing *ed = SEQ_editing_get(scene, false);
962  Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
963 
964  SEQ_add_reload_new_file(bmain, scene, seq, false);
965  do_sequence_frame_change_update(scene, seq);
966 }
967 
968 static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
969 {
970  Scene *scene = (Scene *)ptr->owner_id;
971  Editing *ed = SEQ_editing_get(scene, false);
972  Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
974 }
975 
976 /* do_versions? */
977 static float rna_Sequence_opacity_get(PointerRNA *ptr)
978 {
979  Sequence *seq = (Sequence *)(ptr->data);
980  return seq->blend_opacity / 100.0f;
981 }
982 static void rna_Sequence_opacity_set(PointerRNA *ptr, float value)
983 {
984  Sequence *seq = (Sequence *)(ptr->data);
985  CLAMP(value, 0.0f, 1.0f);
986  seq->blend_opacity = value * 100.0f;
987 }
988 
989 static int colbalance_seq_cmp_fn(Sequence *seq, void *arg_pt)
990 {
991  SequenceSearchData *data = arg_pt;
992 
993  if (seq->modifiers.first) {
995 
996  for (smd = seq->modifiers.first; smd; smd = smd->next) {
997  if (smd->type == seqModifierType_ColorBalance) {
999 
1000  if (&cbmd->color_balance == data->data) {
1001  data->seq = seq;
1002  data->smd = smd;
1003  return -1; /* done so bail out */
1004  }
1005  }
1006  }
1007  }
1008 
1009  return 1;
1010 }
1011 
1012 static Sequence *sequence_get_by_colorbalance(Editing *ed,
1013  StripColorBalance *cb,
1014  SequenceModifierData **r_smd)
1015 {
1016  SequenceSearchData data;
1017 
1018  data.seq = NULL;
1019  data.smd = NULL;
1020  data.data = cb;
1021 
1022  /* irritating we need to search for our sequence! */
1023  SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, colbalance_seq_cmp_fn, &data);
1024 
1025  *r_smd = data.smd;
1026 
1027  return data.seq;
1028 }
1029 
1030 static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
1031 {
1032  Scene *scene = (Scene *)ptr->owner_id;
1033  SequenceModifierData *smd;
1034  Editing *ed = SEQ_editing_get(scene, false);
1035  Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd);
1036 
1037  if (seq && seq->name + 2) {
1038  char name_esc[(sizeof(seq->name) - 2) * 2];
1039 
1040  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
1041 
1042  if (!smd) {
1043  /* path to old filter color balance */
1044  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", name_esc);
1045  }
1046  else {
1047  /* path to modifier */
1048  char name_esc_smd[sizeof(smd->name) * 2];
1049 
1050  BLI_str_escape(name_esc_smd, smd->name, sizeof(name_esc_smd));
1051  return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"].color_balance",
1052  name_esc,
1053  name_esc_smd);
1054  }
1055  }
1056  else {
1057  return BLI_strdup("");
1058  }
1059 }
1060 
1061 static void rna_SequenceColorBalance_update(Main *UNUSED(bmain),
1062  Scene *UNUSED(scene),
1063  PointerRNA *ptr)
1064 {
1065  Scene *scene = (Scene *)ptr->owner_id;
1066  Editing *ed = SEQ_editing_get(scene, false);
1067  SequenceModifierData *smd;
1068  Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd);
1069 
1071 }
1072 
1073 static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value)
1074 {
1075  Scene *scene = (Scene *)ptr->owner_id;
1076  Editing *ed = SEQ_editing_get(scene, false);
1077 
1078  if (ed == NULL) {
1079  return;
1080  }
1081 
1082  /* convert from abs to relative and back */
1083  if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) == 0 && value) {
1084  ed->over_cfra = scene->r.cfra + ed->over_ofs;
1086  }
1087  else if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
1088  ed->over_ofs = ed->over_cfra - scene->r.cfra;
1090  }
1091 }
1092 
1093 static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
1094 {
1095  Scene *scene = (Scene *)ptr->owner_id;
1096  Editing *ed = SEQ_editing_get(scene, false);
1097 
1098  if (ed == NULL) {
1099  return scene->r.cfra;
1100  }
1101 
1102  if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS) {
1103  return ed->over_cfra - scene->r.cfra;
1104  }
1105  else {
1106  return ed->over_ofs;
1107  }
1108 }
1109 
1110 static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
1111 {
1112  Scene *scene = (Scene *)ptr->owner_id;
1113  Editing *ed = SEQ_editing_get(scene, false);
1114 
1115  if (ed == NULL) {
1116  return;
1117  }
1118 
1119  if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS) {
1120  ed->over_cfra = (scene->r.cfra + value);
1121  }
1122  else {
1123  ed->over_ofs = value;
1124  }
1125 }
1126 
1127 static int modifier_seq_cmp_fn(Sequence *seq, void *arg_pt)
1128 {
1129  SequenceSearchData *data = arg_pt;
1130 
1131  if (BLI_findindex(&seq->modifiers, data->data) != -1) {
1132  data->seq = seq;
1133  return -1; /* done so bail out */
1134  }
1135 
1136  return 1;
1137 }
1138 
1139 static Sequence *sequence_get_by_modifier(Editing *ed, SequenceModifierData *smd)
1140 {
1141  SequenceSearchData data;
1142 
1143  data.seq = NULL;
1144  data.data = smd;
1145 
1146  /* irritating we need to search for our sequence! */
1147  SEQ_iterator_seqbase_recursive_apply(&ed->seqbase, modifier_seq_cmp_fn, &data);
1148 
1149  return data.seq;
1150 }
1151 
1152 static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr)
1153 {
1155 
1156  switch (smd->type) {
1158  return &RNA_ColorBalanceModifier;
1160  return &RNA_CurvesModifier;
1162  return &RNA_HueCorrectModifier;
1164  return &RNA_BrightContrastModifier;
1166  return &RNA_WhiteBalanceModifier;
1168  return &RNA_SequencerTonemapModifierData;
1169  default:
1170  return &RNA_SequenceModifier;
1171  }
1172 }
1173 
1174 static char *rna_SequenceModifier_path(PointerRNA *ptr)
1175 {
1176  Scene *scene = (Scene *)ptr->owner_id;
1177  Editing *ed = SEQ_editing_get(scene, false);
1178  SequenceModifierData *smd = ptr->data;
1179  Sequence *seq = sequence_get_by_modifier(ed, smd);
1180 
1181  if (seq && seq->name + 2) {
1182  char name_esc[(sizeof(seq->name) - 2) * 2];
1183  char name_esc_smd[sizeof(smd->name) * 2];
1184 
1185  BLI_str_escape(name_esc, seq->name + 2, sizeof(name_esc));
1186  BLI_str_escape(name_esc_smd, smd->name, sizeof(name_esc_smd));
1187  return BLI_sprintfN(
1188  "sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"]", name_esc, name_esc_smd);
1189  }
1190  else {
1191  return BLI_strdup("");
1192  }
1193 }
1194 
1195 static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value)
1196 {
1197  SequenceModifierData *smd = ptr->data;
1198  Scene *scene = (Scene *)ptr->owner_id;
1199  Editing *ed = SEQ_editing_get(scene, false);
1200  Sequence *seq = sequence_get_by_modifier(ed, smd);
1201  AnimData *adt;
1202  char oldname[sizeof(smd->name)];
1203 
1204  /* make a copy of the old name first */
1205  BLI_strncpy(oldname, smd->name, sizeof(smd->name));
1206 
1207  /* copy the new name into the name slot */
1208  BLI_strncpy_utf8(smd->name, value, sizeof(smd->name));
1209 
1210  /* make sure the name is truly unique */
1211  SEQ_modifier_unique_name(seq, smd);
1212 
1213  /* fix all the animation data which may link to this */
1214  adt = BKE_animdata_from_id(&scene->id);
1215  if (adt) {
1216  char path[1024];
1217 
1218  char seq_name_esc[(sizeof(seq->name) - 2) * 2];
1219  BLI_str_escape(seq_name_esc, seq->name + 2, sizeof(seq_name_esc));
1220 
1221  BLI_snprintf(
1222  path, sizeof(path), "sequence_editor.sequences_all[\"%s\"].modifiers", seq_name_esc);
1223  BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, path, oldname, smd->name, 0, 0, 1);
1224  }
1225 }
1226 
1227 static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
1228 {
1229  /* strip from other scenes could be modified, so using active scene is not reliable */
1230  Scene *scene = (Scene *)ptr->owner_id;
1231  Editing *ed = SEQ_editing_get(scene, false);
1232  Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
1233 
1235 }
1236 
1237 static bool rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
1238 {
1239  Scene *scene = (Scene *)ptr->owner_id;
1240  Editing *ed = SEQ_editing_get(scene, false);
1241  Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
1242  Sequence *cur = (Sequence *)value.data;
1243 
1244  if ((seq == cur) || (cur->type == SEQ_TYPE_SOUND_RAM)) {
1245  return false;
1246  }
1247 
1248  return true;
1249 }
1250 
1251 static SequenceModifierData *rna_Sequence_modifier_new(
1252  Sequence *seq, bContext *C, ReportList *reports, const char *name, int type)
1253 {
1254  if (!SEQ_sequence_supports_modifiers(seq)) {
1255  BKE_report(reports, RPT_ERROR, "Sequence type does not support modifiers");
1256 
1257  return NULL;
1258  }
1259  else {
1261  SequenceModifierData *smd;
1262 
1263  smd = SEQ_modifier_new(seq, name, type);
1264 
1266 
1268 
1269  return smd;
1270  }
1271 }
1272 
1273 static void rna_Sequence_modifier_remove(Sequence *seq,
1274  bContext *C,
1275  ReportList *reports,
1276  PointerRNA *smd_ptr)
1277 {
1278  SequenceModifierData *smd = smd_ptr->data;
1280 
1281  if (SEQ_modifier_remove(seq, smd) == false) {
1282  BKE_report(reports, RPT_ERROR, "Modifier was not found in the stack");
1283  return;
1284  }
1285 
1286  RNA_POINTER_INVALIDATE(smd_ptr);
1288 
1290 }
1291 
1292 static void rna_Sequence_modifier_clear(Sequence *seq, bContext *C)
1293 {
1295 
1296  SEQ_modifier_clear(seq);
1297 
1299 
1301 }
1302 
1303 static void rna_SequenceModifier_strip_set(PointerRNA *ptr,
1304  PointerRNA value,
1305  struct ReportList *reports)
1306 {
1307  SequenceModifierData *smd = ptr->data;
1308  Scene *scene = (Scene *)ptr->owner_id;
1309  Editing *ed = SEQ_editing_get(scene, false);
1310  Sequence *seq = sequence_get_by_modifier(ed, smd);
1311  Sequence *target = (Sequence *)value.data;
1312 
1313  if (target != NULL && SEQ_relations_render_loop_check(target, seq)) {
1314  BKE_report(reports, RPT_ERROR, "Recursion detected, can not use this strip");
1315  return;
1316  }
1317 
1318  smd->mask_sequence = target;
1319 }
1320 
1321 static float rna_Sequence_fps_get(PointerRNA *ptr)
1322 {
1323  Scene *scene = (Scene *)ptr->owner_id;
1324  Sequence *seq = (Sequence *)(ptr->data);
1325  return SEQ_time_sequence_get_fps(scene, seq);
1326 }
1327 
1328 #else
1329 
1331 {
1332  StructRNA *srna;
1333  PropertyRNA *prop;
1334 
1335  srna = RNA_def_struct(brna, "SequenceElement", NULL);
1336  RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame");
1337  RNA_def_struct_sdna(srna, "StripElem");
1338 
1339  prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
1340  RNA_def_property_string_sdna(prop, NULL, "name");
1341  RNA_def_property_ui_text(prop, "Filename", "Name of the source file");
1342  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceElement_update");
1343 
1344  prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
1345  RNA_def_property_int_sdna(prop, NULL, "orig_width");
1347  RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
1348 
1349  prop = RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
1350  RNA_def_property_int_sdna(prop, NULL, "orig_height");
1352  RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
1353 }
1354 
1355 static void rna_def_strip_crop(BlenderRNA *brna)
1356 {
1357  StructRNA *srna;
1358  PropertyRNA *prop;
1359 
1360  srna = RNA_def_struct(brna, "SequenceCrop", NULL);
1361  RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip");
1362  RNA_def_struct_sdna(srna, "StripCrop");
1363 
1364  prop = RNA_def_property(srna, "max_y", PROP_INT, PROP_PIXEL);
1365  RNA_def_property_int_sdna(prop, NULL, "top");
1366  RNA_def_property_ui_text(prop, "Top", "Number of pixels to crop from the top");
1367  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1368  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1369 
1370  prop = RNA_def_property(srna, "min_y", PROP_INT, PROP_PIXEL);
1371  RNA_def_property_int_sdna(prop, NULL, "bottom");
1372  RNA_def_property_ui_text(prop, "Bottom", "Number of pixels to crop from the bottom");
1373  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1374  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1375 
1376  prop = RNA_def_property(srna, "min_x", PROP_INT, PROP_PIXEL);
1377  RNA_def_property_int_sdna(prop, NULL, "left");
1378  RNA_def_property_ui_text(prop, "Left", "Number of pixels to crop from the left side");
1379  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1380  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1381 
1382  prop = RNA_def_property(srna, "max_x", PROP_INT, PROP_PIXEL);
1383  RNA_def_property_int_sdna(prop, NULL, "right");
1384  RNA_def_property_ui_text(prop, "Right", "Number of pixels to crop from the right side");
1385  RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1386  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
1387 
1388  RNA_def_struct_path_func(srna, "rna_SequenceCrop_path");
1389 }
1390 
1392 {
1393  StructRNA *srna;
1394  PropertyRNA *prop;
1395 
1396  srna = RNA_def_struct(brna, "SequenceTransform", NULL);
1397  RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform parameters for a sequence strip");
1398  RNA_def_struct_sdna(srna, "StripTransform");
1399 
1400  prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
1401  RNA_def_property_float_sdna(prop, NULL, "scale_x");
1402  RNA_def_property_ui_text(prop, "Scale X", "Scale along X axis");
1403  RNA_def_property_ui_range(prop, 0, FLT_MAX, 3, 3);
1404  RNA_def_property_float_default(prop, 1.0f);
1405  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1406 
1407  prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
1408  RNA_def_property_float_sdna(prop, NULL, "scale_y");
1409  RNA_def_property_ui_text(prop, "Scale Y", "Scale along Y axis");
1410  RNA_def_property_ui_range(prop, 0, FLT_MAX, 3, 3);
1411  RNA_def_property_float_default(prop, 1.0f);
1412  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1413 
1414  prop = RNA_def_property(srna, "offset_x", PROP_INT, PROP_PIXEL);
1415  RNA_def_property_int_sdna(prop, NULL, "xofs");
1416  RNA_def_property_ui_text(prop, "Translate X", "Move along X axis");
1417  RNA_def_property_ui_range(prop, INT_MIN, INT_MAX, 1, 6);
1418  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1419 
1420  prop = RNA_def_property(srna, "offset_y", PROP_INT, PROP_PIXEL);
1421  RNA_def_property_int_sdna(prop, NULL, "yofs");
1422  RNA_def_property_ui_text(prop, "Translate Y", "Move along Y axis");
1423  RNA_def_property_ui_range(prop, INT_MIN, INT_MAX, 1, 6);
1424  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1425 
1426  prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE);
1427  RNA_def_property_float_sdna(prop, NULL, "rotation");
1428  RNA_def_property_ui_text(prop, "Rotation", "Rotate around image center");
1429  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
1430 
1431  RNA_def_struct_path_func(srna, "rna_SequenceTransform_path");
1432 }
1433 
1435 {
1436  StructRNA *srna;
1437  PropertyRNA *prop;
1438 
1439  static const EnumPropertyItem seq_tc_items[] = {
1440  {SEQ_PROXY_TC_NONE, "NONE", 0, "No TC in use", ""},
1442  "RECORD_RUN",
1443  0,
1444  "Record Run",
1445  "Use images in the order as they are recorded"},
1447  "FREE_RUN",
1448  0,
1449  "Free Run",
1450  "Use global timestamp written by recording device"},
1452  "FREE_RUN_REC_DATE",
1453  0,
1454  "Free Run (rec date)",
1455  "Interpolate a global timestamp using the "
1456  "record date and time written by recording device"},
1458  "RECORD_RUN_NO_GAPS",
1459  0,
1460  "Record Run No Gaps",
1461  "Like record run, but ignore timecode, "
1462  "changes in framerate or dropouts"},
1463  {0, NULL, 0, NULL, NULL},
1464  };
1465 
1466  srna = RNA_def_struct(brna, "SequenceProxy", NULL);
1467  RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
1468  RNA_def_struct_sdna(srna, "StripProxy");
1469 
1470  prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
1471  RNA_def_property_string_sdna(prop, NULL, "dir");
1472  RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
1473  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
1474 
1475  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
1476  RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
1478  "rna_Sequence_proxy_filepath_get",
1479  "rna_Sequence_proxy_filepath_length",
1480  "rna_Sequence_proxy_filepath_set");
1481 
1482  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
1483 
1484  prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
1486  RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing proxy files when building");
1487 
1488  prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
1489  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
1490  RNA_def_property_ui_text(prop, "25%", "Build 25% proxy resolution");
1491 
1492  prop = RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
1493  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_50);
1494  RNA_def_property_ui_text(prop, "50%", "Build 50% proxy resolution");
1495 
1496  prop = RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
1497  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_75);
1498  RNA_def_property_ui_text(prop, "75%", "Build 75% proxy resolution");
1499 
1500  prop = RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
1501  RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_100);
1502  RNA_def_property_ui_text(prop, "100%", "Build 100% proxy resolution");
1503 
1504  prop = RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
1506  RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
1507 
1508  prop = RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
1509  RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_FREE_RUN);
1510  RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index");
1511 
1512  prop = RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
1514  prop, NULL, "build_tc_flags", SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN);
1516  prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time");
1517 
1518  prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
1519  RNA_def_property_int_sdna(prop, NULL, "quality");
1520  RNA_def_property_ui_text(prop, "Quality", "JPEG Quality of proxies to build");
1521  RNA_def_property_ui_range(prop, 1, 100, 1, -1);
1522 
1523  prop = RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
1524  RNA_def_property_enum_sdna(prop, NULL, "tc");
1525  RNA_def_property_enum_items(prop, seq_tc_items);
1526  RNA_def_property_ui_text(prop, "Timecode", "Method for reading the inputs timecode");
1527  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_tcindex_update");
1528 
1529  prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
1531  RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
1533  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1534 
1535  prop = RNA_def_property(srna, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
1537  RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
1539  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1540 }
1541 
1543 {
1544  StructRNA *srna;
1545  PropertyRNA *prop;
1546 
1547  srna = RNA_def_struct(brna, "SequenceColorBalanceData", NULL);
1549  "Sequence Color Balance Data",
1550  "Color balance parameters for a sequence strip and its modifiers");
1551  RNA_def_struct_sdna(srna, "StripColorBalance");
1552 
1553  prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR_GAMMA);
1554  RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
1555  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1556  RNA_def_property_float_default(prop, 1.0f);
1557  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1558 
1559  prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR_GAMMA);
1560  RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
1561  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1562  RNA_def_property_float_default(prop, 1.0f);
1563  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1564 
1565  prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR_GAMMA);
1566  RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
1567  RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1568  RNA_def_property_float_default(prop, 1.0f);
1569  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1570 
1571  prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
1573  RNA_def_property_ui_text(prop, "Inverse Gain", "Invert the gain color`");
1574  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1575 
1576  prop = RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
1578  RNA_def_property_ui_text(prop, "Inverse Gamma", "Invert the gamma color");
1579  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1580 
1581  prop = RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
1583  RNA_def_property_ui_text(prop, "Inverse Lift", "Invert the lift color");
1584  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1585 
1586  /* not yet used */
1587 # if 0
1588  prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
1589  RNA_def_property_range(prop, 0.0f, 1.0f);
1590  RNA_def_property_ui_text(prop, "Exposure", "");
1591  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
1592 
1593  prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
1594  RNA_def_property_range(prop, 0.0f, 1.0f);
1595  RNA_def_property_ui_text(prop, "Saturation", "");
1596  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
1597 # endif
1598 
1599  RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
1600 }
1601 
1603 {
1604  StructRNA *srna;
1605 
1606  srna = RNA_def_struct(brna, "SequenceColorBalance", "SequenceColorBalanceData");
1608  srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
1609  RNA_def_struct_sdna(srna, "StripColorBalance");
1610 }
1611 
1613  {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
1614  {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
1615  {0, "", ICON_NONE, NULL, NULL},
1616  {SEQ_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
1617  {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
1618  {SEQ_TYPE_COLOR_BURN, "BURN", 0, "Color Burn", ""},
1619  {SEQ_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
1620  {0, "", ICON_NONE, NULL, NULL},
1621  {SEQ_TYPE_LIGHTEN, "LIGHTEN", 0, "Lighten", ""},
1622  {SEQ_TYPE_SCREEN, "SCREEN", 0, "Screen", ""},
1623  {SEQ_TYPE_DODGE, "DODGE", 0, "Color Dodge", ""},
1624  {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
1625  {0, "", ICON_NONE, NULL, NULL},
1626  {SEQ_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
1627  {SEQ_TYPE_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
1628  {SEQ_TYPE_HARD_LIGHT, "HARD_LIGHT", 0, "Hard Light", ""},
1629  {SEQ_TYPE_VIVID_LIGHT, "VIVID_LIGHT", 0, "Vivid Light", ""},
1630  {SEQ_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
1631  {SEQ_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
1632  {0, "", ICON_NONE, NULL, NULL},
1633  {SEQ_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
1634  {SEQ_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
1635  {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
1636  {0, "", ICON_NONE, NULL, NULL},
1637  {SEQ_TYPE_HUE, "HUE", 0, "Hue", ""},
1638  {SEQ_TYPE_SATURATION, "SATURATION", 0, "Saturation", ""},
1639  {SEQ_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
1640  {SEQ_TYPE_VALUE, "VALUE", 0, "Value", ""},
1641  {0, "", ICON_NONE, NULL, NULL},
1642  {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
1643  {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
1644  {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
1645  {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
1646  {0, NULL, 0, NULL, NULL},
1647 };
1648 
1650 {
1651  StructRNA *srna;
1652 
1653  FunctionRNA *func;
1654  PropertyRNA *parm;
1655 
1656  RNA_def_property_srna(cprop, "SequenceModifiers");
1657  srna = RNA_def_struct(brna, "SequenceModifiers", NULL);
1658  RNA_def_struct_sdna(srna, "Sequence");
1659  RNA_def_struct_ui_text(srna, "Strip Modifiers", "Collection of strip modifiers");
1660 
1661  /* add modifier */
1662  func = RNA_def_function(srna, "new", "rna_Sequence_modifier_new");
1664  RNA_def_function_ui_description(func, "Add a new modifier");
1665  parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier");
1667  /* modifier to add */
1668  parm = RNA_def_enum(func,
1669  "type",
1672  "",
1673  "Modifier type to add");
1675  /* return type */
1676  parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Newly created modifier");
1677  RNA_def_function_return(func, parm);
1678 
1679  /* remove modifier */
1680  func = RNA_def_function(srna, "remove", "rna_Sequence_modifier_remove");
1682  RNA_def_function_ui_description(func, "Remove an existing modifier from the sequence");
1683  /* modifier to remove */
1684  parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Modifier to remove");
1687 
1688  /* clear all modifiers */
1689  func = RNA_def_function(srna, "clear", "rna_Sequence_modifier_clear");
1691  RNA_def_function_ui_description(func, "Remove all modifiers from the sequence");
1692 }
1693 
1694 static void rna_def_sequence(BlenderRNA *brna)
1695 {
1696  StructRNA *srna;
1697  PropertyRNA *prop;
1698 
1699  static const EnumPropertyItem seq_type_items[] = {
1700  {SEQ_TYPE_IMAGE, "IMAGE", 0, "Image", ""},
1701  {SEQ_TYPE_META, "META", 0, "Meta", ""},
1702  {SEQ_TYPE_SCENE, "SCENE", 0, "Scene", ""},
1703  {SEQ_TYPE_MOVIE, "MOVIE", 0, "Movie", ""},
1704  {SEQ_TYPE_MOVIECLIP, "MOVIECLIP", 0, "Clip", ""},
1705  {SEQ_TYPE_MASK, "MASK", 0, "Mask", ""},
1706  {SEQ_TYPE_SOUND_RAM, "SOUND", 0, "Sound", ""},
1707  {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
1708  {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
1709  {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
1710  {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
1711  {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
1712  {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
1713  {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
1714  {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
1715  {SEQ_TYPE_WIPE, "WIPE", 0, "Wipe", ""},
1716  {SEQ_TYPE_GLOW, "GLOW", 0, "Glow", ""},
1717  {SEQ_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
1718  {SEQ_TYPE_COLOR, "COLOR", 0, "Color", ""},
1719  {SEQ_TYPE_SPEED, "SPEED", 0, "Speed", ""},
1720  {SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
1721  {SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
1722  {SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
1723  {SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
1724  {SEQ_TYPE_COLORMIX, "COLORMIX", 0, "Color Mix", ""},
1725  {0, NULL, 0, NULL, NULL},
1726  };
1727 
1728  srna = RNA_def_struct(brna, "Sequence", NULL);
1729  RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor");
1730  RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
1731  RNA_def_struct_path_func(srna, "rna_Sequence_path");
1732  RNA_def_struct_idprops_func(srna, "rna_Sequence_idprops");
1733 
1734  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
1736  prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
1737  RNA_def_property_string_maxlength(prop, sizeof(((Sequence *)NULL)->name) - 2);
1738  RNA_def_property_ui_text(prop, "Name", "");
1739  RNA_def_struct_name_property(srna, prop);
1741 
1742  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
1744  RNA_def_property_enum_items(prop, seq_type_items);
1745  RNA_def_property_ui_text(prop, "Type", "");
1747  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
1748 
1749  /* flags */
1750  prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
1751  RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
1752  RNA_def_property_ui_text(prop, "Select", "");
1754 
1755  prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
1757  RNA_def_property_ui_text(prop, "Left Handle Selected", "");
1759 
1760  prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
1762  RNA_def_property_ui_text(prop, "Right Handle Selected", "");
1764 
1765  prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
1767  RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1);
1769  prop, "Mute", "Disable strip so that it cannot be viewed in the output");
1770  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
1771 
1772  prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
1775  RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
1776  RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it cannot be transformed");
1778 
1779  /* strip positioning */
1780  /* Cache has to be invalidated before and after transformation. */
1781  prop = RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
1782  RNA_def_property_range(prop, 1, MAXFRAME);
1785  prop, "Length", "The length of the contents of this strip after the handles are applied");
1787  prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set", NULL);
1788  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1790  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1791 
1792  prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
1793  RNA_def_property_int_sdna(prop, NULL, "len");
1795  RNA_def_property_range(prop, 1, MAXFRAME);
1797  prop, "Length", "The length of the contents of this strip before the handles are applied");
1798 
1799  prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
1800  RNA_def_property_int_sdna(prop, NULL, "start");
1802  RNA_def_property_ui_text(prop, "Start Frame", "X position where the strip begins");
1804  prop, NULL, "rna_Sequence_start_frame_set", NULL); /* overlap tests and calc_seq_disp */
1805  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1807  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1808 
1809  prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
1810  RNA_def_property_int_sdna(prop, NULL, "startdisp");
1813  prop,
1814  "Start Frame",
1815  "Start frame displayed in the sequence editor after offsets are applied, setting this is "
1816  "equivalent to moving the handle, not the actual start frame");
1817  /* overlap tests and calc_seq_disp */
1818  RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL);
1819  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1821  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1822 
1823  prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
1824  RNA_def_property_int_sdna(prop, NULL, "enddisp");
1827  prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
1828  /* overlap tests and calc_seq_disp */
1829  RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL);
1830  RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1832  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1833 
1834  prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
1835  RNA_def_property_int_sdna(prop, NULL, "startofs");
1836  // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1837  RNA_def_property_ui_text(prop, "Start Offset", "");
1839  prop, NULL, "rna_Sequence_frame_offset_start_set", "rna_Sequence_frame_offset_start_range");
1840  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
1841 
1842  prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
1843  RNA_def_property_int_sdna(prop, NULL, "endofs");
1844  // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1845  RNA_def_property_ui_text(prop, "End Offset", "");
1847  prop, NULL, "rna_Sequence_frame_offset_end_set", "rna_Sequence_frame_offset_end_range");
1848  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
1849 
1850  prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
1851  RNA_def_property_int_sdna(prop, NULL, "startstill");
1852  // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1853  RNA_def_property_range(prop, 0, MAXFRAME);
1854  RNA_def_property_ui_text(prop, "Start Still", "");
1855  RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_frame_still_start_set", NULL);
1856  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
1857 
1858  prop = RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
1859  RNA_def_property_int_sdna(prop, NULL, "endstill");
1860  // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1861  RNA_def_property_range(prop, 0, MAXFRAME);
1862  RNA_def_property_ui_text(prop, "End Still", "");
1863  RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_frame_still_end_set", NULL);
1864  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
1865 
1866  prop = RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
1867  RNA_def_property_int_sdna(prop, NULL, "machine");
1869  RNA_def_property_range(prop, 1, MAXSEQ);
1870  RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
1871  RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set", NULL); /* overlap test */
1873  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1874 
1875  prop = RNA_def_property(srna, "use_linear_modifiers", PROP_BOOLEAN, PROP_NONE);
1878  "Use Linear Modifiers",
1879  "Calculate modifiers in linear space instead of sequencer's space");
1881  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1882 
1883  /* blending */
1884 
1885  prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
1886  RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
1889  prop, "Blending Mode", "Method for controlling how the strip combines with other strips");
1891  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1892 
1893  prop = RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
1894  RNA_def_property_range(prop, 0.0f, 1.0f);
1896  prop, "Blend Opacity", "Percentage of how much the strip's colors affect other strips");
1897  /* stupid 0-100 -> 0-1 */
1898  RNA_def_property_float_funcs(prop, "rna_Sequence_opacity_get", "rna_Sequence_opacity_set", NULL);
1900  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_composite_update");
1901 
1902  prop = RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_FACTOR);
1903  RNA_def_property_range(prop, 0.0f, 1.0f);
1904  RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
1905  RNA_def_property_float_sdna(prop, NULL, "effect_fader");
1906  RNA_def_property_ui_text(prop, "Effect Fader Position", "Custom fade value");
1908  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1909 
1910  prop = RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
1913  prop,
1914  "Use Default Fade",
1915  "Fade effect using the built-in default (usually make transition as long as "
1916  "effect strip)");
1918  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1919 
1920  prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
1921  RNA_def_property_float_sdna(prop, NULL, "speed_fader");
1923  prop,
1924  "Speed Factor",
1925  "Multiply the current speed of the sequence with this number or remap current frame "
1926  "to this frame");
1928  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
1929 
1930  /* modifiers */
1931  prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
1932  RNA_def_property_struct_type(prop, "SequenceModifier");
1933  RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting this strip");
1934  rna_def_sequence_modifiers(brna, prop);
1935 
1936  prop = RNA_def_property(srna, "use_cache_raw", PROP_BOOLEAN, PROP_NONE);
1939  "Cache Raw",
1940  "Cache raw images read from disk, for faster tweaking of strip "
1941  "parameters at the cost of memory usage");
1942 
1943  prop = RNA_def_property(srna, "use_cache_preprocessed", PROP_BOOLEAN, PROP_NONE);
1946  prop,
1947  "Cache Preprocessed",
1948  "Cache preprocessed images, for faster tweaking of effects at the cost of memory usage");
1949 
1950  prop = RNA_def_property(srna, "use_cache_composite", PROP_BOOLEAN, PROP_NONE);
1953  "Cache Composite",
1954  "Cache intermediate composited images, for faster tweaking of stacked "
1955  "strips at the cost of memory usage");
1956 
1957  prop = RNA_def_property(srna, "override_cache_settings", PROP_BOOLEAN, PROP_NONE);
1959  RNA_def_property_ui_text(prop, "Override Cache Settings", "Override global cache settings");
1960 
1961  RNA_api_sequence_strip(srna);
1962 }
1963 
1964 static void rna_def_editor(BlenderRNA *brna)
1965 {
1966  StructRNA *srna;
1967  PropertyRNA *prop;
1968 
1969  static const EnumPropertyItem editing_storage_items[] = {
1970  {0, "PER_STRIP", 0, "Per Strip", "Store proxies using per strip settings"},
1972  "PROJECT",
1973  0,
1974  "Project",
1975  "Store proxies using project directory"},
1976  {0, NULL, 0, NULL, NULL},
1977  };
1978  srna = RNA_def_struct(brna, "SequenceEditor", NULL);
1979  RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene data-block");
1980  RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
1981  RNA_def_struct_sdna(srna, "Editing");
1982 
1983  prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
1984  RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
1985  RNA_def_property_struct_type(prop, "Sequence");
1986  RNA_def_property_ui_text(prop, "Sequences", "Top-level strips only");
1987  RNA_api_sequences(brna, prop, false);
1988 
1989  prop = RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
1990  RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
1991  RNA_def_property_struct_type(prop, "Sequence");
1993  prop, "All Sequences", "All strips, recursively including those inside metastrips");
1995  "rna_SequenceEditor_sequences_all_begin",
1996  "rna_SequenceEditor_sequences_all_next",
1997  NULL,
1998  NULL,
1999  NULL,
2000  NULL,
2001  NULL,
2002  NULL);
2003 
2004  prop = RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
2005  RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
2006  RNA_def_property_struct_type(prop, "Sequence");
2008  prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
2010  prop, NULL, NULL, NULL, "rna_SequenceEditor_meta_stack_get", NULL, NULL, NULL, NULL);
2011 
2012  prop = RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
2013  RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
2015  RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
2016 
2017  prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
2020  prop, "Show Overlay", "Partial overlay on top of the sequencer with a frame offset");
2022 
2023  prop = RNA_def_property(srna, "use_overlay_lock", PROP_BOOLEAN, PROP_NONE);
2025  RNA_def_property_ui_text(prop, "Overlay Lock", "");
2026  RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
2028 
2029  /* access to fixed and relative frame */
2030  prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
2031  RNA_def_property_ui_text(prop, "Overlay Offset", "Number of frames to offset");
2033  prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL);
2035 
2036  prop = RNA_def_property(srna, "proxy_storage", PROP_ENUM, PROP_NONE);
2037  RNA_def_property_enum_items(prop, editing_storage_items);
2038  RNA_def_property_ui_text(prop, "Proxy Storage", "How to store proxies for this project");
2039  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
2040 
2041  prop = RNA_def_property(srna, "proxy_dir", PROP_STRING, PROP_DIRPATH);
2042  RNA_def_property_string_sdna(prop, NULL, "proxy_dir");
2043  RNA_def_property_ui_text(prop, "Proxy Directory", "");
2044  RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
2045 
2046  /* cache flags */
2047 
2048  prop = RNA_def_property(srna, "show_cache", PROP_BOOLEAN, PROP_NONE);
2050  RNA_def_property_ui_text(prop, "Show Cache", "Visualize cached images on the timeline");
2052 
2053  prop = RNA_def_property(srna, "show_cache_final_out", PROP_BOOLEAN, PROP_NONE);
2055  RNA_def_property_ui_text(prop, "Final Images", "Visualize cached complete frames");
2057 
2058  prop = RNA_def_property(srna, "show_cache_raw", PROP_BOOLEAN, PROP_NONE);
2060  RNA_def_property_ui_text(prop, "Raw Images", "Visualize cached raw images");
2062 
2063  prop = RNA_def_property(srna, "show_cache_preprocessed", PROP_BOOLEAN, PROP_NONE);
2065  RNA_def_property_ui_text(prop, "Pre-processed Images", "Visualize cached pre-processed images");
2067 
2068  prop = RNA_def_property(srna, "show_cache_composite", PROP_BOOLEAN, PROP_NONE);
2070  RNA_def_property_ui_text(prop, "Composite Images", "Visualize cached composite images");
2072 
2073  prop = RNA_def_property(srna, "use_cache_raw", PROP_BOOLEAN, PROP_NONE);
2076  "Cache Raw",
2077  "Cache raw images read from disk, for faster tweaking of strip "
2078  "parameters at the cost of memory usage");
2079 
2080  prop = RNA_def_property(srna, "use_cache_preprocessed", PROP_BOOLEAN, PROP_NONE);
2083  prop,
2084  "Cache Pre-processed",
2085  "Cache pre-processed images, for faster tweaking of effects at the cost of memory usage");
2086 
2087  prop = RNA_def_property(srna, "use_cache_composite", PROP_BOOLEAN, PROP_NONE);
2090  "Cache Composite",
2091  "Cache intermediate composited images, for faster tweaking of stacked "
2092  "strips at the cost of memory usage");
2093 
2094  prop = RNA_def_property(srna, "use_cache_final", PROP_BOOLEAN, PROP_NONE);
2096  RNA_def_property_ui_text(prop, "Cache Final", "Cache final image for each frame");
2097 
2098  prop = RNA_def_property(srna, "use_prefetch", PROP_BOOLEAN, PROP_NONE);
2101  prop,
2102  "Prefetch Frames",
2103  "Render frames ahead of current frame in the background for faster playback");
2105 }
2106 
2108 {
2109  PropertyRNA *prop;
2110 
2111  static const EnumPropertyItem alpha_mode_items[] = {
2113  "STRAIGHT",
2114  0,
2115  "Straight",
2116  "RGB channels in transparent pixels are unaffected by the alpha channel"},
2118  "PREMUL",
2119  0,
2120  "Premultiplied",
2121  "RGB channels in transparent pixels are multiplied by the alpha channel"},
2122  {0, NULL, 0, NULL, NULL},
2123  };
2124 
2125  prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
2127  RNA_def_property_ui_text(prop, "Deinterlace", "Remove fields from video movies");
2128  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_reopen_files_update");
2129 
2130  prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
2131  RNA_def_property_enum_items(prop, alpha_mode_items);
2133  prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
2134  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2135 
2136  prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
2138  RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
2139  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2140 
2141  prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
2143  RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
2144  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2145 
2146  prop = RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
2148  RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
2149  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2150 
2151  prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
2153  RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse frame order");
2155 
2156  prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
2157  RNA_def_property_float_sdna(prop, NULL, "mul");
2158  RNA_def_property_range(prop, 0.0f, 20.0f);
2159  RNA_def_property_float_default(prop, 1.0f);
2160  RNA_def_property_ui_text(prop, "Multiply Colors", "");
2162  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2163 
2164  prop = RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
2165  RNA_def_property_float_sdna(prop, NULL, "sat");
2166  RNA_def_property_range(prop, 0.0f, 20.0f);
2167  RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
2168  RNA_def_property_float_default(prop, 1.0f);
2169  RNA_def_property_ui_text(prop, "Saturation", "Adjust the intensity of the input's color");
2171  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2172 
2173  prop = RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
2174  RNA_def_property_range(prop, 1.0f, 30.0f);
2175  RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
2177 
2178  prop = RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
2179  RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
2180  RNA_def_property_ui_text(prop, "Transform", "");
2181 
2182  prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
2183  RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
2184  RNA_def_property_ui_text(prop, "Crop", "");
2185 }
2186 
2187 static void rna_def_proxy(StructRNA *srna)
2188 {
2189  PropertyRNA *prop;
2190 
2191  prop = RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
2194  prop, "Use Proxy / Timecode", "Use a preview proxy and/or time-code index for this strip");
2195  RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set");
2197  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2198 
2199  prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
2200  RNA_def_property_pointer_sdna(prop, NULL, "strip->proxy");
2201  RNA_def_property_ui_text(prop, "Proxy", "");
2202 }
2203 
2204 static void rna_def_input(StructRNA *srna)
2205 {
2206  PropertyRNA *prop;
2207 
2208  prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED);
2209  RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
2212  NULL,
2213  "rna_Sequence_anim_startofs_final_set",
2214  "rna_Sequence_anim_startofs_final_range"); /* overlap tests */
2215  RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
2217  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2218 
2219  prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
2220  RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
2223  NULL,
2224  "rna_Sequence_anim_endofs_final_set",
2225  "rna_Sequence_anim_endofs_final_range"); /* overlap tests */
2226  RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
2228  prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_preprocessed_update");
2229 }
2230 
2231 static void rna_def_effect_inputs(StructRNA *srna, int count)
2232 {
2233  PropertyRNA *prop;
2234 
2235  prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
2237  RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
2238 
2239  if (count >= 1) {
2240  prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
2241  RNA_def_property_pointer_sdna(prop, NULL, "seq1");
2243  RNA_def_property_pointer_funcs(prop, NULL, "rna_Sequence_input_1_set", NULL, NULL);
2244  RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
2245  }
2246 
2247  if (count >= 2) {
2248  prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
2249  RNA_def_property_pointer_sdna(prop, NULL, "seq2");
2251  RNA_def_property_pointer_funcs(prop, NULL, "rna_Sequence_input_2_set", NULL, NULL);
2252  RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
2253  }
2254 
2255 # if 0
2256  if (count == 3) {
2257  /* Not used by any effects (perhaps one day plugins?). */
2258  prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
2259  RNA_def_property_pointer_sdna(prop, NULL, "seq3");
2261  RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
2262  }
2263 # endif
2264 }
2265 
2267 {
2268  PropertyRNA *prop;
2269 
2270  prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
2271  RNA_def_property_pointer_sdna(prop, NULL, "strip->colorspace_settings");
2272  RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
2273  RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
2274 }
2275 
2276 static void rna_def_movie_types(StructRNA *srna)
2277 {
2278  PropertyRNA *prop;
2279 
2280  prop = RNA_def_property(srna, "fps", PROP_FLOAT, PROP_NONE);
2281  RNA_def_property_ui_text(prop, "FPS", "Frames per second");
2283  RNA_def_property_float_funcs(prop, "rna_Sequence_fps_get", NULL, NULL);
2284 }
2285 
2286 static void rna_def_image(BlenderRNA *brna)
2287 {
2288  StructRNA *srna;
2289  PropertyRNA *prop;
2290 
2291  srna = RNA_def_struct(brna, "ImageSequence", "Sequence");
2292  RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images");
2293  RNA_def_struct_sdna(srna, "Sequence");
2294 
2295  prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
2296  RNA_def_property_string_sdna(prop, NULL, "strip->dir");
2297  RNA_def_property_ui_text(prop, "Directory", "");
2298  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2299 
2300  prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
2301  RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
2302  RNA_def_property_struct_type(prop, "SequenceElement");
2303  RNA_def_property_ui_text(prop, "Elements", "");
2305  "rna_SequenceEditor_elements_begin",
2306  "rna_iterator_array_next",
2307  "rna_iterator_array_end",
2308  "rna_iterator_array_get",
2309  "rna_SequenceEditor_elements_length",
2310  NULL,
2311  NULL,
2312  NULL);
2313  RNA_api_sequence_elements(brna, prop);
2314 
2315  /* multiview */
2316  prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
2318  RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
2319  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_views_format_update");
2320 
2321  prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
2322  RNA_def_property_enum_sdna(prop, NULL, "views_format");
2324  RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views");
2325  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update");
2326 
2327  prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
2328  RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
2330  RNA_def_property_struct_type(prop, "Stereo3dFormat");
2331  RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3D");
2332 
2333  rna_def_filter_video(srna);
2334  rna_def_proxy(srna);
2335  rna_def_input(srna);
2337 }
2338 
2339 static void rna_def_meta(BlenderRNA *brna)
2340 {
2341  StructRNA *srna;
2342  PropertyRNA *prop;
2343 
2344  srna = RNA_def_struct(brna, "MetaSequence", "Sequence");
2346  srna, "Meta Sequence", "Sequence strip to group other strips as a single sequence strip");
2347  RNA_def_struct_sdna(srna, "Sequence");
2348 
2349  prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
2350  RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
2351  RNA_def_property_struct_type(prop, "Sequence");
2352  RNA_def_property_ui_text(prop, "Sequences", "Sequences nested in meta strip");
2353  RNA_api_sequences(brna, prop, true);
2354 
2355  rna_def_filter_video(srna);
2356  rna_def_proxy(srna);
2357  rna_def_input(srna);
2358 }
2359 
2360 static void rna_def_scene(BlenderRNA *brna)
2361 {
2362  StructRNA *srna;
2363  PropertyRNA *prop;
2364 
2365  static const EnumPropertyItem scene_input_items[] = {
2366  {0, "CAMERA", ICON_VIEW3D, "Camera", "Use the Scene's 3D camera as input"},
2368  "SEQUENCER",
2369  ICON_SEQUENCE,
2370  "Sequencer",
2371  "Use the Scene's Sequencer timeline as input"},
2372  {0, NULL, 0, NULL, NULL},
2373  };
2374 
2375  srna = RNA_def_struct(brna, "SceneSequence", "Sequence");
2377  srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene");
2378  RNA_def_struct_sdna(srna, "Sequence");
2379 
2380  prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
2382  RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
2383  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_scene_switch_update");
2384 
2385  prop = RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
2387  RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
2388  RNA_def_property_ui_text(prop, "Camera Override", "Override the scenes active camera");
2389  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2390 
2391  prop = RNA_def_property(srna, "scene_input", PROP_ENUM, PROP_NONE);
2393  RNA_def_property_enum_items(prop, scene_input_items);
2394  RNA_def_property_ui_text(prop, "Input", "Input type to use for the Scene strip");
2395  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_use_sequence");
2396 
2397  prop = RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
2400  prop, "Use Grease Pencil", "Show Grease Pencil strokes in OpenGL previews");
2402 
2403  rna_def_filter_video(srna);
2404  rna_def_proxy(srna);
2405  rna_def_input(srna);
2406  rna_def_movie_types(srna);
2407 }
2408 
2409 static void rna_def_movie(BlenderRNA *brna)
2410 {
2411  StructRNA *srna;
2412  PropertyRNA *prop;
2413  FunctionRNA *func;
2414  PropertyRNA *parm;
2415 
2416  srna = RNA_def_struct(brna, "MovieSequence", "Sequence");
2417  RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video");
2418  RNA_def_struct_sdna(srna, "Sequence");
2419 
2420  prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
2421  RNA_def_property_int_sdna(prop, NULL, "streamindex");
2422  RNA_def_property_range(prop, 0, 20);
2424  prop,
2425  "Stream Index",
2426  "For files with several movie streams, use the stream with the given index");
2427  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_reopen_files_update");
2428 
2429  prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
2430  RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
2431  RNA_def_property_struct_type(prop, "SequenceElement");
2432  RNA_def_property_ui_text(prop, "Elements", "");
2434  "rna_SequenceEditor_elements_begin",
2435  "rna_iterator_array_next",
2436  "rna_iterator_array_end",
2437  "rna_iterator_array_get",
2438  "rna_SequenceEditor_elements_length",
2439  NULL,
2440  NULL,
2441  NULL);
2442 
2443  prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
2444  RNA_def_property_ui_text(prop, "File", "");
2446  "rna_Sequence_filepath_get",
2447  "rna_Sequence_filepath_length",
2448  "rna_Sequence_filepath_set");
2449  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
2450 
2451  func = RNA_def_function(srna, "reload_if_needed", "rna_MovieSequence_reload_if_needed");
2453  /* return type */
2454  parm = RNA_def_boolean(
2455  func, "can_produce_frames", 0, "True if the strip can produce frames, False otherwise", "");
2456  RNA_def_function_return(func, parm);
2457 
2458  /* metadata */
2459  func = RNA_def_function(srna, "metadata", "rna_MovieSequence_metadata_get");
2460  RNA_def_function_ui_description(func, "Retrieve metadata of the movie file");
2461  /* return type */
2462  parm = RNA_def_pointer(
2463  func, "metadata", "IDPropertyWrapPtr", "", "Dict-like object containing the metadata");
2465  RNA_def_function_return(func, parm);
2466 
2467  /* multiview */
2468  prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
2470  RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
2471  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_views_format_update");
2472 
2473  prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
2474  RNA_def_property_enum_sdna(prop, NULL, "views_format");
2476  RNA_def_property_ui_text(prop, "Views Format", "Mode to load movie views");
2477  RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update");
2478 
2479  prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
2480  RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
2482  RNA_def_property_struct_type(prop, "Stereo3dFormat");
2483  RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3D");
2484 
2485  rna_def_filter_video(srna);
2486  rna_def_proxy(srna);
2487  rna_def_input(srna);
2489  rna_def_movie_types(srna);
2490 }
2491 
2492 static void rna_def_movieclip(BlenderRNA *brna)
2493 {
2494  StructRNA *srna;
2495  PropertyRNA *prop;
2496 
2497  srna = RNA_def_struct(brna, "MovieClipSequence", "Sequence");
2499  srna, "MovieClip Sequence", "Sequence strip to load a video from the clip editor");
2500  RNA_def_struct_sdna(srna, "Sequence");
2501 
2502  /* TODO - add clip property? */
2503 
2504  prop = RNA_def_property(srna, "undistort", PROP_BOOLEAN, PROP_NONE);
2506  RNA_def_property_ui_text(prop, "Undistort Clip", "Use the undistorted version of the clip");
2507  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2508 
2509  prop = RNA_def_property(srna, "stabilize2d", PROP_BOOLEAN, PROP_NONE);
2511  RNA_def_property_ui_text(prop, "Stabilize 2D Clip", "Use the 2D stabilized version of the clip");
2512  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2513 
2514  rna_def_filter_video(srna);
2515  rna_def_input(srna);
2516  rna_def_movie_types(srna);
2517 }
2518 
2519 static void rna_def_mask(BlenderRNA *brna)
2520 {
2521  StructRNA *srna;
2522  PropertyRNA *prop;
2523 
2524  srna = RNA_def_struct(brna, "MaskSequence", "Sequence");
2525  RNA_def_struct_ui_text(srna, "Mask Sequence", "Sequence strip to load a video from a mask");
2526  RNA_def_struct_sdna(srna, "Sequence");
2527 
2528  prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
2530  RNA_def_property_ui_text(prop, "Mask", "Mask that this sequence uses");
2531  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2532 
2533  rna_def_filter_video(srna);
2534  rna_def_input(srna);
2535 }
2536 
2537 static void rna_def_sound(BlenderRNA *brna)
2538 {
2539  StructRNA *srna;
2540  PropertyRNA *prop;
2541 
2542  srna = RNA_def_struct(brna, "SoundSequence", "Sequence");
2544  "Sound Sequence",
2545  "Sequence strip defining a sound to be played over a period of time");
2546  RNA_def_struct_sdna(srna, "Sequence");
2547 
2548  prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
2550  RNA_def_property_struct_type(prop, "Sound");
2551  RNA_def_property_ui_text(prop, "Sound", "Sound data-block used by this sequence");
2552  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_sound_update");
2553 
2554  prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
2555  RNA_def_property_float_sdna(prop, NULL, "volume");
2556  RNA_def_property_range(prop, 0.0f, 100.0f);
2557  RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
2559  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_audio_update");
2560 
2561  prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
2562  RNA_def_property_float_sdna(prop, NULL, "pitch");
2563  RNA_def_property_range(prop, 0.1f, 10.0f);
2564  RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
2566  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_audio_update");
2567 
2568  prop = RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
2569  RNA_def_property_float_sdna(prop, NULL, "pan");
2570  RNA_def_property_range(prop, -2.0f, 2.0f);
2571  RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
2572  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_audio_update");
2573 
2574  prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
2577  prop, "Display Waveform", "Display the audio waveform inside the strip");
2579 
2580  rna_def_input(srna);
2581 }
2582 
2583 static void rna_def_effect(BlenderRNA *brna)
2584 {
2585  StructRNA *srna;
2586 
2587  srna = RNA_def_struct(brna, "EffectSequence", "Sequence");
2589  srna,
2590  "Effect Sequence",
2591  "Sequence strip applying an effect on the images created by other strips");
2592  RNA_def_struct_sdna(srna, "Sequence");
2593 
2594  rna_def_filter_video(srna);
2595  rna_def_proxy(srna);
2596 }
2597 
2598 static void rna_def_multicam(StructRNA *srna)
2599 {
2600  PropertyRNA *prop;
2601 
2602  prop = RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
2603  RNA_def_property_int_sdna(prop, NULL, "multicam_source");
2604  RNA_def_property_range(prop, 0, MAXSEQ - 1);
2605  RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
2606  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2607 
2608  rna_def_input(srna);
2609 }
2610 
2611 static void rna_def_wipe(StructRNA *srna)
2612 {
2613  PropertyRNA *prop;
2614 
2615  static const EnumPropertyItem wipe_type_items[] = {
2616  {DO_SINGLE_WIPE, "SINGLE", 0, "Single", ""},
2617  {DO_DOUBLE_WIPE, "DOUBLE", 0, "Double", ""},
2618  /* not used yet {DO_BOX_WIPE, "BOX", 0, "Box", ""}, */
2619  /* not used yet {DO_CROSS_WIPE, "CROSS", 0, "Cross", ""}, */
2620  {DO_IRIS_WIPE, "IRIS", 0, "Iris", ""},
2621  {DO_CLOCK_WIPE, "CLOCK", 0, "Clock", ""},
2622  {0, NULL, 0, NULL, NULL},
2623  };
2624 
2625  static const EnumPropertyItem wipe_direction_items[] = {
2626  {0, "OUT", 0, "Out", ""},
2627  {1, "IN", 0, "In", ""},
2628  {0, NULL, 0, NULL, NULL},
2629  };
2630 
2631  RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
2632 
2633  prop = RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_FACTOR);
2634  RNA_def_property_float_sdna(prop, NULL, "edgeWidth");
2635  RNA_def_property_range(prop, 0.0f, 1.0f);
2637  prop, "Blur Width", "Width of the blur edge, in percentage relative to the image size");
2638  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2639 
2640  prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
2641  RNA_def_property_range(prop, DEG2RADF(-90.0f), DEG2RADF(90.0f));
2642  RNA_def_property_ui_text(prop, "Angle", "Edge angle");
2643  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2644 
2645  prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
2646  RNA_def_property_enum_sdna(prop, NULL, "forward");
2647  RNA_def_property_enum_items(prop, wipe_direction_items);
2648  RNA_def_property_ui_text(prop, "Direction", "Wipe direction");
2649  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2650 
2651  prop = RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
2652  RNA_def_property_enum_sdna(prop, NULL, "wipetype");
2653  RNA_def_property_enum_items(prop, wipe_type_items);
2655  RNA_def_property_ui_text(prop, "Transition Type", "");
2656  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2657 }
2658 
2659 static void rna_def_glow(StructRNA *srna)
2660 {
2661  PropertyRNA *prop;
2662 
2663  RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
2664 
2665  prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_FACTOR);
2666  RNA_def_property_float_sdna(prop, NULL, "fMini");
2667  RNA_def_property_range(prop, 0.0f, 1.0f);
2668  RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
2669  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2670 
2671  prop = RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_FACTOR);
2672  RNA_def_property_float_sdna(prop, NULL, "fClamp");
2673  RNA_def_property_range(prop, 0.0f, 1.0f);
2674  RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
2675  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2676 
2677  prop = RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
2678  RNA_def_property_float_sdna(prop, NULL, "fBoost");
2679  RNA_def_property_range(prop, 0.0f, 10.0f);
2680  RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
2681  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2682 
2683  prop = RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
2684  RNA_def_property_float_sdna(prop, NULL, "dDist");
2685  RNA_def_property_range(prop, 0.5f, 20.0f);
2686  RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
2687  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2688 
2689  prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
2690  RNA_def_property_int_sdna(prop, NULL, "dQuality");
2691  RNA_def_property_range(prop, 1, 5);
2692  RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
2693  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2694 
2695  prop = RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
2696  RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
2697  RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
2698  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2699 }
2700 
2701 static void rna_def_transform(StructRNA *srna)
2702 {
2703  PropertyRNA *prop;
2704 
2705  static const EnumPropertyItem interpolation_items[] = {
2706  {0, "NONE", 0, "None", "No interpolation"},
2707  {1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation"},
2708  {2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation"},
2709  {0, NULL, 0, NULL, NULL},
2710  };
2711 
2712  static const EnumPropertyItem translation_unit_items[] = {
2713  {0, "PIXELS", 0, "Pixels", ""},
2714  {1, "PERCENT", 0, "Percent", ""},
2715  {0, NULL, 0, NULL, NULL},
2716  };
2717 
2718  RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
2719 
2720  prop = RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
2721  RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
2722  RNA_def_property_ui_text(prop, "Scale X", "Amount to scale the input in the X axis");
2723  RNA_def_property_ui_range(prop, 0, 10, 3, 6);
2724  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2725 
2726  prop = RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
2727  RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
2728  RNA_def_property_ui_text(prop, "Scale Y", "Amount to scale the input in the Y axis");
2729  RNA_def_property_ui_range(prop, 0, 10, 3, 6);
2730  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2731 
2732  prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
2733  RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
2734  RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
2735  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2736 
2737  prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
2738  RNA_def_property_float_sdna(prop, NULL, "xIni");
2739  RNA_def_property_ui_text(prop, "Translate X", "Amount to move the input on the X axis");
2740  RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
2741  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2742 
2743  prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
2744  RNA_def_property_float_sdna(prop, NULL, "yIni");
2745  RNA_def_property_ui_text(prop, "Translate Y", "Amount to move the input on the Y axis");
2746  RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
2747  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2748 
2749  prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
2750  RNA_def_property_float_sdna(prop, NULL, "rotIni");
2751  RNA_def_property_ui_text(prop, "Rotation", "Degrees to rotate the input");
2752  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2753 
2754  prop = RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
2755  RNA_def_property_enum_sdna(prop, NULL, "percent");
2756  RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
2757  RNA_def_property_enum_items(prop, translation_unit_items);
2758  RNA_def_property_ui_text(prop, "Translation Unit", "Unit of measure to translate the input");
2759  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2760 
2761  prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
2762  RNA_def_property_enum_items(prop, interpolation_items);
2763  RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
2765  prop, "Interpolation", "Method to determine how missing pixels are created");
2766  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2767 }
2768 
2769 static void rna_def_solid_color(StructRNA *srna)
2770 {
2771  PropertyRNA *prop;
2772 
2773  RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
2774 
2775  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
2776  RNA_def_property_float_sdna(prop, NULL, "col");
2777  RNA_def_property_ui_text(prop, "Color", "Effect Strip color");
2778  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2779 }
2780 
2782 {
2783  PropertyRNA *prop;
2784 
2785  RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
2786 
2787  prop = RNA_def_property(srna, "multiply_speed", PROP_FLOAT, PROP_UNSIGNED);
2788  RNA_def_property_float_sdna(prop, NULL, "globalSpeed");
2789  RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* seq->facf0 is used to animate this */
2791  prop, "Multiply Speed", "Multiply the resulting speed after the speed factor");
2792  RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, -1);
2793  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2794 
2795  prop = RNA_def_property(srna, "use_as_speed", PROP_BOOLEAN, PROP_NONE);
2798  prop, "Use as Speed", "Interpret the value as speed instead of a frame number");
2799  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2800 
2801  prop = RNA_def_property(srna, "use_scale_to_length", PROP_BOOLEAN, PROP_NONE);
2804  prop, "Scale to Length", "Scale values from 0.0 to 1.0 to target sequence length");
2805  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2806 
2807  prop = RNA_def_property(srna, "use_frame_interpolate", PROP_BOOLEAN, PROP_NONE);
2810  prop, "Frame Interpolation", "Do crossfade blending between current and next frame");
2811  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2812 }
2813 
2815 {
2816  PropertyRNA *prop;
2817 
2818  RNA_def_struct_sdna_from(srna, "GaussianBlurVars", "effectdata");
2819  prop = RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_UNSIGNED);
2820  RNA_def_property_ui_text(prop, "Size X", "Size of the blur along X axis");
2821  RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
2822  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2823 
2824  prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_UNSIGNED);
2825  RNA_def_property_ui_text(prop, "Size Y", "Size of the blur along Y axis");
2826  RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
2827  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2828 }
2829 
2830 static void rna_def_text(StructRNA *srna)
2831 {
2832  /* Avoid text icons because they imply this aligns within a frame, see: T71082 */
2833  static const EnumPropertyItem text_align_x_items[] = {
2834  {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", ICON_ANCHOR_LEFT, "Left", ""},
2835  {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
2836  {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", ICON_ANCHOR_RIGHT, "Right", ""},
2837  {0, NULL, 0, NULL, NULL},
2838  };
2839  static const EnumPropertyItem text_align_y_items[] = {
2840  {SEQ_TEXT_ALIGN_Y_TOP, "TOP", ICON_ANCHOR_TOP, "Top", ""},
2841  {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
2842  {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", ICON_ANCHOR_BOTTOM, "Bottom", ""},
2843  {0, NULL, 0, NULL, NULL},
2844  };
2845 
2846  PropertyRNA *prop;
2847 
2848  RNA_def_struct_sdna_from(srna, "TextVars", "effectdata");
2849 
2850  prop = RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
2851  RNA_def_property_pointer_sdna(prop, NULL, "text_font");
2852  RNA_def_property_ui_icon(prop, ICON_FILE_FONT, false);
2853  RNA_def_property_ui_text(prop, "Font", "Font of the text. Falls back to the UI font by default");
2855  RNA_def_property_pointer_funcs(prop, NULL, "rna_Sequence_text_font_set", NULL, NULL);
2856  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2857 
2858  prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_UNSIGNED);
2859  RNA_def_property_int_sdna(prop, NULL, "text_size");
2860  RNA_def_property_ui_text(prop, "Size", "Size of the text");
2861  RNA_def_property_range(prop, 0.0, 2000);
2862  RNA_def_property_ui_range(prop, 0.0f, 2000, 1, -1);
2863  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2864 
2865  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
2866  RNA_def_property_float_sdna(prop, NULL, "color");
2867  RNA_def_property_ui_text(prop, "Color", "Text color");
2868  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2869 
2870  prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR_GAMMA);
2871  RNA_def_property_float_sdna(prop, NULL, "shadow_color");
2872  RNA_def_property_ui_text(prop, "Shadow Color", "");
2873  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2874 
2875  prop = RNA_def_property(srna, "box_color", PROP_FLOAT, PROP_COLOR_GAMMA);
2876  RNA_def_property_float_sdna(prop, NULL, "box_color");
2877  RNA_def_property_ui_text(prop, "Box Color", "");
2878  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2879 
2880  prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
2881  RNA_def_property_float_sdna(prop, NULL, "loc");
2882  RNA_def_property_ui_text(prop, "Location", "Location of the text");
2883  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
2884  RNA_def_property_ui_range(prop, -10.0, 10.0, 1, -1);
2885  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2886 
2887  prop = RNA_def_property(srna, "wrap_width", PROP_FLOAT, PROP_NONE);
2888  RNA_def_property_float_sdna(prop, NULL, "wrap_width");
2889  RNA_def_property_ui_text(prop, "Wrap Width", "Word wrap width as factor, zero disables");
2890  RNA_def_property_range(prop, 0, FLT_MAX);
2891  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
2892  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2893 
2894  prop = RNA_def_property(srna, "box_margin", PROP_FLOAT, PROP_NONE);
2895  RNA_def_property_float_sdna(prop, NULL, "box_margin");
2896  RNA_def_property_ui_text(prop, "Box Margin", "Box margin as factor of image width");
2897  RNA_def_property_range(prop, 0, 1.0);
2898  RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
2899  RNA_def_property_float_default(prop, 0.01f);
2900  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2901 
2902  prop = RNA_def_property(srna, "align_x", PROP_ENUM, PROP_NONE);
2903  RNA_def_property_enum_sdna(prop, NULL, "align");
2904  RNA_def_property_enum_items(prop, text_align_x_items);
2906  prop, "Align X", "Align the text along the X axis, relative to the text bounds");
2907  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2908 
2909  prop = RNA_def_property(srna, "align_y", PROP_ENUM, PROP_NONE);
2910  RNA_def_property_enum_sdna(prop, NULL, "align_y");
2911  RNA_def_property_enum_items(prop, text_align_y_items);
2913  prop, "Align Y", "Align the text along the Y axis, relative to the text bounds");
2914  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2915 
2916  prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
2917  RNA_def_property_ui_text(prop, "Text", "Text that will be displayed");
2918  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2919 
2920  prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
2922  RNA_def_property_ui_text(prop, "Shadow", "Display shadow behind text");
2923  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2924 
2925  prop = RNA_def_property(srna, "use_box", PROP_BOOLEAN, PROP_NONE);
2927  RNA_def_property_ui_text(prop, "Shadow", "Display colored box behind text");
2928  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2929 
2930  prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
2932  RNA_def_property_ui_text(prop, "Bold", "Display text as bold");
2933  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2934 
2935  prop = RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE);
2937  RNA_def_property_ui_text(prop, "Italic", "Display text as italic");
2938  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2939 }
2940 
2941 static void rna_def_color_mix(StructRNA *srna)
2942 {
2943  static EnumPropertyItem blend_color_items[] = {
2944  {SEQ_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
2945  {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
2946  {SEQ_TYPE_COLOR_BURN, "BURN", 0, "Color Burn", ""},
2947  {SEQ_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
2948  {0, "", ICON_NONE, NULL, NULL},
2949  {SEQ_TYPE_LIGHTEN, "LIGHTEN", 0, "Lighten", ""},
2950  {SEQ_TYPE_SCREEN, "SCREEN", 0, "Screen", ""},
2951  {SEQ_TYPE_DODGE, "DODGE", 0, "Color Dodge", ""},
2952  {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
2953  {0, "", ICON_NONE, NULL, NULL},
2954  {SEQ_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
2955  {SEQ_TYPE_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
2956  {SEQ_TYPE_HARD_LIGHT, "HARD_LIGHT", 0, "Hard Light", ""},
2957  {SEQ_TYPE_VIVID_LIGHT, "VIVID_LIGHT", 0, "Vivid Light", ""},
2958  {SEQ_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
2959  {SEQ_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
2960  {0, "", ICON_NONE, NULL, NULL},
2961  {SEQ_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
2962  {SEQ_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
2963  {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
2964  {0, "", ICON_NONE, NULL, NULL},
2965  {SEQ_TYPE_HUE, "HUE", 0, "Hue", ""},
2966  {SEQ_TYPE_SATURATION, "SATURATION", 0, "Saturation", ""},
2967  {SEQ_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
2968  {SEQ_TYPE_VALUE, "VALUE", 0, "Value", ""},
2969  {0, NULL, 0, NULL, NULL},
2970  };
2971 
2972  PropertyRNA *prop;
2973 
2974  RNA_def_struct_sdna_from(srna, "ColorMixVars", "effectdata");
2975 
2976  prop = RNA_def_property(srna, "blend_effect", PROP_ENUM, PROP_NONE);
2977  RNA_def_property_enum_sdna(prop, NULL, "blend_effect");
2978  RNA_def_property_enum_items(prop, blend_color_items);
2980  prop, "Blending Mode", "Method for controlling how the strip combines with other strips");
2981  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2982 
2983  prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_FACTOR);
2984  RNA_def_property_range(prop, 0.0f, 1.0f);
2986  prop, "Blend Factor", "Percentage of how much the strip's colors affect other strips");
2987  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update");
2988 }
2989 
2991  {"AddSequence", "Add Sequence", "Add Sequence", NULL, 2},
2992  {"AdjustmentSequence",
2993  "Adjustment Layer Sequence",
2994  "Sequence strip to perform filter adjustments to layers below",
2995  rna_def_input,
2996  0},
2997  {"AlphaOverSequence", "Alpha Over Sequence", "Alpha Over Sequence", NULL, 2},
2998  {"AlphaUnderSequence", "Alpha Under Sequence", "Alpha Under Sequence", NULL, 2},
2999  {"ColorSequence",
3000  "Color Sequence",
3001  "Sequence strip creating an image filled with a single color",
3003  0},
3004  {"CrossSequence", "Cross Sequence", "Cross Sequence", NULL, 2},
3005  {"GammaCrossSequence", "Gamma Cross Sequence", "Gamma Cross Sequence", NULL, 2},
3006  {"GlowSequence", "Glow Sequence", "Sequence strip creating a glow effect", rna_def_glow, 1},
3007  {"MulticamSequence",
3008  "Multicam Select Sequence",
3009  "Sequence strip to perform multicam editing",
3011  0},
3012  {"MultiplySequence", "Multiply Sequence", "Multiply Sequence", NULL, 2},
3013  {"OverDropSequence", "Over Drop Sequence", "Over Drop Sequence", NULL, 2},
3014  {"SpeedControlSequence",
3015  "SpeedControl Sequence",
3016  "Sequence strip to control the speed of other strips",
3018  1},
3019  {"SubtractSequence", "Subtract Sequence", "Subtract Sequence", NULL, 2},
3020  {"TransformSequence",
3021  "Transform Sequence",
3022  "Sequence strip applying affine transformations to other strips",
3024  1},
3025  {"WipeSequence",
3026  "Wipe Sequence",
3027  "Sequence strip creating a wipe transition",
3028  rna_def_wipe,
3029  2},
3030  {"GaussianBlurSequence",
3031  "Gaussian Blur Sequence",
3032  "Sequence strip creating a gaussian blur",
3034  1},
3035  {"TextSequence", "Text Sequence", "Sequence strip creating text", rna_def_text, 0},
3036  {"ColorMixSequence", "Color Mix Sequence", "Color Mix Sequence", rna_def_color_mix, 2},
3037  {"", "", "", NULL, 0},
3038 };
3039 
3040 static void rna_def_effects(BlenderRNA *brna)
3041 {
3042  StructRNA *srna;
3043  EffectInfo *effect;
3044 
3045  for (effect = def_effects; effect->struct_name[0] != '\0'; effect++) {
3046  srna = RNA_def_struct(brna, effect->struct_name, "EffectSequence");
3047  RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
3048  RNA_def_struct_sdna(srna, "Sequence");
3049 
3050  rna_def_effect_inputs(srna, effect->inputs);
3051 
3052  if (effect->func) {
3053  effect->func(srna);
3054  }
3055  }
3056 }
3057 
3058 static void rna_def_modifier(BlenderRNA *brna)
3059 {
3060  StructRNA *srna;
3061  PropertyRNA *prop;
3062 
3063  static const EnumPropertyItem mask_input_type_items[] = {
3064  {SEQUENCE_MASK_INPUT_STRIP, "STRIP", 0, "Strip", "Use sequencer strip as mask input"},
3065  {SEQUENCE_MASK_INPUT_ID, "ID", 0, "Mask", "Use mask ID as mask input"},
3066  {0, NULL, 0, NULL, NULL},
3067  };
3068 
3069  static const EnumPropertyItem mask_time_items[] = {
3071  "RELATIVE",
3072  0,
3073  "Relative",
3074  "Mask animation is offset to start of strip"},
3076  "ABSOLUTE",
3077  0,
3078  "Absolute",
3079  "Mask animation is in sync with scene frame"},
3080  {0, NULL, 0, NULL, NULL},
3081  };
3082 
3083  srna = RNA_def_struct(brna, "SequenceModifier", NULL);
3084  RNA_def_struct_sdna(srna, "SequenceModifierData");
3085  RNA_def_struct_ui_text(srna, "SequenceModifier", "Modifier for sequence strip");
3086  RNA_def_struct_refine_func(srna, "rna_SequenceModifier_refine");
3087  RNA_def_struct_path_func(srna, "rna_SequenceModifier_path");
3088 
3089  prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
3090  RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceModifier_name_set");
3091  RNA_def_property_ui_text(prop, "Name", "");
3092  RNA_def_struct_name_property(srna, prop);
3094 
3095  prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3098  RNA_def_property_ui_text(prop, "Type", "");
3100 
3101  prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
3103  RNA_def_property_ui_text(prop, "Mute", "Mute this modifier");
3104  RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, -1);
3105  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3106 
3107  prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
3110  RNA_def_property_ui_text(prop, "Expanded", "Mute expanded settings for the modifier");
3111  RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
3113 
3114  prop = RNA_def_property(srna, "input_mask_type", PROP_ENUM, PROP_NONE);
3115  RNA_def_property_enum_sdna(prop, NULL, "mask_input_type");
3116  RNA_def_property_enum_items(prop, mask_input_type_items);
3117  RNA_def_property_ui_text(prop, "Mask Input Type", "Type of input data used for mask");
3118  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3119 
3120  prop = RNA_def_property(srna, "mask_time", PROP_ENUM, PROP_NONE);
3121  RNA_def_property_enum_sdna(prop, NULL, "mask_time");
3122  RNA_def_property_enum_items(prop, mask_time_items);
3123  RNA_def_property_ui_text(prop, "Mask Time", "Time to use for the Mask animation");
3124  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3125 
3126  prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE);
3127  RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
3129  NULL,
3130  "rna_SequenceModifier_strip_set",
3131  NULL,
3132  "rna_SequenceModifier_otherSequence_poll");
3134  RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier");
3135  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3136 
3137  prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE);
3138  RNA_def_property_pointer_sdna(prop, NULL, "mask_id");
3140  RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier");
3141  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3142 }
3143 
3145 {
3146  StructRNA *srna;
3147  PropertyRNA *prop;
3148 
3149  srna = RNA_def_struct(brna, "ColorBalanceModifier", "SequenceModifier");
3150  RNA_def_struct_sdna(srna, "ColorBalanceModifierData");
3152  srna, "ColorBalanceModifier", "Color balance modifier for sequence strip");
3153 
3154  prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
3155  RNA_def_property_struct_type(prop, "SequenceColorBalanceData");
3156 
3157  prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
3158  RNA_def_property_float_sdna(prop, NULL, "color_multiply");
3159  RNA_def_property_range(prop, 0.0f, 20.0f);
3160  RNA_def_property_float_default(prop, 1.0f);
3161  RNA_def_property_ui_text(prop, "Multiply Colors", "Multiply the intensity of each pixel");
3162  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3163 }
3164 
3166 {
3167  StructRNA *srna;
3168  PropertyRNA *prop;
3169 
3170  srna = RNA_def_struct(brna, "WhiteBalanceModifier", "SequenceModifier");
3171  RNA_def_struct_sdna(srna, "WhiteBalanceModifierData");
3173  srna, "WhiteBalanceModifier", "White balance modifier for sequence strip");
3174 
3175  prop = RNA_def_property(srna, "white_value", PROP_FLOAT, PROP_COLOR_GAMMA);
3176  RNA_def_property_range(prop, 0.0, 1.0);
3177  RNA_def_property_float_sdna(prop, NULL, "white_value");
3178  RNA_def_property_ui_text(prop, "White Value", "This color defines white in the strip");
3179  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3180 }
3181 
3183 {
3184  StructRNA *srna;
3185  PropertyRNA *prop;
3186 
3187  srna = RNA_def_struct(brna, "CurvesModifier", "SequenceModifier");
3188  RNA_def_struct_sdna(srna, "CurvesModifierData");
3189  RNA_def_struct_ui_text(srna, "CurvesModifier", "RGB curves modifier for sequence strip");
3190 
3191  prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
3192  RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
3193  RNA_def_property_struct_type(prop, "CurveMapping");
3194  RNA_def_property_ui_text(prop, "Curve Mapping", "");
3195  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3196 }
3197 
3199 {
3200  StructRNA *srna;
3201  PropertyRNA *prop;
3202 
3203  srna = RNA_def_struct(brna, "HueCorrectModifier", "SequenceModifier");
3204  RNA_def_struct_sdna(srna, "HueCorrectModifierData");
3205  RNA_def_struct_ui_text(srna, "HueCorrectModifier", "Hue correction modifier for sequence strip");
3206 
3207  prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
3208  RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
3209  RNA_def_property_struct_type(prop, "CurveMapping");
3210  RNA_def_property_ui_text(prop, "Curve Mapping", "");
3211  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3212 }
3213 
3215 {
3216  StructRNA *srna;
3217  PropertyRNA *prop;
3218 
3219  srna = RNA_def_struct(brna, "BrightContrastModifier", "SequenceModifier");
3220  RNA_def_struct_sdna(srna, "BrightContrastModifierData");
3222  srna, "BrightContrastModifier", "Bright/contrast modifier data for sequence strip");
3223 
3224  prop = RNA_def_property(srna, "bright", PROP_FLOAT, PROP_UNSIGNED);
3225  RNA_def_property_float_sdna(prop, NULL, "bright");
3226  RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
3227  RNA_def_property_ui_text(prop, "Bright", "Adjust the luminosity of the colors");
3228  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3229 
3230  prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_UNSIGNED);
3231  RNA_def_property_float_sdna(prop, NULL, "contrast");
3232  RNA_def_property_range(prop, -100.0f, 100.0f);
3233  RNA_def_property_ui_text(prop, "Contrast", "Adjust the difference in luminosity between pixels");
3234  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3235 }
3236 
3238 {
3239  StructRNA *srna;
3240  PropertyRNA *prop;
3241 
3242  static const EnumPropertyItem type_items[] = {
3243  {SEQ_TONEMAP_RD_PHOTORECEPTOR, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""},
3244  {SEQ_TONEMAP_RH_SIMPLE, "RH_SIMPLE", 0, "Rh Simple", ""},
3245  {0, NULL, 0, NULL, NULL},
3246  };
3247 
3248  srna = RNA_def_struct(brna, "SequencerTonemapModifierData", "SequenceModifier");
3249  RNA_def_struct_sdna(srna, "SequencerTonemapModifierData");
3250  RNA_def_struct_ui_text(srna, "SequencerTonemapModifierData", "Tone mapping modifier");
3251 
3252  prop = RNA_def_property(srna, "tonemap_type", PROP_ENUM, PROP_NONE);
3253  RNA_def_property_enum_sdna(prop, NULL, "type");
3254  RNA_def_property_enum_items(prop, type_items);
3255  RNA_def_property_ui_text(prop, "Tonemap Type", "Tone mapping algorithm");
3256  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3257 
3258  prop = RNA_def_property(srna, "key", PROP_FLOAT, PROP_FACTOR);
3259  RNA_def_property_range(prop, 0.0f, 1.0f);
3260  RNA_def_property_ui_text(prop, "Key", "The value the average luminance is mapped to");
3261  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3262 
3263  prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
3264  RNA_def_property_range(prop, 0.001f, 10.0f);
3266  prop,
3267  "Offset",
3268  "Normally always 1, but can be used as an extra control to alter the brightness curve");
3269  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3270 
3271  prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
3272  RNA_def_property_range(prop, 0.001f, 3.0f);
3273  RNA_def_property_ui_text(prop, "Gamma", "If not used, set to 1");
3274  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3275 
3276  prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
3277  RNA_def_property_range(prop, -8.0f, 8.0f);
3279  prop, "Intensity", "If less than zero, darkens image; otherwise, makes it brighter");
3280  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3281 
3282  prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_FACTOR);
3283  RNA_def_property_range(prop, 0.0f, 1.0f);
3284  RNA_def_property_ui_text(prop, "Contrast", "Set to 0 to use estimate from input image");
3285  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3286 
3287  prop = RNA_def_property(srna, "adaptation", PROP_FLOAT, PROP_FACTOR);
3288  RNA_def_property_range(prop, 0.0f, 1.0f);
3289  RNA_def_property_ui_text(prop, "Adaptation", "If 0, global; if 1, based on pixel intensity");
3290  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3291 
3292  prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_FACTOR);
3293  RNA_def_property_range(prop, 0.0f, 1.0f);
3295  prop, "Color Correction", "If 0, same for all channels; if 1, each independent");
3296  RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
3297 }
3298 
3299 static void rna_def_modifiers(BlenderRNA *brna)
3300 {
3301  rna_def_modifier(brna);
3302 
3305  rna_def_hue_modifier(brna);
3309 }
3310 
3312 {
3313  rna_def_color_balance(brna);
3314 
3315  rna_def_strip_element(brna);
3316  rna_def_strip_proxy(brna);
3318  rna_def_strip_crop(brna);
3320 
3321  rna_def_sequence(brna);
3322  rna_def_editor(brna);
3323 
3324  rna_def_image(brna);
3325  rna_def_meta(brna);
3326  rna_def_scene(brna);
3327  rna_def_movie(brna);
3328  rna_def_movieclip(brna);
3329  rna_def_mask(brna);
3330  rna_def_sound(brna);
3331  rna_def_effect(brna);
3332  rna_def_effects(brna);
3333  rna_def_modifiers(brna);
3334 }
3335 
3336 #endif
struct AnimData * BKE_animdata_from_id(struct ID *id)
Definition: anim_data.c:96
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
Definition: anim_data.c:1414
void BKE_animdata_fix_paths_rename(struct ID *owner_id, struct AnimData *adt, struct ID *ref_id, const char *prefix, const char *oldName, const char *newName, int oldSubscript, int newSubscript, bool verify_paths)
Definition: anim_data.c:1079
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
struct IDProperty * IDP_New(const char type, const IDPropertyTemplate *val, const char *name) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: idprop.c:907
void id_us_plus(struct ID *id)
Definition: lib_id.c:288
void BKE_report(ReportList *reports, ReportType type, const char *message)
Definition: report.c:104
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define DEG2RADF(_deg)
#define FILE_MAX
void BLI_join_dirfile(char *__restrict dst, const size_t maxlen, const char *__restrict dir, const char *__restrict file) ATTR_NONNULL()
Definition: path_util.c:1737
void BLI_split_dirfile(const char *string, char *dir, char *file, const size_t dirlen, const size_t filelen)
Definition: path_util.c:1654
void BLI_split_file_part(const char *string, char *file, const size_t filelen)
Definition: path_util.c:1690
size_t size_t char * BLI_sprintfN(const char *__restrict format,...) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1) ATTR_MALLOC ATTR_PRINTF_FORMAT(1
size_t size_t char size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, const size_t dst_maxncpy) ATTR_NONNULL()
Definition: string.c:333
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
Definition: string.c:70
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Definition: string.c:108
char * BLI_strncpy_utf8(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
Definition: string_utf8.c:258
#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:654
@ ID_RECALC_AUDIO
Definition: DNA_ID.h:666
@ ID_RECALC_SEQUENCER_STRIPS
Definition: DNA_ID.h:658
@ IDP_GROUP
Definition: DNA_ID.h:101
Object is a sort of wrapper for general info.
#define MAXFRAME
#define SEQ_SPEED_INTEGRATE
#define SEQ_BLEND_REPLACE
#define SEQ_PROXY_IMAGE_SIZE_75
@ SEQ_MUTE
@ SEQ_FILTERY
@ SEQ_REVERSE_FRAMES
@ SEQ_FLIPX
@ SEQ_RIGHTSEL
@ SEQ_MAKE_FLOAT
@ SEQ_SCENE_NO_GPENCIL
@ SEQ_SCENE_STRIPS
@ SEQ_USE_PROXY
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_FLIPY
@ SEQ_LOCK
@ SEQ_USE_VIEWS
@ SEQ_USE_LINEAR_MODIFIERS
@ SEQ_AUDIO_DRAW_WAVEFORM
@ SEQ_LEFTSEL
#define SEQ_EDIT_OVERLAY_ABS
#define SEQ_COLOR_BALANCE_INVERSE_GAMMA
#define SEQ_PROXY_TC_RECORD_RUN_NO_GAPS
#define SEQ_PROXY_IMAGE_SIZE_100
#define SEQ_MOVIECLIP_RENDER_STABILIZED
@ SEQUENCE_MASK_INPUT_STRIP
@ SEQUENCE_MASK_INPUT_ID
#define SEQ_PROXY_TC_FREE_RUN
#define SEQ_FONT_NOT_LOADED
@ SEQUENCE_MODIFIER_MUTE
@ SEQUENCE_MODIFIER_EXPANDED
#define SEQ_MOVIECLIP_RENDER_UNDISTORTED
@ 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
#define SEQ_SPEED_COMPRESS_IPO_Y
@ SEQ_PROXY_SKIP_EXISTING
@ SEQUENCE_MASK_TIME_RELATIVE
@ SEQUENCE_MASK_TIME_ABSOLUTE
@ seqModifierType_Curves
@ seqModifierType_Mask
@ seqModifierType_WhiteBalance
@ seqModifierType_BrightContrast
@ seqModifierType_ColorBalance
@ seqModifierType_HueCorrect
@ seqModifierType_Tonemap
@ SEQ_TEXT_ITALIC
@ SEQ_TEXT_SHADOW
@ SEQ_TEXT_BOLD
@ SEQ_TEXT_BOX
#define SEQ_SPEED_USE_INTERPOLATION
#define SEQ_COLOR_BALANCE_INVERSE_GAIN
@ SEQ_ALPHA_PREMUL
@ SEQ_ALPHA_STRAIGHT
#define SEQ_EDIT_OVERLAY_SHOW
@ SEQ_TEXT_ALIGN_X_RIGHT
@ SEQ_TEXT_ALIGN_X_CENTER
@ SEQ_TEXT_ALIGN_X_LEFT
#define SEQ_PROXY_TC_NONE
#define SEQ_PROXY_IMAGE_SIZE_50
@ SEQ_TONEMAP_RD_PHOTORECEPTOR
@ SEQ_TONEMAP_RH_SIMPLE
#define SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN
#define SEQ_COLOR_BALANCE_INVERSE_LIFT
#define MAXSEQ
#define SEQ_PROXY_TC_RECORD_RUN
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
struct StripElem StripElem
#define SEQ_EDIT_PROXY_DIR_STORAGE
@ 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
@ SEQ_TEXT_ALIGN_Y_BOTTOM
@ SEQ_TEXT_ALIGN_Y_TOP
@ SEQ_TEXT_ALIGN_Y_CENTER
#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:207
struct IDProperty * IMB_anim_load_metadata(struct anim *anim)
Definition: anim_movie.c:247
Read Guarded memory(de)allocation.
Group RGB to Bright Vector Camera CLAMP
StructRNA RNA_SequenceModifier
StructRNA RNA_GlowSequence
StructRNA RNA_MovieSequence
StructRNA RNA_TransformSequence
StructRNA RNA_MovieClipSequence
StructRNA RNA_SpeedControlSequence
StructRNA RNA_MulticamSequence
StructRNA RNA_TextSequence
#define RNA_POINTER_INVALIDATE(ptr)
Definition: RNA_access.h:1425
StructRNA RNA_MetaSequence
StructRNA RNA_GaussianBlurSequence
StructRNA RNA_ImageSequence
StructRNA RNA_SceneSequence
StructRNA RNA_SoundSequence
StructRNA RNA_MaskSequence
StructRNA RNA_WipeSequence
StructRNA RNA_ColorMixSequence
StructRNA RNA_Sequence
StructRNA RNA_ColorSequence
StructRNA RNA_AdjustmentSequence
@ PARM_RNAPTR
Definition: RNA_types.h:339
@ PARM_REQUIRED
Definition: RNA_types.h:337
@ FUNC_USE_REPORTS
Definition: RNA_types.h:578
@ FUNC_USE_MAIN
Definition: RNA_types.h:576
@ FUNC_USE_CONTEXT
Definition: RNA_types.h:577
@ FUNC_USE_SELF_ID
Definition: RNA_types.h:565
@ PROP_FLOAT
Definition: RNA_types.h:75
@ PROP_BOOLEAN
Definition: RNA_types.h:73
@ PROP_ENUM
Definition: RNA_types.h:77
@ PROP_INT
Definition: RNA_types.h:74
@ PROP_STRING
Definition: RNA_types.h:76
@ PROP_POINTER
Definition: RNA_types.h:78
@ PROP_COLLECTION
Definition: RNA_types.h:79
@ PROP_THICK_WRAP
Definition: RNA_types.h:270
@ PROP_ANIMATABLE
Definition: RNA_types.h:188
@ PROP_EDITABLE
Definition: RNA_types.h:175
@ PROP_NEVER_NULL
Definition: RNA_types.h:225
@ PROP_NO_DEG_UPDATE
Definition: RNA_types.h:286
@ PROP_ID_SELF_CHECK
Definition: RNA_types.h:218
@ PROP_TIME
Definition: RNA_types.h:133
@ PROP_XYZ
Definition: RNA_types.h:148
@ PROP_FILENAME
Definition: RNA_types.h:118
@ PROP_PIXEL
Definition: RNA_types.h:128
@ PROP_ANGLE
Definition: RNA_types.h:132
@ PROP_NONE
Definition: RNA_types.h:113
@ PROP_DIRPATH
Definition: RNA_types.h:117
@ PROP_FACTOR
Definition: RNA_types.h:131
@ PROP_COLOR_GAMMA
Definition: RNA_types.h:151
@ PROP_UNSIGNED
Definition: RNA_types.h:129
@ PROP_FILEPATH
Definition: RNA_types.h:116
#define C
Definition: RandGen.cpp:39
@ DO_IRIS_WIPE
Definition: SEQ_effects.h:41
@ DO_CLOCK_WIPE
Definition: SEQ_effects.h:42
@ DO_DOUBLE_WIPE
Definition: SEQ_effects.h:38
@ DO_SINGLE_WIPE
Definition: SEQ_effects.h:37
#define ND_SEQUENCER
Definition: WM_types.h:337
#define ND_SPACE_SEQUENCER
Definition: WM_types.h:430
#define ND_DISPLAY
Definition: WM_types.h:391
#define NC_SCENE
Definition: WM_types.h:279
#define NC_IMAGE
Definition: WM_types.h:285
#define NC_SPACE
Definition: WM_types.h:293
#define NA_SELECTED
Definition: WM_types.h:467
return(oflags[bm->toolflag_index].f &oflag) !=0
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
#define SELECT
Scene scene
void SEQ_effect_text_font_unload(TextVars *data, const bool do_id_user)
Definition: effects.c:3833
int SEQ_effect_get_num_inputs(int seq_type)
Definition: effects.c:4328
void SEQ_cache_cleanup(Scene *scene)
Definition: image_cache.c:1251
int count
int SEQ_iterator_seqbase_recursive_apply(ListBase *seqbase, int(*apply_fn)(Sequence *seq, void *), void *arg)
Definition: iterator.c:142
size_t(* MEM_allocN_len)(const void *vmemh)
Definition: mallocn.c:40
void SEQ_prefetch_stop(Scene *scene)
Definition: prefetch.c:272
void SEQ_proxy_set(struct Sequence *seq, bool value)
Definition: proxy.c:584
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
Definition: rna_access.c:844
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:146
const PointerRNA PointerRNA_NULL
Definition: rna_access.c:71
void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb, IteratorSkipFunc skip)
Definition: rna_access.c:4823
void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
Definition: rna_access.c:4875
PointerRNA rna_pointer_inherit_refine(PointerRNA *ptr, StructRNA *type, void *data)
Definition: rna_access.c:196
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
Definition: rna_define.c:1167
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2762
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
Definition: rna_define.c:1212
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
Definition: rna_define.c:3481
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
Definition: rna_define.c:4159
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t bit)
Definition: rna_define.c:2257
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1555
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
Definition: rna_define.c:3312
void RNA_def_property_float_default(PropertyRNA *prop, float value)
Definition: rna_define.c:2042
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
Definition: rna_define.c:4302
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3153
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
Definition: rna_define.c:1676
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2717
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
Definition: rna_define.c:1684
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
Definition: rna_define.c:4262
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
Definition: rna_define.c:3462
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:3408
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
Definition: rna_define.c:1259
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
Definition: rna_define.c:2971
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
Definition: rna_define.c:1892
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
Definition: rna_define.c:1067
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
Definition: rna_define.c:1757
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
Definition: rna_define.c:1940
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname)
Definition: rna_define.c:1094
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
Definition: rna_define.c:1792
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
Definition: rna_define.c:2791
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
Definition: rna_define.c:4337
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
Definition: rna_define.c:2927
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
Definition: rna_define.c:2877
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
Definition: rna_define.c:1279
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2691
void RNA_def_struct_name_property(struct StructRNA *srna, struct PropertyRNA *prop)
Definition: rna_define.c:1122
void RNA_def_function_flag(FunctionRNA *func, int flag)
Definition: rna_define.c:4332
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1517
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:3373
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
Definition: rna_define.c:1047
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2623
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
Definition: rna_define.c:3055
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
Definition: rna_define.c:1267
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:3675
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
Definition: rna_define.c:1179
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
Definition: rna_define.c:2870
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
Definition: rna_define.c:1512
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2515
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
Definition: rna_define.c:1706
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:3771
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
Definition: rna_define.c:2364
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
Definition: rna_define.c:2348
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
Definition: rna_define.c:1547
void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop, const 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:471
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_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:72
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_wipe(StructRNA *srna)
static void rna_def_multicam(StructRNA *srna)
static void rna_def_scene(BlenderRNA *brna)
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 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)
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)
Editing * SEQ_editing_get(Scene *scene, bool alloc)
Definition: sequencer.c:232
#define min(a, b)
Definition: sort.c:51
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:795
void SEQ_add_reload_new_file(Main *bmain, Scene *scene, Sequence *seq, const bool lock_range)
Definition: strip_add.c:623
bool SEQ_relations_render_loop_check(Sequence *seq_main, Sequence *seq)
void SEQ_relations_invalidate_cache_raw(Scene *scene, Sequence *seq)
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)
float SEQ_time_sequence_get_fps(Scene *scene, Sequence *seq)
Definition: strip_time.c:345
void SEQ_time_update_sequence_bounds(Scene *scene, Sequence *seq)
Definition: strip_time.c:150
void SEQ_time_update_sequence(Scene *scene, Sequence *seq)
Definition: strip_time.c:197
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(ListBase *seqbasep, Sequence *test)
void SEQ_transform_fix_single_image_seq_offsets(Sequence *seq)
void SEQ_transform_set_right_handle_frame(Sequence *seq, int val)
void SEQ_transform_translate_sequence(Scene *evil_scene, Sequence *seq, int delta)
int SEQ_transform_get_right_handle_frame(Sequence *seq, bool metaclip)
void SEQ_transform_set_left_handle_frame(Sequence *seq, int val)
int SEQ_transform_get_left_handle_frame(Sequence *seq, bool metaclip)
union CollectionPropertyIterator::@1099 internal
ListBaseIterator listbase
Definition: RNA_types.h:394
StripColorBalance color_balance
ListBase seqbase
const char * ui_name
Definition: rna_sequencer.c:66
const char * struct_name
Definition: rna_sequencer.c:65
const char * ui_desc
Definition: rna_sequencer.c:67
void(* func)(StructRNA *)
Definition: rna_sequencer.c:68
Definition: DNA_ID.h:273
void * first
Definition: DNA_listBase.h:47
Definition: BKE_main.h:116
Sequence * parseq
struct StructRNA * type
Definition: RNA_types.h:51
void * data
Definition: RNA_types.h:52
struct ID * owner_id
Definition: RNA_types.h:50
struct Editing * ed
struct RenderData r
struct SequenceModifierData * next
struct Sequence * mask_sequence
struct Scene * scene
ListBase anims
struct Sequence * seq3
ListBase modifiers
ListBase seqbase
struct Sequence * seq1
struct Sequence * seq2
struct Sequence * next
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
#define G(x, y, z)
void SEQ_sequence_base_unique_name_recursive(ListBase *seqbasep, Sequence *seq)
Definition: utils.c:139
void SEQ_sort(Scene *scene)
Definition: utils.c:58
ListBase * SEQ_get_seqbase_by_seq(ListBase *seqbase, Sequence *seq)
Definition: utils.c:428
Sequence * SEQ_sequence_from_strip_elem(ListBase *seqbase, StripElem *se)
Definition: utils.c:468
void WM_main_add_notifier(unsigned int type, void *reference)
PointerRNA * ptr
Definition: wm_files.c:3157