Blender V4.5
rna_sequencer.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#include <cstdlib>
10
11#include "DNA_scene_types.h"
12#include "DNA_sequence_types.h"
13
14#include "BLI_math_rotation.h"
16
17#include "BLT_translation.hh"
18
19#include "BKE_animsys.h"
20
21#include "RNA_define.hh"
22#include "RNA_enum_types.hh"
23
24#include "RNA_types.hh"
25#include "UI_resources.hh"
26#include "rna_internal.hh"
27
28#include "SEQ_effects.hh"
29#include "SEQ_sequencer.hh"
30#include "SEQ_sound.hh"
31
32#include "WM_types.hh"
33
34struct EffectInfo {
35 const char *struct_name;
36 const char *ui_name;
37 const char *ui_desc;
38 void (*func)(StructRNA *);
39 int inputs;
40};
41
42/* These wrap strangely, disable formatting for fixed indentation and wrapping. */
43/* clang-format off */
44#define RNA_ENUM_SEQUENCER_VIDEO_MODIFIER_TYPE_ITEMS \
45 {seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Brightness/Contrast", ""}, \
46 {seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""}, \
47 {seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""}, \
48 {seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""}, \
49 {seqModifierType_Mask, "MASK", ICON_NONE, "Mask", ""}, \
50 {seqModifierType_Tonemap, "TONEMAP", ICON_NONE, "Tone Map", ""}, \
51 {seqModifierType_WhiteBalance, "WHITE_BALANCE", ICON_NONE, "White Balance", ""}
52
53#define RNA_ENUM_SEQUENCER_AUDIO_MODIFIER_TYPE_ITEMS \
54 {seqModifierType_SoundEqualizer, "SOUND_EQUALIZER", ICON_NONE, "Sound Equalizer", ""}
55/* clang-format on */
56
62
67
72
74 {STRIP_COLOR_NONE, "NONE", ICON_X, "None", "Assign no color tag to the collection"},
75 {STRIP_COLOR_01, "COLOR_01", ICON_STRIP_COLOR_01, "Color 01", ""},
76 {STRIP_COLOR_02, "COLOR_02", ICON_STRIP_COLOR_02, "Color 02", ""},
77 {STRIP_COLOR_03, "COLOR_03", ICON_STRIP_COLOR_03, "Color 03", ""},
78 {STRIP_COLOR_04, "COLOR_04", ICON_STRIP_COLOR_04, "Color 04", ""},
79 {STRIP_COLOR_05, "COLOR_05", ICON_STRIP_COLOR_05, "Color 05", ""},
80 {STRIP_COLOR_06, "COLOR_06", ICON_STRIP_COLOR_06, "Color 06", ""},
81 {STRIP_COLOR_07, "COLOR_07", ICON_STRIP_COLOR_07, "Color 07", ""},
82 {STRIP_COLOR_08, "COLOR_08", ICON_STRIP_COLOR_08, "Color 08", ""},
83 {STRIP_COLOR_09, "COLOR_09", ICON_STRIP_COLOR_09, "Color 09", ""},
84 {0, nullptr, 0, nullptr, nullptr},
85};
86
87#ifdef RNA_RUNTIME
88
89# include <algorithm>
90
91# include <fmt/format.h>
92
93# include "DNA_vfont_types.h"
94
95# include "BLI_iterator.h"
96# include "BLI_string_utils.hh"
97
98# include "BKE_anim_data.hh"
99# include "BKE_global.hh"
100# include "BKE_idprop.hh"
101# include "BKE_lib_id.hh"
102# include "BKE_movieclip.h"
103# include "BKE_report.hh"
104
105# include "WM_api.hh"
106
107# include "DEG_depsgraph.hh"
108# include "DEG_depsgraph_build.hh"
109
110# include "IMB_imbuf.hh"
111
112# include "MOV_read.hh"
113
114# include "SEQ_add.hh"
115# include "SEQ_channels.hh"
116# include "SEQ_edit.hh"
117# include "SEQ_effects.hh"
118# include "SEQ_iterator.hh"
119# include "SEQ_modifier.hh"
120# include "SEQ_prefetch.hh"
121# include "SEQ_proxy.hh"
122# include "SEQ_relations.hh"
123# include "SEQ_retiming.hh"
124# include "SEQ_select.hh"
125# include "SEQ_sequencer.hh"
126# include "SEQ_sound.hh"
127# include "SEQ_thumbnail_cache.hh"
128# include "SEQ_time.hh"
129# include "SEQ_transform.hh"
130# include "SEQ_utils.hh"
131
132struct StripSearchData {
133 Strip *strip;
134 void *data;
136};
137
138static void rna_StripElement_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
139{
140 Scene *scene = (Scene *)ptr->owner_id;
142
143 if (ed) {
144 StripElem *se = (StripElem *)ptr->data;
145 Strip *strip;
146
147 /* slow but we can't avoid! */
149 if (strip) {
151 }
152 }
153}
154
155static void rna_Strip_invalidate_raw_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
156{
157 Scene *scene = (Scene *)ptr->owner_id;
159
160 if (ed) {
161 Strip *strip = (Strip *)ptr->data;
162
164 }
165}
166
167static void rna_Strip_invalidate_preprocessed_update(Main * /*bmain*/,
168 Scene * /*scene*/,
170{
171 Scene *scene = (Scene *)ptr->owner_id;
173
174 if (ed) {
175 Strip *strip = (Strip *)ptr->data;
176
178 }
179}
180
181static void UNUSED_FUNCTION(rna_Strip_invalidate_composite_update)(Main * /*bmain*/,
182 Scene * /*scene*/,
184{
185 Scene *scene = (Scene *)ptr->owner_id;
187
188 if (ed) {
189 Strip *strip = (Strip *)ptr->data;
190
192 }
193}
194
195static void rna_Strip_scene_switch_update(Main *bmain, Scene *scene, PointerRNA *ptr)
196{
197 rna_Strip_invalidate_raw_update(bmain, scene, ptr);
200}
201
202static void rna_Strip_use_strip(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
203{
204 Scene *scene = reinterpret_cast<Scene *>(ptr->owner_id);
205
206 /* General update callback. */
207 rna_Strip_invalidate_raw_update(bmain, scene, ptr);
208 /* Changing recursion changes set of IDs which needs to be remapped by the copy-on-evaluation.
209 * the only way for this currently is to tag the ID for ID_RECALC_SYNC_TO_EVAL. */
211 if (ed) {
212 Strip *strip = (Strip *)ptr->data;
213 if (strip->scene != nullptr) {
214 DEG_id_tag_update(&strip->scene->id, ID_RECALC_SYNC_TO_EVAL);
215 }
216 }
217 /* The sequencer scene is to be updated as well, including new relations from the nested
218 * sequencer. */
221}
222
223static void add_strips_from_seqbase(const ListBase *seqbase, blender::Vector<Strip *> &strips)
224{
225 LISTBASE_FOREACH (Strip *, strip, seqbase) {
226 strips.append(strip);
227
228 if (strip->type == STRIP_TYPE_META) {
229 add_strips_from_seqbase(&strip->seqbase, strips);
230 }
231 }
232}
233
234struct StripsAllIterator {
235 blender::Vector<Strip *> strips;
236 int index;
237};
238
239static std::optional<std::string> rna_SequenceEditor_path(const PointerRNA * /*ptr*/)
240{
241 return "sequence_editor";
242}
243
244static void rna_SequenceEditor_strips_all_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
245{
246 Scene *scene = (Scene *)ptr->owner_id;
248
249 StripsAllIterator *strip_iter = MEM_new<StripsAllIterator>(__func__);
250 strip_iter->index = 0;
251 add_strips_from_seqbase(&ed->seqbase, strip_iter->strips);
252
253 BLI_Iterator *bli_iter = MEM_callocN<BLI_Iterator>(__func__);
254 iter->internal.custom = bli_iter;
255 bli_iter->data = strip_iter;
256
257 Strip **strip_arr = strip_iter->strips.begin();
258 bli_iter->current = *strip_arr;
259 iter->valid = bli_iter->current != nullptr;
260}
261
262static void rna_SequenceEditor_strips_all_next(CollectionPropertyIterator *iter)
263{
264 BLI_Iterator *bli_iter = static_cast<BLI_Iterator *>(iter->internal.custom);
265 StripsAllIterator *strip_iter = static_cast<StripsAllIterator *>(bli_iter->data);
266
267 strip_iter->index++;
268 Strip **strip_arr = strip_iter->strips.begin();
269 bli_iter->current = *(strip_arr + strip_iter->index);
270
271 iter->valid = bli_iter->current != nullptr && strip_iter->index < strip_iter->strips.size();
272}
273
274static PointerRNA rna_SequenceEditor_strips_all_get(CollectionPropertyIterator *iter)
275{
276 Strip *strip = static_cast<Strip *>(((BLI_Iterator *)iter->internal.custom)->current);
277 return RNA_pointer_create_with_parent(iter->parent, &RNA_Strip, strip);
278}
279
280static void rna_SequenceEditor_strips_all_end(CollectionPropertyIterator *iter)
281{
282 BLI_Iterator *bli_iter = static_cast<BLI_Iterator *>(iter->internal.custom);
283 StripsAllIterator *strip_iter = static_cast<StripsAllIterator *>(bli_iter->data);
284
285 MEM_delete(strip_iter);
286 MEM_freeN(bli_iter);
287}
288
289static bool rna_SequenceEditor_strips_all_lookup_string(PointerRNA *ptr,
290 const char *key,
291 PointerRNA *r_ptr)
292{
293 ID *id = ptr->owner_id;
294 Scene *scene = (Scene *)id;
295
296 Strip *strip = blender::seq::lookup_strip_by_name(scene->ed, key);
297 if (strip) {
298 rna_pointer_create_with_ancestors(*ptr, &RNA_Strip, strip, *r_ptr);
299 return true;
300 }
301 return false;
302}
303
304static void rna_SequenceEditor_update_cache(Main * /*bmain*/, Scene *scene, PointerRNA * /*ptr*/)
305{
306 Editing *ed = scene->ed;
307
310}
311
312/* internal use */
313static int rna_Strip_elements_length(PointerRNA *ptr)
314{
315 Strip *strip = (Strip *)ptr->data;
316
317 /* Hack? copied from `sequencer.cc`, #reload_sequence_new_file(). */
318 size_t olen = MEM_allocN_len(strip->data->stripdata) / sizeof(StripElem);
319
320 /* The problem with `strip->data->len` and `strip->len` is that it's discounted from the offset
321 * (hard cut trim). */
322 return int(olen);
323}
324
325static void rna_Strip_elements_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
326{
327 Strip *strip = (Strip *)ptr->data;
329 ptr,
330 (void *)strip->data->stripdata,
331 sizeof(StripElem),
332 rna_Strip_elements_length(ptr),
333 0,
334 nullptr);
335}
336
337static int rna_Strip_retiming_keys_length(PointerRNA *ptr)
338{
340}
341
342static void rna_Strip_retiming_keys_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
343{
344 Strip *strip = (Strip *)ptr->data;
346 ptr,
347 (void *)strip->retiming_keys,
348 sizeof(SeqRetimingKey),
350 0,
351 nullptr);
352}
353
354static Strip *strip_by_key_find(Scene *scene, SeqRetimingKey *key)
355{
358
359 for (Strip *strip : strips) {
361 SeqRetimingKey *first = strip->retiming_keys;
362 SeqRetimingKey *last = strip->retiming_keys + retiming_keys_count - 1;
363
364 if (key >= first && key <= last) {
365 return strip;
366 }
367 }
368
369 return nullptr;
370}
371
372static void rna_Strip_retiming_key_remove(ID *id, SeqRetimingKey *key)
373{
374 Scene *scene = (Scene *)id;
375 Strip *strip = strip_by_key_find(scene, key);
376
377 if (strip == nullptr) {
378 return;
379 }
380
382
385}
386
387static int rna_Strip_retiming_key_frame_get(PointerRNA *ptr)
388{
389 SeqRetimingKey *key = (SeqRetimingKey *)ptr->data;
390 Scene *scene = (Scene *)ptr->owner_id;
391 Strip *strip = strip_by_key_find(scene, key);
392
393 if (strip == nullptr) {
394 return 0;
395 }
396
398}
399
400static void rna_Strip_retiming_key_frame_set(PointerRNA *ptr, int value)
401{
402 SeqRetimingKey *key = (SeqRetimingKey *)ptr->data;
403 Scene *scene = (Scene *)ptr->owner_id;
404 Strip *strip = strip_by_key_find(scene, key);
405
406 if (strip == nullptr) {
407 return;
408 }
409
410 blender::seq::retiming_key_timeline_frame_set(scene, strip, key, value);
412}
413
414static bool rna_SequenceEditor_selected_retiming_key_get(PointerRNA *ptr)
415{
416 Scene *scene = (Scene *)ptr->owner_id;
418}
419
420static void rna_Strip_views_format_update(Main *bmain, Scene *scene, PointerRNA *ptr)
421{
422 rna_Strip_invalidate_raw_update(bmain, scene, ptr);
423}
424
425static void do_strip_frame_change_update(Scene *scene, Strip *strip)
426{
427 ListBase *seqbase = blender::seq::get_seqbase_by_strip(scene, strip);
428
429 if (blender::seq::transform_test_overlap(scene, seqbase, strip)) {
430 blender::seq::transform_seqbase_shuffle(seqbase, strip, scene);
431 }
432
433 if (strip->type == STRIP_TYPE_SOUND_RAM) {
435 }
436}
437
438/* A simple wrapper around above func, directly usable as prop update func.
439 * Also invalidate cache if needed.
440 */
441static void rna_Strip_frame_change_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
442{
443 Scene *scene = (Scene *)ptr->owner_id;
444 do_strip_frame_change_update(scene, (Strip *)ptr->data);
445}
446
447static int rna_Strip_frame_final_start_get(PointerRNA *ptr)
448{
449 Scene *scene = (Scene *)ptr->owner_id;
450 return blender::seq::time_left_handle_frame_get(scene, (Strip *)ptr->data);
451}
452
453static int rna_Strip_frame_final_end_get(PointerRNA *ptr)
454{
455 Scene *scene = (Scene *)ptr->owner_id;
457}
458
459static void rna_Strip_start_frame_final_set(PointerRNA *ptr, int value)
460{
461 Strip *strip = (Strip *)ptr->data;
462 Scene *scene = (Scene *)ptr->owner_id;
463
464 blender::seq::time_left_handle_frame_set(scene, strip, value);
465 do_strip_frame_change_update(scene, strip);
467}
468
469static void rna_Strip_end_frame_final_set(PointerRNA *ptr, int value)
470{
471 Strip *strip = (Strip *)ptr->data;
472 Scene *scene = (Scene *)ptr->owner_id;
473
475 do_strip_frame_change_update(scene, strip);
477}
478
479static void rna_Strip_start_frame_set(PointerRNA *ptr, float value)
480{
481 Strip *strip = (Strip *)ptr->data;
482 Scene *scene = (Scene *)ptr->owner_id;
483
484 blender::seq::transform_translate_strip(scene, strip, value - strip->start);
485 do_strip_frame_change_update(scene, strip);
487}
488
489static void rna_Strip_frame_offset_start_set(PointerRNA *ptr, float value)
490{
491 Strip *strip = (Strip *)ptr->data;
492 Scene *scene = (Scene *)ptr->owner_id;
493
495 strip->startofs = value;
496}
497
498static void rna_Strip_frame_offset_end_set(PointerRNA *ptr, float value)
499{
500 Strip *strip = (Strip *)ptr->data;
501 Scene *scene = (Scene *)ptr->owner_id;
502
504 strip->endofs = value;
505}
506
507static void rna_Strip_anim_startofs_final_set(PointerRNA *ptr, int value)
508{
509 Strip *strip = (Strip *)ptr->data;
510 Scene *scene = (Scene *)ptr->owner_id;
511
512 strip->anim_startofs = std::min(value, strip->len + strip->anim_startofs);
513
514 blender::seq::add_reload_new_file(G.main, scene, strip, false);
515 do_strip_frame_change_update(scene, strip);
516}
517
518static void rna_Strip_anim_endofs_final_set(PointerRNA *ptr, int value)
519{
520 Strip *strip = (Strip *)ptr->data;
521 Scene *scene = (Scene *)ptr->owner_id;
522
523 strip->anim_endofs = std::min(value, strip->len + strip->anim_endofs);
524
525 blender::seq::add_reload_new_file(G.main, scene, strip, false);
526 do_strip_frame_change_update(scene, strip);
527}
528
529static void rna_Strip_anim_endofs_final_range(
530 PointerRNA *ptr, int *min, int *max, int * /*softmin*/, int * /*softmax*/)
531{
532 Strip *strip = (Strip *)ptr->data;
533
534 *min = 0;
535 *max = strip->len + strip->anim_endofs - strip->startofs - strip->endofs - 1;
536}
537
538static void rna_Strip_anim_startofs_final_range(
539 PointerRNA *ptr, int *min, int *max, int * /*softmin*/, int * /*softmax*/)
540{
541 Strip *strip = (Strip *)ptr->data;
542
543 *min = 0;
544 *max = strip->len + strip->anim_startofs - strip->startofs - strip->endofs - 1;
545}
546
547static void rna_Strip_frame_offset_start_range(
548 PointerRNA *ptr, float *min, float *max, float * /*softmin*/, float * /*softmax*/)
549{
550 Strip *strip = (Strip *)ptr->data;
551 *min = INT_MIN;
552 *max = strip->len - strip->endofs - 1;
553}
554
555static void rna_Strip_frame_offset_end_range(
556 PointerRNA *ptr, float *min, float *max, float * /*softmin*/, float * /*softmax*/)
557{
558 Strip *strip = (Strip *)ptr->data;
559 *min = INT_MIN;
560 *max = strip->len - strip->startofs - 1;
561}
562
563static void rna_Strip_frame_length_set(PointerRNA *ptr, int value)
564{
565 Strip *strip = (Strip *)ptr->data;
566 Scene *scene = (Scene *)ptr->owner_id;
567
569 scene, strip, blender::seq::time_left_handle_frame_get(scene, strip) + value);
570 do_strip_frame_change_update(scene, strip);
572}
573
574static int rna_Strip_frame_length_get(PointerRNA *ptr)
575{
576 Strip *strip = (Strip *)ptr->data;
577 Scene *scene = (Scene *)ptr->owner_id;
578 return blender::seq::time_right_handle_frame_get(scene, strip) -
580}
581
582static int rna_Strip_frame_duration_get(PointerRNA *ptr)
583{
584 Strip *strip = static_cast<Strip *>(ptr->data);
585 Scene *scene = reinterpret_cast<Scene *>(ptr->owner_id);
586 return blender::seq::time_strip_length_get(scene, strip);
587}
588
589static int rna_Strip_frame_editable(const PointerRNA *ptr, const char ** /*r_info*/)
590{
591 Strip *strip = (Strip *)ptr->data;
592 /* Effect strips' start frame and length must be readonly! */
594}
595
596static void rna_Strip_channel_set(PointerRNA *ptr, int value)
597{
598 Strip *strip = (Strip *)ptr->data;
599 Scene *scene = (Scene *)ptr->owner_id;
600 ListBase *seqbase = blender::seq::get_seqbase_by_strip(scene, strip);
601
602 /* check channel increment or decrement */
603 const int channel_delta = (value >= strip->channel) ? 1 : -1;
605
606 if (blender::seq::transform_test_overlap(scene, seqbase, strip)) {
607 blender::seq::transform_seqbase_shuffle_ex(seqbase, strip, scene, channel_delta);
608 }
610}
611
612static bool rna_Strip_lock_get(PointerRNA *ptr)
613{
614 Scene *scene = reinterpret_cast<Scene *>(ptr->owner_id);
615 Strip *strip = static_cast<Strip *>(ptr->data);
617 ListBase *channels = blender::seq::get_channels_by_strip(ed, strip);
618 return blender::seq::transform_is_locked(channels, strip);
619}
620
621static void rna_Strip_use_proxy_set(PointerRNA *ptr, bool value)
622{
623 Strip *strip = (Strip *)ptr->data;
624 blender::seq::proxy_set(strip, value != 0);
625}
626
627static bool transform_strip_cmp_fn(Strip *strip, void *arg_pt)
628{
629 StripSearchData *data = static_cast<StripSearchData *>(arg_pt);
630
631 if (strip->data && strip->data->transform == data->data) {
632 data->strip = strip;
633 return false; /* done so bail out */
634 }
635 return true;
636}
637
638static Strip *strip_get_by_transform(Editing *ed, StripTransform *transform)
639{
640 StripSearchData data;
641
642 data.strip = nullptr;
643 data.data = transform;
644
645 /* irritating we need to search for our strip! */
646 blender::seq::for_each_callback(&ed->seqbase, transform_strip_cmp_fn, &data);
647
648 return data.strip;
649}
650
651static std::optional<std::string> rna_StripTransform_path(const PointerRNA *ptr)
652{
653 Scene *scene = (Scene *)ptr->owner_id;
655 Strip *strip = strip_get_by_transform(ed, static_cast<StripTransform *>(ptr->data));
656
657 if (strip) {
658 char name_esc[(sizeof(strip->name) - 2) * 2];
659 BLI_str_escape(name_esc, strip->name + 2, sizeof(name_esc));
660 return fmt::format("sequence_editor.strips_all[\"{}\"].transform", name_esc);
661 }
662 return "";
663}
664
665static void rna_StripTransform_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
666{
667 Scene *scene = (Scene *)ptr->owner_id;
669 Strip *strip = strip_get_by_transform(ed, static_cast<StripTransform *>(ptr->data));
670
672}
673
674static bool crop_strip_cmp_fn(Strip *strip, void *arg_pt)
675{
676 StripSearchData *data = static_cast<StripSearchData *>(arg_pt);
677
678 if (strip->data && strip->data->crop == data->data) {
679 data->strip = strip;
680 return false; /* done so bail out */
681 }
682 return true;
683}
684
685static Strip *strip_get_by_crop(Editing *ed, StripCrop *crop)
686{
687 StripSearchData data;
688
689 data.strip = nullptr;
690 data.data = crop;
691
692 /* irritating we need to search for our strip! */
693 blender::seq::for_each_callback(&ed->seqbase, crop_strip_cmp_fn, &data);
694
695 return data.strip;
696}
697
698static std::optional<std::string> rna_StripCrop_path(const PointerRNA *ptr)
699{
700 Scene *scene = (Scene *)ptr->owner_id;
702 Strip *strip = strip_get_by_crop(ed, static_cast<StripCrop *>(ptr->data));
703
704 if (strip) {
705 char name_esc[(sizeof(strip->name) - 2) * 2];
706 BLI_str_escape(name_esc, strip->name + 2, sizeof(name_esc));
707 return fmt::format("sequence_editor.strips_all[\"{}\"].crop", name_esc);
708 }
709 return "";
710}
711
712static void rna_StripCrop_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
713{
714 Scene *scene = (Scene *)ptr->owner_id;
716 Strip *strip = strip_get_by_crop(ed, static_cast<StripCrop *>(ptr->data));
717
719}
720
721static void rna_Strip_text_font_set(PointerRNA *ptr,
722 PointerRNA ptr_value,
723 ReportList * /*reports*/)
724{
725 Strip *strip = static_cast<Strip *>(ptr->data);
726 TextVars *data = static_cast<TextVars *>(strip->effectdata);
727 VFont *value = static_cast<VFont *>(ptr_value.data);
728
730
731 id_us_plus(&value->id);
732 data->text_blf_id = STRIP_FONT_NOT_LOADED;
733 data->text_font = value;
734}
735
736/* name functions that ignore the first two characters */
737static void rna_Strip_name_get(PointerRNA *ptr, char *value)
738{
739 Strip *strip = (Strip *)ptr->data;
740 strcpy(value, strip->name + 2);
741}
742
743static int rna_Strip_name_length(PointerRNA *ptr)
744{
745 Strip *strip = (Strip *)ptr->data;
746 return strlen(strip->name + 2);
747}
748
749static void rna_Strip_name_set(PointerRNA *ptr, const char *value)
750{
751 Scene *scene = (Scene *)ptr->owner_id;
752 Strip *strip = (Strip *)ptr->data;
753 char oldname[sizeof(strip->name)];
754 AnimData *adt;
755
757
758 /* make a copy of the old name first */
759 BLI_strncpy(oldname, strip->name + 2, sizeof(strip->name) - 2);
760
761 /* copy the new name into the name slot */
762 blender::seq::edit_strip_name_set(scene, strip, value);
763
764 /* make sure the name is unique */
765 blender::seq::strip_unique_name_set(scene, &scene->ed->seqbase, strip);
766 /* fix all the animation data which may link to this */
767
768 /* Don't rename everywhere because these are per scene. */
769# if 0
771 nullptr, "sequence_editor.strips_all", oldname, strip->name + 2);
772# endif
773 adt = BKE_animdata_from_id(&scene->id);
774 if (adt) {
776 &scene->id, adt, nullptr, "sequence_editor.strips_all", oldname, strip->name + 2, 0, 0, 1);
777 }
778}
779
780static StructRNA *rna_Strip_refine(PointerRNA *ptr)
781{
782 Strip *strip = (Strip *)ptr->data;
783
784 switch (strip->type) {
785 case STRIP_TYPE_IMAGE:
786 return &RNA_ImageStrip;
787 case STRIP_TYPE_META:
788 return &RNA_MetaStrip;
789 case STRIP_TYPE_SCENE:
790 return &RNA_SceneStrip;
791 case STRIP_TYPE_MOVIE:
792 return &RNA_MovieStrip;
794 return &RNA_MovieClipStrip;
795 case STRIP_TYPE_MASK:
796 return &RNA_MaskStrip;
798 return &RNA_SoundStrip;
799 case STRIP_TYPE_CROSS:
800 return &RNA_CrossStrip;
801 case STRIP_TYPE_ADD:
802 return &RNA_AddStrip;
803 case STRIP_TYPE_SUB:
804 return &RNA_SubtractStrip;
806 return &RNA_AlphaOverStrip;
808 return &RNA_AlphaUnderStrip;
810 return &RNA_GammaCrossStrip;
811 case STRIP_TYPE_MUL:
812 return &RNA_MultiplyStrip;
814 return &RNA_MulticamStrip;
816 return &RNA_AdjustmentStrip;
817 case STRIP_TYPE_WIPE:
818 return &RNA_WipeStrip;
819 case STRIP_TYPE_GLOW:
820 return &RNA_GlowStrip;
822 return &RNA_TransformStrip;
823 case STRIP_TYPE_COLOR:
824 return &RNA_ColorStrip;
825 case STRIP_TYPE_SPEED:
826 return &RNA_SpeedControlStrip;
828 return &RNA_GaussianBlurStrip;
829 case STRIP_TYPE_TEXT:
830 return &RNA_TextStrip;
832 return &RNA_ColorMixStrip;
833 default:
834 return &RNA_Strip;
835 }
836}
837
838static std::optional<std::string> rna_Strip_path(const PointerRNA *ptr)
839{
840 const Strip *strip = (Strip *)ptr->data;
841
842 /* sequencer data comes from scene...
843 * TODO: would be nice to make SequenceEditor data a data-block of its own (for shorter paths)
844 */
845 char name_esc[(sizeof(strip->name) - 2) * 2];
846
847 BLI_str_escape(name_esc, strip->name + 2, sizeof(name_esc));
848 return fmt::format("sequence_editor.strips_all[\"{}\"]", name_esc);
849}
850
851static IDProperty **rna_Strip_idprops(PointerRNA *ptr)
852{
853 Strip *strip = static_cast<Strip *>(ptr->data);
854 return &strip->prop;
855}
856
857static bool rna_MovieStrip_reload_if_needed(ID *scene_id, Strip *strip, Main *bmain)
858{
859 Scene *scene = (Scene *)scene_id;
860
861 bool has_reloaded;
862 bool can_produce_frames;
863
865 bmain, scene, strip, &has_reloaded, &can_produce_frames);
866
867 if (has_reloaded && can_produce_frames) {
869
872 }
873
874 return can_produce_frames;
875}
876
877static PointerRNA rna_MovieStrip_metadata_get(ID *scene_id, Strip *strip)
878{
879 if (strip == nullptr || strip->anims.first == nullptr) {
880 return PointerRNA_NULL;
881 }
882
883 StripAnim *sanim = static_cast<StripAnim *>(strip->anims.first);
884 if (sanim->anim == nullptr) {
885 return PointerRNA_NULL;
886 }
887
888 IDProperty *metadata = MOV_load_metadata(sanim->anim);
889 if (metadata == nullptr) {
890 return PointerRNA_NULL;
891 }
892
893 PointerRNA ptr = RNA_pointer_create_discrete(scene_id, &RNA_IDPropertyWrapPtr, metadata);
894 return ptr;
895}
896
897static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter)
898{
899 ListBaseIterator *internal = &iter->internal.listbase;
900 MetaStack *ms = (MetaStack *)internal->link;
901
902 return RNA_pointer_create_with_parent(iter->parent, &RNA_Strip, ms->parent_strip);
903}
904
905/* TODO: expose strip path setting as a higher level sequencer BKE function. */
906static void rna_Strip_filepath_set(PointerRNA *ptr, const char *value)
907{
908 Strip *strip = (Strip *)(ptr->data);
910 strip->data->dirpath,
911 sizeof(strip->data->dirpath),
912 strip->data->stripdata->filename,
913 sizeof(strip->data->stripdata->filename));
914}
915
916static void rna_Strip_filepath_get(PointerRNA *ptr, char *value)
917{
918 Strip *strip = (Strip *)(ptr->data);
919 char filepath[FILE_MAX];
920
922 filepath, sizeof(filepath), strip->data->dirpath, strip->data->stripdata->filename);
923 strcpy(value, filepath);
924}
925
926static int rna_Strip_filepath_length(PointerRNA *ptr)
927{
928 Strip *strip = (Strip *)(ptr->data);
929 char filepath[FILE_MAX];
930
932 filepath, sizeof(filepath), strip->data->dirpath, strip->data->stripdata->filename);
933 return strlen(filepath);
934}
935
936static void rna_Strip_proxy_filepath_set(PointerRNA *ptr, const char *value)
937{
938 StripProxy *proxy = (StripProxy *)(ptr->data);
940 value, proxy->dirpath, sizeof(proxy->dirpath), proxy->filename, sizeof(proxy->filename));
941 if (proxy->anim) {
942 MOV_close(proxy->anim);
943 proxy->anim = nullptr;
944 }
945}
946
947static void rna_Strip_proxy_filepath_get(PointerRNA *ptr, char *value)
948{
949 StripProxy *proxy = (StripProxy *)(ptr->data);
950 char filepath[FILE_MAX];
951
952 BLI_path_join(filepath, sizeof(filepath), proxy->dirpath, proxy->filename);
953 strcpy(value, filepath);
954}
955
956static int rna_Strip_proxy_filepath_length(PointerRNA *ptr)
957{
958 StripProxy *proxy = (StripProxy *)(ptr->data);
959 char filepath[FILE_MAX];
960
961 BLI_path_join(filepath, sizeof(filepath), proxy->dirpath, proxy->filename);
962 return strlen(filepath);
963}
964
965static void rna_Strip_audio_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
966{
968}
969
970static void rna_Strip_pan_range(
971 PointerRNA *ptr, float *min, float *max, float *softmin, float *softmax)
972{
973 Scene *scene = (Scene *)ptr->owner_id;
974
975 *min = -FLT_MAX;
976 *max = FLT_MAX;
977 *softmax = 1 + int(scene->r.ffcodecdata.audio_channels > 2);
978 *softmin = -*softmax;
979}
980
981static int rna_Strip_input_count_get(PointerRNA *ptr)
982{
983 Strip *strip = (Strip *)(ptr->data);
984
986}
987
988static void rna_Strip_input_set(PointerRNA *ptr,
989 const PointerRNA &ptr_value,
991 int input_num)
992{
993
994 Strip *strip = static_cast<Strip *>(ptr->data);
995 Strip *input = static_cast<Strip *>(ptr_value.data);
996
998 BKE_report(reports, RPT_ERROR, "Cannot reassign inputs: recursion detected");
999 return;
1000 }
1001
1002 switch (input_num) {
1003 case 1:
1004 strip->input1 = input;
1005 break;
1006 case 2:
1007 strip->input2 = input;
1008 break;
1009 }
1010}
1011
1012static void rna_Strip_input_1_set(PointerRNA *ptr, PointerRNA ptr_value, ReportList *reports)
1013{
1014 rna_Strip_input_set(ptr, ptr_value, reports, 1);
1015}
1016
1017static void rna_Strip_input_2_set(PointerRNA *ptr, PointerRNA ptr_value, ReportList *reports)
1018{
1019 rna_Strip_input_set(ptr, ptr_value, reports, 2);
1020}
1021# if 0
1022static void rna_SoundStrip_filename_set(PointerRNA *ptr, const char *value)
1023{
1024 Strip *strip = (Strip *)(ptr->data);
1026 strip->data->dirpath,
1027 sizeof(strip->data->dirpath),
1028 strip->data->stripdata->name,
1029 sizeof(strip->data->stripdata->name));
1030}
1031
1032static void rna_StripElement_filename_set(PointerRNA *ptr, const char *value)
1033{
1034 StripElem *elem = (StripElem *)(ptr->data);
1035 BLI_path_split_file_part(value, elem->name, sizeof(elem->name));
1036}
1037# endif
1038
1039static void rna_Strip_reopen_files_update(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
1040{
1041 Scene *scene = (Scene *)ptr->owner_id;
1043
1044 blender::seq::relations_free_imbuf(scene, &ed->seqbase, false);
1045 rna_Strip_invalidate_raw_update(bmain, scene, ptr);
1046
1047 if (RNA_struct_is_a(ptr->type, &RNA_SoundStrip)) {
1048 blender::seq::sound_update_bounds(scene, static_cast<Strip *>(ptr->data));
1049 }
1050}
1051
1052static void rna_Strip_filepath_update(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
1053{
1054 Scene *scene = (Scene *)ptr->owner_id;
1055 Strip *strip = (Strip *)(ptr->data);
1056 blender::seq::add_reload_new_file(bmain, scene, strip, true);
1057 rna_Strip_invalidate_raw_update(bmain, scene, ptr);
1058}
1059
1060static void rna_Strip_sound_update(Main *bmain, Scene * /*active_scene*/, PointerRNA *ptr)
1061{
1062 Scene *scene = (Scene *)ptr->owner_id;
1065}
1066
1067static bool seqproxy_strip_cmp_fn(Strip *strip, void *arg_pt)
1068{
1069 StripSearchData *data = static_cast<StripSearchData *>(arg_pt);
1070
1071 if (strip->data && strip->data->proxy == data->data) {
1072 data->strip = strip;
1073 return false; /* done so bail out */
1074 }
1075 return true;
1076}
1077
1078static Strip *strip_get_by_proxy(Editing *ed, StripProxy *proxy)
1079{
1080 StripSearchData data;
1081
1082 data.strip = nullptr;
1083 data.data = proxy;
1084
1085 blender::seq::for_each_callback(&ed->seqbase, seqproxy_strip_cmp_fn, &data);
1086 return data.strip;
1087}
1088
1089static void rna_Strip_tcindex_update(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
1090{
1091 Scene *scene = (Scene *)ptr->owner_id;
1093 Strip *strip = strip_get_by_proxy(ed, static_cast<StripProxy *>(ptr->data));
1094
1095 blender::seq::add_reload_new_file(bmain, scene, strip, false);
1096 do_strip_frame_change_update(scene, strip);
1097}
1098
1099static void rna_StripProxy_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
1100{
1101 Scene *scene = (Scene *)ptr->owner_id;
1103 Strip *strip = strip_get_by_proxy(ed, static_cast<StripProxy *>(ptr->data));
1105}
1106
1107/* do_versions? */
1108static float rna_Strip_opacity_get(PointerRNA *ptr)
1109{
1110 Strip *strip = (Strip *)(ptr->data);
1111 return strip->blend_opacity / 100.0f;
1112}
1113static void rna_Strip_opacity_set(PointerRNA *ptr, float value)
1114{
1115 Strip *strip = (Strip *)(ptr->data);
1116 CLAMP(value, 0.0f, 1.0f);
1117 strip->blend_opacity = value * 100.0f;
1118}
1119
1120static int rna_Strip_color_tag_get(PointerRNA *ptr)
1121{
1122 Strip *strip = (Strip *)(ptr->data);
1123 return strip->color_tag;
1124}
1125
1126static void rna_Strip_color_tag_set(PointerRNA *ptr, int value)
1127{
1128 Strip *strip = (Strip *)(ptr->data);
1129 strip->color_tag = value;
1130}
1131
1132static bool colbalance_seq_cmp_fn(Strip *strip, void *arg_pt)
1133{
1134 StripSearchData *data = static_cast<StripSearchData *>(arg_pt);
1135
1136 for (StripModifierData *smd = static_cast<StripModifierData *>(strip->modifiers.first); smd;
1137 smd = smd->next)
1138 {
1139 if (smd->type == seqModifierType_ColorBalance) {
1141
1142 if (&cbmd->color_balance == data->data) {
1143 data->strip = strip;
1144 data->smd = smd;
1145 return false; /* done so bail out */
1146 }
1147 }
1148 }
1149
1150 return true;
1151}
1152
1153static Strip *strip_get_by_colorbalance(Editing *ed,
1155 StripModifierData **r_smd)
1156{
1157 StripSearchData data;
1158
1159 data.strip = nullptr;
1160 data.smd = nullptr;
1161 data.data = cb;
1162
1163 /* irritating we need to search for our strip! */
1164 blender::seq::for_each_callback(&ed->seqbase, colbalance_seq_cmp_fn, &data);
1165
1166 *r_smd = data.smd;
1167
1168 return data.strip;
1169}
1170
1171static std::optional<std::string> rna_StripColorBalance_path(const PointerRNA *ptr)
1172{
1173 Scene *scene = (Scene *)ptr->owner_id;
1174 StripModifierData *smd;
1176 Strip *strip = strip_get_by_colorbalance(ed, static_cast<StripColorBalance *>(ptr->data), &smd);
1177
1178 if (strip) {
1179 char name_esc[(sizeof(strip->name) - 2) * 2];
1180
1181 BLI_str_escape(name_esc, strip->name + 2, sizeof(name_esc));
1182
1183 if (!smd) {
1184 /* Path to old filter color balance. */
1185 return fmt::format("sequence_editor.strips_all[\"{}\"].color_balance", name_esc);
1186 }
1187 /* Path to modifier. */
1188 char name_esc_smd[sizeof(smd->name) * 2];
1189
1190 BLI_str_escape(name_esc_smd, smd->name, sizeof(name_esc_smd));
1191 return fmt::format("sequence_editor.strips_all[\"{}\"].modifiers[\"{}\"].color_balance",
1192 name_esc,
1193 name_esc_smd);
1194 }
1195 return "";
1196}
1197
1198static void rna_StripColorBalance_update(Main * /*bmain*/, Scene * /*scene*/, PointerRNA *ptr)
1199{
1200 Scene *scene = (Scene *)ptr->owner_id;
1202 StripModifierData *smd;
1203 Strip *strip = strip_get_by_colorbalance(ed, static_cast<StripColorBalance *>(ptr->data), &smd);
1204
1206}
1207
1208static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, bool value)
1209{
1210 Scene *scene = (Scene *)ptr->owner_id;
1212
1213 if (ed == nullptr) {
1214 return;
1215 }
1216
1217 /* convert from abs to relative and back */
1218 if ((ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) == 0 && value) {
1219 ed->overlay_frame_abs = scene->r.cfra + ed->overlay_frame_ofs;
1221 }
1222 else if ((ed->overlay_frame_flag & SEQ_EDIT_OVERLAY_FRAME_ABS) && !value) {
1223 ed->overlay_frame_ofs = ed->overlay_frame_abs - scene->r.cfra;
1225 }
1226}
1227
1228static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
1229{
1230 Scene *scene = (Scene *)ptr->owner_id;
1232
1233 if (ed == nullptr) {
1234 return scene->r.cfra;
1235 }
1236
1238 return ed->overlay_frame_abs - scene->r.cfra;
1239 }
1240 else {
1241 return ed->overlay_frame_ofs;
1242 }
1243}
1244
1245static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
1246{
1247 Scene *scene = (Scene *)ptr->owner_id;
1249
1250 if (ed == nullptr) {
1251 return;
1252 }
1253
1255 ed->overlay_frame_abs = (scene->r.cfra + value);
1256 }
1257 else {
1258 ed->overlay_frame_ofs = value;
1259 }
1260}
1261
1262static int rna_SequenceEditor_get_cache_raw_size(PointerRNA *ptr)
1263{
1264 Scene *scene = (Scene *)ptr->owner_id;
1265 if (scene == nullptr) {
1266 return 0;
1267 }
1268 return int(blender::seq::source_image_cache_calc_memory_size(scene) / 1024 / 1024);
1269}
1270
1271static int rna_SequenceEditor_get_cache_final_size(PointerRNA *ptr)
1272{
1273 Scene *scene = (Scene *)ptr->owner_id;
1274 if (scene == nullptr) {
1275 return 0;
1276 }
1277 return int(blender::seq::final_image_cache_calc_memory_size(scene) / 1024 / 1024);
1278}
1279
1280static void rna_SequenceEditor_display_stack(ID *id,
1281 Editing *ed,
1283 Strip *strip_meta)
1284{
1285 /* Check for non-meta sequence */
1286 if (strip_meta != nullptr && strip_meta->type != STRIP_TYPE_META &&
1287 blender::seq::exists_in_seqbase(strip_meta, &ed->seqbase))
1288 {
1289 BKE_report(reports, RPT_ERROR, "Strip type must be 'META'");
1290 return;
1291 }
1292
1293 /* Get editing base of meta sequence */
1294 Scene *scene = (Scene *)id;
1295 blender::seq::meta_stack_set(scene, strip_meta);
1296 /* De-activate strip. This is to prevent strip from different timeline being drawn. */
1297 blender::seq::select_active_set(scene, nullptr);
1298
1300}
1301
1302static bool modifier_strip_cmp_fn(Strip *strip, void *arg_pt)
1303{
1304 StripSearchData *data = static_cast<StripSearchData *>(arg_pt);
1305
1306 if (BLI_findindex(&strip->modifiers, data->data) != -1) {
1307 data->strip = strip;
1308 return false; /* done so bail out */
1309 }
1310
1311 return true;
1312}
1313
1314static Strip *strip_get_by_modifier(Editing *ed, StripModifierData *smd)
1315{
1316 StripSearchData data;
1317
1318 data.strip = nullptr;
1319 data.data = smd;
1320
1321 /* irritating we need to search for our strip! */
1322 blender::seq::for_each_callback(&ed->seqbase, modifier_strip_cmp_fn, &data);
1323
1324 return data.strip;
1325}
1326
1327static StructRNA *rna_StripModifier_refine(PointerRNA *ptr)
1328{
1329 StripModifierData *smd = (StripModifierData *)ptr->data;
1330
1331 switch (smd->type) {
1333 return &RNA_ColorBalanceModifier;
1335 return &RNA_CurvesModifier;
1337 return &RNA_HueCorrectModifier;
1339 return &RNA_BrightContrastModifier;
1341 return &RNA_WhiteBalanceModifier;
1343 return &RNA_SequencerTonemapModifierData;
1345 return &RNA_SoundEqualizerModifier;
1346 default:
1347 return &RNA_StripModifier;
1348 }
1349}
1350
1351static std::optional<std::string> rna_StripModifier_path(const PointerRNA *ptr)
1352{
1353 Scene *scene = (Scene *)ptr->owner_id;
1355 StripModifierData *smd = static_cast<StripModifierData *>(ptr->data);
1356 Strip *strip = strip_get_by_modifier(ed, smd);
1357
1358 if (strip) {
1359 char name_esc[(sizeof(strip->name) - 2) * 2];
1360 char name_esc_smd[sizeof(smd->name) * 2];
1361
1362 BLI_str_escape(name_esc, strip->name + 2, sizeof(name_esc));
1363 BLI_str_escape(name_esc_smd, smd->name, sizeof(name_esc_smd));
1364 return fmt::format(
1365 "sequence_editor.strips_all[\"{}\"].modifiers[\"{}\"]", name_esc, name_esc_smd);
1366 }
1367 return "";
1368}
1369
1370static void rna_StripModifier_name_set(PointerRNA *ptr, const char *value)
1371{
1372 StripModifierData *smd = static_cast<StripModifierData *>(ptr->data);
1373 Scene *scene = (Scene *)ptr->owner_id;
1375 Strip *strip = strip_get_by_modifier(ed, smd);
1376 AnimData *adt;
1377 char oldname[sizeof(smd->name)];
1378
1379 /* make a copy of the old name first */
1380 STRNCPY(oldname, smd->name);
1381
1382 /* copy the new name into the name slot */
1383 STRNCPY_UTF8(smd->name, value);
1384
1385 /* make sure the name is truly unique */
1387
1388 /* fix all the animation data which may link to this */
1389 adt = BKE_animdata_from_id(&scene->id);
1390 if (adt) {
1391 char rna_path_prefix[1024];
1392
1393 char strip_name_esc[(sizeof(strip->name) - 2) * 2];
1394 BLI_str_escape(strip_name_esc, strip->name + 2, sizeof(strip_name_esc));
1395
1396 SNPRINTF(rna_path_prefix, "sequence_editor.strips_all[\"%s\"].modifiers", strip_name_esc);
1398 &scene->id, adt, nullptr, rna_path_prefix, oldname, smd->name, 0, 0, 1);
1399 }
1400}
1401
1402static void rna_StripModifier_update(Main *bmain, Scene * /*scene*/, PointerRNA *ptr)
1403{
1404 /* strip from other scenes could be modified, so using active scene is not reliable */
1405 Scene *scene = (Scene *)ptr->owner_id;
1407 Strip *strip = strip_get_by_modifier(ed, static_cast<StripModifierData *>(ptr->data));
1408
1412 }
1413 else {
1415 }
1416}
1417
1418/*
1419 * Update of Curve in an EQ Sound Modifier
1420 */
1421static void rna_StripModifier_EQCurveMapping_update(Main *bmain,
1422 Scene * /*scene*/,
1423 PointerRNA *ptr)
1424{
1425 Scene *scene = (Scene *)ptr->owner_id;
1426
1430}
1431
1432static bool rna_StripModifier_otherStrip_poll(PointerRNA *ptr, PointerRNA value)
1433{
1434 Scene *scene = (Scene *)ptr->owner_id;
1436 Strip *strip = strip_get_by_modifier(ed, static_cast<StripModifierData *>(ptr->data));
1437 Strip *cur = (Strip *)value.data;
1438
1439 if ((strip == cur) || (cur->type == STRIP_TYPE_SOUND_RAM)) {
1440 return false;
1441 }
1442
1443 return true;
1444}
1445
1446static StripModifierData *rna_Strip_modifier_new(
1447 Strip *strip, bContext *C, ReportList *reports, const char *name, int type)
1448{
1450 BKE_report(reports, RPT_ERROR, "Strip type does not support modifiers");
1451
1452 return nullptr;
1453 }
1454 else {
1455 Scene *scene = CTX_data_scene(C);
1456 StripModifierData *smd;
1457
1458 smd = blender::seq::modifier_new(strip, name, type);
1459
1461
1463
1464 return smd;
1465 }
1466}
1467
1468static void rna_Strip_modifier_remove(Strip *strip,
1469 bContext *C,
1471 PointerRNA *smd_ptr)
1472{
1473 StripModifierData *smd = static_cast<StripModifierData *>(smd_ptr->data);
1474 Scene *scene = CTX_data_scene(C);
1475
1476 if (blender::seq::modifier_remove(strip, smd) == false) {
1477 BKE_report(reports, RPT_ERROR, "Modifier was not found in the stack");
1478 return;
1479 }
1480
1481 smd_ptr->invalidate();
1483
1485}
1486
1487static void rna_Strip_modifier_clear(Strip *strip, bContext *C)
1488{
1489 Scene *scene = CTX_data_scene(C);
1490
1492
1494
1496}
1497
1498static void rna_StripModifier_strip_set(PointerRNA *ptr, PointerRNA value, ReportList *reports)
1499{
1500 StripModifierData *smd = static_cast<StripModifierData *>(ptr->data);
1501 Scene *scene = (Scene *)ptr->owner_id;
1503 Strip *strip = strip_get_by_modifier(ed, smd);
1504 Strip *target = (Strip *)value.data;
1505
1506 if (target != nullptr && blender::seq::relations_render_loop_check(target, strip)) {
1507 BKE_report(reports, RPT_ERROR, "Recursion detected, cannot use this strip");
1508 return;
1509 }
1510
1511 smd->mask_strip = target;
1512}
1513
1514static float rna_Strip_fps_get(PointerRNA *ptr)
1515{
1516 Scene *scene = (Scene *)ptr->owner_id;
1517 Strip *strip = (Strip *)(ptr->data);
1518 return blender::seq::time_strip_fps_get(scene, strip);
1519}
1520
1521static void rna_Strip_separate(ID *id, Strip *strip_meta, Main *bmain)
1522{
1523 Scene *scene = (Scene *)id;
1524
1525 /* Find the appropriate seqbase */
1526 ListBase *seqbase = blender::seq::get_seqbase_by_strip(scene, strip_meta);
1527
1528 LISTBASE_FOREACH_MUTABLE (Strip *, strip, &strip_meta->seqbase) {
1529 blender::seq::edit_move_strip_to_seqbase(scene, &strip_meta->seqbase, strip, seqbase);
1530 }
1531
1532 blender::seq::edit_flag_for_removal(scene, seqbase, strip_meta);
1534
1535 /* Update depsgraph. */
1538
1540}
1541
1542static void rna_SequenceTimelineChannel_name_set(PointerRNA *ptr, const char *value)
1543{
1544 SeqTimelineChannel *channel = (SeqTimelineChannel *)ptr->data;
1545 Scene *scene = (Scene *)ptr->owner_id;
1547
1548 Strip *channel_owner = blender::seq::lookup_strip_by_channel_owner(ed, channel);
1549 ListBase *channels_base = &ed->channels;
1550
1551 if (channel_owner != nullptr) {
1552 channels_base = &channel_owner->channels;
1553 }
1554
1555 STRNCPY_UTF8(channel->name, value);
1556 BLI_uniquename(channels_base,
1557 channel,
1558 "Channel",
1559 '.',
1561 sizeof(channel->name));
1562}
1563
1564static void rna_SequenceTimelineChannel_mute_update(Main *bmain,
1565 Scene *active_scene,
1566 PointerRNA *ptr)
1567{
1568 Scene *scene = (Scene *)ptr->owner_id;
1571
1572 Strip *channel_owner = blender::seq::lookup_strip_by_channel_owner(ed, channel);
1573 ListBase *seqbase;
1574 if (channel_owner == nullptr) {
1575 seqbase = &ed->seqbase;
1576 }
1577 else {
1578 seqbase = &channel_owner->seqbase;
1579 }
1580
1581 LISTBASE_FOREACH (Strip *, strip, seqbase) {
1583 }
1584
1585 rna_Strip_sound_update(bmain, active_scene, ptr);
1586}
1587
1588static std::optional<std::string> rna_SeqTimelineChannel_path(const PointerRNA *ptr)
1589{
1590 Scene *scene = (Scene *)ptr->owner_id;
1591 SeqTimelineChannel *channel = (SeqTimelineChannel *)ptr->data;
1592
1593 Strip *channel_owner = blender::seq::lookup_strip_by_channel_owner(scene->ed, channel);
1594
1595 char channel_name_esc[(sizeof(channel->name)) * 2];
1596 BLI_str_escape(channel_name_esc, channel->name, sizeof(channel_name_esc));
1597
1598 if (channel_owner == nullptr) {
1599 return fmt::format("sequence_editor.channels[\"{}\"]", channel_name_esc);
1600 }
1601 char owner_name_esc[(sizeof(channel_owner->name) - 2) * 2];
1602 BLI_str_escape(owner_name_esc, channel_owner->name + 2, sizeof(owner_name_esc));
1603 return fmt::format(
1604 "sequence_editor.strips_all[\"{}\"].channels[\"{}\"]", owner_name_esc, channel_name_esc);
1605}
1606
1607static EQCurveMappingData *rna_Strip_SoundEqualizer_Curve_add(SoundEqualizerModifierData *semd,
1608 bContext * /*C*/,
1609 float min_freq,
1610 float max_freq)
1611{
1613 semd, min_freq, max_freq);
1615 return eqcmd;
1616}
1617
1618static void rna_Strip_SoundEqualizer_Curve_clear(SoundEqualizerModifierData *semd,
1619 bContext * /*C*/)
1620{
1623}
1624
1625#else
1626
1628{
1629 StructRNA *srna;
1630 PropertyRNA *prop;
1631
1632 srna = RNA_def_struct(brna, "StripElement", nullptr);
1633 RNA_def_struct_ui_text(srna, "Strip Element", "Sequence strip data for a single frame");
1634 RNA_def_struct_sdna(srna, "StripElem");
1635
1636 prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
1637 RNA_def_property_string_sdna(prop, nullptr, "filename");
1638 RNA_def_property_ui_text(prop, "Filename", "Name of the source file");
1639 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripElement_update");
1640
1641 prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
1642 RNA_def_property_int_sdna(prop, nullptr, "orig_width");
1644 RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
1645
1646 prop = RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
1647 RNA_def_property_int_sdna(prop, nullptr, "orig_height");
1649 RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
1650
1651 prop = RNA_def_property(srna, "orig_fps", PROP_FLOAT, PROP_NONE);
1652 RNA_def_property_float_sdna(prop, nullptr, "orig_fps");
1654 RNA_def_property_ui_text(prop, "Orig FPS", "Original frames per second");
1655}
1656
1658{
1659 StructRNA *srna;
1660 PropertyRNA *prop;
1661
1662 srna = RNA_def_struct(brna, "RetimingKey", nullptr);
1664 srna,
1665 "Retiming Key",
1666 "Key mapped to particular frame that can be moved to change playback speed");
1667 RNA_def_struct_sdna(srna, "SeqRetimingKey");
1668
1669 prop = RNA_def_property(srna, "timeline_frame", PROP_INT, PROP_NONE);
1671 prop, "rna_Strip_retiming_key_frame_get", "rna_Strip_retiming_key_frame_set", nullptr);
1672 RNA_def_property_ui_text(prop, "Timeline Frame", "Position of retiming key in timeline");
1673
1674 FunctionRNA *func = RNA_def_function(srna, "remove", "rna_Strip_retiming_key_remove");
1676 RNA_def_function_ui_description(func, "Remove retiming key");
1677}
1678
1680{
1681 StructRNA *srna;
1682 PropertyRNA *prop;
1683
1684 srna = RNA_def_struct(brna, "StripCrop", nullptr);
1685 RNA_def_struct_ui_text(srna, "Strip Crop", "Cropping parameters for a sequence strip");
1686 RNA_def_struct_sdna(srna, "StripCrop");
1687
1688 prop = RNA_def_property(srna, "max_y", PROP_INT, PROP_PIXEL);
1689 RNA_def_property_int_sdna(prop, nullptr, "top");
1690 RNA_def_property_ui_text(prop, "Top", "Number of pixels to crop from the top");
1691 RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1692 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripCrop_update");
1693
1694 prop = RNA_def_property(srna, "min_y", PROP_INT, PROP_PIXEL);
1695 RNA_def_property_int_sdna(prop, nullptr, "bottom");
1696 RNA_def_property_ui_text(prop, "Bottom", "Number of pixels to crop from the bottom");
1697 RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1698 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripCrop_update");
1699
1700 prop = RNA_def_property(srna, "min_x", PROP_INT, PROP_PIXEL);
1701 RNA_def_property_int_sdna(prop, nullptr, "left");
1702 RNA_def_property_ui_text(prop, "Left", "Number of pixels to crop from the left side");
1703 RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1704 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripCrop_update");
1705
1706 prop = RNA_def_property(srna, "max_x", PROP_INT, PROP_PIXEL);
1707 RNA_def_property_int_sdna(prop, nullptr, "right");
1708 RNA_def_property_ui_text(prop, "Right", "Number of pixels to crop from the right side");
1709 RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
1710 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripCrop_update");
1711
1712 RNA_def_struct_path_func(srna, "rna_StripCrop_path");
1713}
1714
1717 "AUTO",
1718 0,
1719 "Auto",
1720 "Automatically choose filter based on scaling factor"},
1721 {SEQ_TRANSFORM_FILTER_NEAREST, "NEAREST", 0, "Nearest", "Use nearest sample"},
1723 "BILINEAR",
1724 0,
1725 "Bilinear",
1726 "Interpolate between 2" BLI_STR_UTF8_MULTIPLICATION_SIGN "2 samples"},
1728 "CUBIC_MITCHELL",
1729 0,
1730 "Cubic Mitchell",
1731 "Cubic Mitchell filter on 4" BLI_STR_UTF8_MULTIPLICATION_SIGN "4 samples"},
1733 "CUBIC_BSPLINE",
1734 0,
1735 "Cubic B-Spline",
1736 "Cubic B-Spline filter (blurry but no ringing) on 4" BLI_STR_UTF8_MULTIPLICATION_SIGN
1737 "4 samples"},
1739 "BOX",
1740 0,
1741 "Box",
1742 "Averages source image samples that fall under destination pixel"},
1743 {0, nullptr, 0, nullptr, nullptr},
1744};
1745
1747{
1748 StructRNA *srna;
1749 PropertyRNA *prop;
1750
1751 srna = RNA_def_struct(brna, "StripTransform", nullptr);
1752 RNA_def_struct_ui_text(srna, "Strip Transform", "Transform parameters for a sequence strip");
1753 RNA_def_struct_sdna(srna, "StripTransform");
1754
1755 prop = RNA_def_property(srna, "scale_x", PROP_FLOAT, PROP_UNSIGNED);
1756 RNA_def_property_float_sdna(prop, nullptr, "scale_x");
1757 RNA_def_property_ui_text(prop, "Scale X", "Scale along X axis");
1758 RNA_def_property_ui_range(prop, 0, FLT_MAX, 3, 3);
1760 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripTransform_update");
1761
1762 prop = RNA_def_property(srna, "scale_y", PROP_FLOAT, PROP_UNSIGNED);
1763 RNA_def_property_float_sdna(prop, nullptr, "scale_y");
1764 RNA_def_property_ui_text(prop, "Scale Y", "Scale along Y axis");
1765 RNA_def_property_ui_range(prop, 0, FLT_MAX, 3, 3);
1767 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripTransform_update");
1768
1769 prop = RNA_def_property(srna, "offset_x", PROP_FLOAT, PROP_PIXEL);
1770 RNA_def_property_float_sdna(prop, nullptr, "xofs");
1771 RNA_def_property_ui_text(prop, "Translate X", "Move along X axis");
1772 RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 100, 3);
1773 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripTransform_update");
1774
1775 prop = RNA_def_property(srna, "offset_y", PROP_FLOAT, PROP_PIXEL);
1776 RNA_def_property_float_sdna(prop, nullptr, "yofs");
1777 RNA_def_property_ui_text(prop, "Translate Y", "Move along Y axis");
1778 RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 100, 3);
1779 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripTransform_update");
1780
1781 prop = RNA_def_property(srna, "rotation", PROP_FLOAT, PROP_ANGLE);
1782 RNA_def_property_float_sdna(prop, nullptr, "rotation");
1783 RNA_def_property_ui_text(prop, "Rotation", "Rotate around image center");
1784 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripTransform_update");
1785
1786 prop = RNA_def_property(srna, "origin", PROP_FLOAT, PROP_NONE);
1787 RNA_def_property_float_sdna(prop, nullptr, "origin");
1788 RNA_def_property_ui_text(prop, "Origin", "Origin of image for transformation");
1789 RNA_def_property_ui_range(prop, 0, 1, 1, 3);
1790 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripTransform_update");
1791
1792 prop = RNA_def_property(srna, "filter", PROP_ENUM, PROP_NONE);
1793 RNA_def_property_enum_sdna(prop, nullptr, "filter");
1796 RNA_def_property_ui_text(prop, "Filter", "Type of filter to use for image transformation");
1797 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripTransform_update");
1798
1799 RNA_def_struct_path_func(srna, "rna_StripTransform_path");
1800}
1801
1803{
1804 StructRNA *srna;
1805 PropertyRNA *prop;
1806
1807 static const EnumPropertyItem strip_tc_items[] = {
1809 "NONE",
1810 0,
1811 "None",
1812 "Ignore generated timecodes, seek in movie stream based on calculated timestamp"},
1814 "RECORD_RUN",
1815 0,
1816 "Record Run",
1817 "Seek based on timestamps read from movie stream, giving the best match between scene and "
1818 "movie times"},
1820 "RECORD_RUN_NO_GAPS",
1821 0,
1822 "Record Run No Gaps",
1823 "Effectively convert movie to an image sequence, ignoring incomplete or dropped frames, "
1824 "and changes in frame rate"},
1825 {0, nullptr, 0, nullptr, nullptr},
1826 };
1827
1828 srna = RNA_def_struct(brna, "StripProxy", nullptr);
1829 RNA_def_struct_ui_text(srna, "Strip Proxy", "Proxy parameters for a sequence strip");
1830 RNA_def_struct_sdna(srna, "StripProxy");
1831
1832 prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
1833 RNA_def_property_string_sdna(prop, nullptr, "dirpath");
1834 RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
1836 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripProxy_update");
1837
1838 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
1839 RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
1842 "rna_Strip_proxy_filepath_get",
1843 "rna_Strip_proxy_filepath_length",
1844 "rna_Strip_proxy_filepath_set");
1846 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripProxy_update");
1847
1848 prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
1850 RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing proxy files when building");
1851
1852 prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
1853 RNA_def_property_boolean_sdna(prop, nullptr, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
1854 RNA_def_property_ui_text(prop, "25%", "Build 25% proxy resolution");
1855
1856 prop = RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
1857 RNA_def_property_boolean_sdna(prop, nullptr, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_50);
1858 RNA_def_property_ui_text(prop, "50%", "Build 50% proxy resolution");
1859
1860 prop = RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
1861 RNA_def_property_boolean_sdna(prop, nullptr, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_75);
1862 RNA_def_property_ui_text(prop, "75%", "Build 75% proxy resolution");
1863
1864 prop = RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
1865 RNA_def_property_boolean_sdna(prop, nullptr, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_100);
1866 RNA_def_property_ui_text(prop, "100%", "Build 100% proxy resolution");
1867
1868 prop = RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
1869 RNA_def_property_boolean_sdna(prop, nullptr, "build_tc_flags", SEQ_PROXY_TC_RECORD_RUN);
1870 RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
1871
1872 prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
1873 RNA_def_property_int_sdna(prop, nullptr, "quality");
1874 RNA_def_property_ui_text(prop, "Quality", "Quality of proxies to build");
1875 RNA_def_property_ui_range(prop, 1, 100, 1, -1);
1876
1877 prop = RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
1878 RNA_def_property_enum_sdna(prop, nullptr, "tc");
1879 RNA_def_property_enum_items(prop, strip_tc_items);
1880 RNA_def_property_ui_text(prop, "Timecode", "Method for reading the inputs timecode");
1881 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_tcindex_update");
1882
1883 prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
1885 RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
1887 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
1888
1889 prop = RNA_def_property(srna, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
1891 RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
1893 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
1894}
1895
1897{
1898 StructRNA *srna;
1899 PropertyRNA *prop;
1900
1901 static const EnumPropertyItem method_items[] = {
1902 {SEQ_COLOR_BALANCE_METHOD_LIFTGAMMAGAIN, "LIFT_GAMMA_GAIN", 0, "Lift/Gamma/Gain", ""},
1904 "OFFSET_POWER_SLOPE",
1905 0,
1906 "Offset/Power/Slope (ASC-CDL)",
1907 "ASC-CDL standard color correction"},
1908 {0, nullptr, 0, nullptr, nullptr},
1909 };
1910
1911 srna = RNA_def_struct(brna, "StripColorBalanceData", nullptr);
1913 "Strip Color Balance Data",
1914 "Color balance parameters for a sequence strip and its modifiers");
1915 RNA_def_struct_sdna(srna, "StripColorBalance");
1916
1917 prop = RNA_def_property(srna, "correction_method", PROP_ENUM, PROP_NONE);
1918 RNA_def_property_enum_sdna(prop, nullptr, "method");
1919 RNA_def_property_enum_items(prop, method_items);
1920 RNA_def_property_ui_text(prop, "Correction Method", "");
1921 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1922
1923 prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR_GAMMA);
1924 RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
1925 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1927 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1928
1929 prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR_GAMMA);
1930 RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
1931 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1933 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1934
1935 prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR_GAMMA);
1936 RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
1937 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1939 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1940
1941 prop = RNA_def_property(srna, "slope", PROP_FLOAT, PROP_COLOR_GAMMA);
1942 RNA_def_property_ui_text(prop, "Slope", "Correction for highlights");
1943 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1945 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1946
1947 prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_COLOR_GAMMA);
1948 RNA_def_property_ui_text(prop, "Offset", "Correction for entire tonal range");
1949 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1951 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1952
1953 prop = RNA_def_property(srna, "power", PROP_FLOAT, PROP_COLOR_GAMMA);
1954 RNA_def_property_ui_text(prop, "Power", "Correction for midtones");
1956 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1958 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1959
1960 prop = RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
1962 RNA_def_property_ui_text(prop, "Inverse Lift", "Invert the lift color");
1963 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1964
1965 prop = RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
1967 RNA_def_property_ui_text(prop, "Inverse Gamma", "Invert the gamma color");
1968 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1969
1970 prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
1972 RNA_def_property_ui_text(prop, "Inverse Gain", "Invert the gain color");
1973 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1974
1975 prop = RNA_def_property(srna, "invert_slope", PROP_BOOLEAN, PROP_NONE);
1977 RNA_def_property_ui_text(prop, "Inverse Slope", "Invert the slope color");
1978 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1979
1980 prop = RNA_def_property(srna, "invert_offset", PROP_BOOLEAN, PROP_NONE);
1982 RNA_def_property_ui_text(prop, "Inverse Offset", "Invert the offset color");
1983 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1984
1985 prop = RNA_def_property(srna, "invert_power", PROP_BOOLEAN, PROP_NONE);
1987 RNA_def_property_ui_text(prop, "Inverse Power", "Invert the power color");
1988 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripColorBalance_update");
1989
1990 /* not yet used */
1991# if 0
1992 prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
1993 RNA_def_property_range(prop, 0.0f, 1.0f);
1994 RNA_def_property_ui_text(prop, "Exposure", "");
1995 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_ColorBabalnce_update");
1996
1997 prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
1998 RNA_def_property_range(prop, 0.0f, 1.0f);
1999 RNA_def_property_ui_text(prop, "Saturation", "");
2000 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_ColorBabalnce_update");
2001# endif
2002
2003 RNA_def_struct_path_func(srna, "rna_StripColorBalance_path");
2004}
2005
2007{
2008 StructRNA *srna;
2009
2010 srna = RNA_def_struct(brna, "StripColorBalance", "StripColorBalanceData");
2012 srna, "Strip Color Balance", "Color balance parameters for a sequence strip");
2013 RNA_def_struct_sdna(srna, "StripColorBalance");
2014}
2015
2017 {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
2018 {STRIP_TYPE_CROSS, "CROSS", 0, "Cross", ""},
2020 {STRIP_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
2021 {STRIP_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
2022 {STRIP_TYPE_COLOR_BURN, "BURN", 0, "Color Burn", ""},
2023 {STRIP_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
2025 {STRIP_TYPE_LIGHTEN, "LIGHTEN", 0, "Lighten", ""},
2026 {STRIP_TYPE_SCREEN, "SCREEN", 0, "Screen", ""},
2027 {STRIP_TYPE_DODGE, "DODGE", 0, "Color Dodge", ""},
2028 {STRIP_TYPE_ADD, "ADD", 0, "Add", ""},
2030 {STRIP_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
2031 {STRIP_TYPE_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
2032 {STRIP_TYPE_HARD_LIGHT, "HARD_LIGHT", 0, "Hard Light", ""},
2033 {STRIP_TYPE_VIVID_LIGHT, "VIVID_LIGHT", 0, "Vivid Light", ""},
2034 {STRIP_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
2035 {STRIP_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
2037 {STRIP_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
2038 {STRIP_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
2039 {STRIP_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
2041 {STRIP_TYPE_HUE, "HUE", 0, "Hue", ""},
2042 {STRIP_TYPE_SATURATION, "SATURATION", 0, "Saturation", ""},
2043 {STRIP_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
2044 {STRIP_TYPE_VALUE, "VALUE", 0, "Value", ""},
2046 {STRIP_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
2047 {STRIP_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
2048 {STRIP_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
2049 {0, nullptr, 0, nullptr, nullptr},
2050};
2051
2053{
2054 StructRNA *srna;
2055
2056 FunctionRNA *func;
2057 PropertyRNA *parm;
2058
2059 RNA_def_property_srna(cprop, "StripModifiers");
2060 srna = RNA_def_struct(brna, "StripModifiers", nullptr);
2061 RNA_def_struct_sdna(srna, "Strip");
2062 RNA_def_struct_ui_text(srna, "Strip Modifiers", "Collection of strip modifiers");
2063
2064 /* add modifier */
2065 func = RNA_def_function(srna, "new", "rna_Strip_modifier_new");
2067 RNA_def_function_ui_description(func, "Add a new modifier");
2068 parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier");
2070 /* modifier to add */
2071 parm = RNA_def_enum(func,
2072 "type",
2075 "",
2076 "Modifier type to add");
2078 /* return type */
2079 parm = RNA_def_pointer(func, "modifier", "StripModifier", "", "Newly created modifier");
2080 RNA_def_function_return(func, parm);
2081
2082 /* remove modifier */
2083 func = RNA_def_function(srna, "remove", "rna_Strip_modifier_remove");
2085 RNA_def_function_ui_description(func, "Remove an existing modifier from the sequence");
2086 /* modifier to remove */
2087 parm = RNA_def_pointer(func, "modifier", "StripModifier", "", "Modifier to remove");
2090
2091 /* clear all modifiers */
2092 func = RNA_def_function(srna, "clear", "rna_Strip_modifier_clear");
2094 RNA_def_function_ui_description(func, "Remove all modifiers from the sequence");
2095}
2096
2097static void rna_def_strip(BlenderRNA *brna)
2098{
2099 StructRNA *srna;
2100 PropertyRNA *prop;
2101
2102 static const EnumPropertyItem strip_type_items[] = {
2103 {STRIP_TYPE_IMAGE, "IMAGE", 0, "Image", ""},
2104 {STRIP_TYPE_META, "META", 0, "Meta", ""},
2105 {STRIP_TYPE_SCENE, "SCENE", 0, "Scene", ""},
2106 {STRIP_TYPE_MOVIE, "MOVIE", 0, "Movie", ""},
2107 {STRIP_TYPE_MOVIECLIP, "MOVIECLIP", 0, "Clip", ""},
2108 {STRIP_TYPE_MASK, "MASK", 0, "Mask", ""},
2109 {STRIP_TYPE_SOUND_RAM, "SOUND", 0, "Sound", ""},
2110 {STRIP_TYPE_CROSS, "CROSS", 0, "Crossfade", ""},
2111 {STRIP_TYPE_ADD, "ADD", 0, "Add", ""},
2112 {STRIP_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
2113 {STRIP_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
2114 {STRIP_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
2115 {STRIP_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Crossfade", ""},
2116 {STRIP_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
2117 {STRIP_TYPE_WIPE, "WIPE", 0, "Wipe", ""},
2118 {STRIP_TYPE_GLOW, "GLOW", 0, "Glow", ""},
2119 {STRIP_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
2120 {STRIP_TYPE_COLOR, "COLOR", 0, "Color", ""},
2121 {STRIP_TYPE_SPEED, "SPEED", 0, "Speed", ""},
2122 {STRIP_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
2123 {STRIP_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
2124 {STRIP_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
2125 {STRIP_TYPE_TEXT, "TEXT", 0, "Text", ""},
2126 {STRIP_TYPE_COLORMIX, "COLORMIX", 0, "Color Mix", ""},
2127 {0, nullptr, 0, nullptr, nullptr},
2128 };
2129
2130 srna = RNA_def_struct(brna, "Strip", nullptr);
2131 RNA_def_struct_ui_text(srna, "Strip", "Sequence strip in the sequence editor");
2132 RNA_def_struct_refine_func(srna, "rna_Strip_refine");
2133 RNA_def_struct_path_func(srna, "rna_Strip_path");
2134 RNA_def_struct_idprops_func(srna, "rna_Strip_idprops");
2135
2136 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
2138 prop, "rna_Strip_name_get", "rna_Strip_name_length", "rna_Strip_name_set");
2140 RNA_def_property_ui_text(prop, "Name", "");
2141 RNA_def_struct_name_property(srna, prop);
2143
2144 prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
2146 RNA_def_property_enum_items(prop, strip_type_items);
2147 RNA_def_property_ui_text(prop, "Type", "");
2149 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2150
2151 /* flags */
2152 prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
2153 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SELECT);
2154 RNA_def_property_ui_text(prop, "Select", "");
2156
2157 prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
2158 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_LEFTSEL);
2159 RNA_def_property_ui_text(prop, "Left Handle Selected", "");
2161
2162 prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
2163 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_RIGHTSEL);
2164 RNA_def_property_ui_text(prop, "Right Handle Selected", "");
2166
2167 prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
2168 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_MUTE);
2169 RNA_def_property_ui_icon(prop, ICON_CHECKBOX_HLT, -1);
2171 prop, "Mute", "Disable strip so that it cannot be viewed in the output");
2172 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2173
2174 prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
2175 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_LOCK);
2176 RNA_def_property_boolean_funcs(prop, "rna_Strip_lock_get", nullptr);
2178 RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
2179 RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it cannot be transformed");
2181
2182 /* strip positioning */
2183 /* Cache has to be invalidated before and after transformation. */
2184 prop = RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
2188 prop, "Length", "The length of the contents of this strip after the handles are applied");
2190 prop, "rna_Strip_frame_length_get", "rna_Strip_frame_length_set", nullptr);
2191 RNA_def_property_editable_func(prop, "rna_Strip_frame_editable");
2193 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2194
2195 prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
2196 RNA_def_property_int_funcs(prop, "rna_Strip_frame_duration_get", nullptr, nullptr);
2200 prop, "Length", "The length of the contents of this strip before the handles are applied");
2201
2202 prop = RNA_def_property(srna, "frame_start", PROP_FLOAT, PROP_TIME);
2203 RNA_def_property_float_sdna(prop, nullptr, "start");
2205 RNA_def_property_ui_text(prop, "Start Frame", "X position where the strip begins");
2206 RNA_def_property_ui_range(prop, MINFRAME, MAXFRAME, 100.0f, 0);
2208 prop, nullptr, "rna_Strip_start_frame_set", nullptr); /* overlap tests and calc_seq_disp */
2209 RNA_def_property_editable_func(prop, "rna_Strip_frame_editable");
2211 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2212
2213 prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
2214 RNA_def_property_int_sdna(prop, nullptr, "startdisp");
2216 prop, "rna_Strip_frame_final_start_get", "rna_Strip_start_frame_final_set", nullptr);
2217 RNA_def_property_editable_func(prop, "rna_Strip_frame_editable");
2220 prop,
2221 "Start Frame",
2222 "Start frame displayed in the sequence editor after offsets are applied, setting this is "
2223 "equivalent to moving the handle, not the actual start frame");
2224 /* overlap tests and calc_seq_disp */
2226 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2227
2228 prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
2229 RNA_def_property_int_sdna(prop, nullptr, "enddisp");
2231 prop, "rna_Strip_frame_final_end_get", "rna_Strip_end_frame_final_set", nullptr);
2232 RNA_def_property_editable_func(prop, "rna_Strip_frame_editable");
2235 prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
2236 /* overlap tests and calc_seq_disp */
2238 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2239
2240 prop = RNA_def_property(srna, "frame_offset_start", PROP_FLOAT, PROP_TIME);
2241 RNA_def_property_float_sdna(prop, nullptr, "startofs");
2242 // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
2243 RNA_def_property_ui_text(prop, "Start Offset", "");
2244 RNA_def_property_ui_range(prop, MINFRAME, MAXFRAME, 100.0f, 0);
2246 prop, nullptr, "rna_Strip_frame_offset_start_set", "rna_Strip_frame_offset_start_range");
2247 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_frame_change_update");
2248
2249 prop = RNA_def_property(srna, "frame_offset_end", PROP_FLOAT, PROP_TIME);
2250 RNA_def_property_float_sdna(prop, nullptr, "endofs");
2251 // RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
2252 RNA_def_property_ui_text(prop, "End Offset", "");
2253 RNA_def_property_ui_range(prop, MINFRAME, MAXFRAME, 100.0f, 0);
2255 prop, nullptr, "rna_Strip_frame_offset_end_set", "rna_Strip_frame_offset_end_range");
2256 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_frame_change_update");
2257
2258 prop = RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
2259 RNA_def_property_int_sdna(prop, nullptr, "channel");
2262 RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
2263 RNA_def_property_int_funcs(prop, nullptr, "rna_Strip_channel_set", nullptr); /* overlap test */
2265 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2266
2267 prop = RNA_def_property(srna, "use_linear_modifiers", PROP_BOOLEAN, PROP_NONE);
2270 "Use Linear Modifiers",
2271 "Calculate modifiers in linear space instead of sequencer's space");
2273 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2274
2275 /* blending */
2276
2277 prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
2278 RNA_def_property_enum_sdna(prop, nullptr, "blend_mode");
2282 prop, "Blending Mode", "Method for controlling how the strip combines with other strips");
2284 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2285
2286 prop = RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
2287 RNA_def_property_range(prop, 0.0f, 1.0f);
2290 prop, "Blend Opacity", "Percentage of how much the strip's colors affect other strips");
2291 /* stupid 0-100 -> 0-1 */
2292 RNA_def_property_float_funcs(prop, "rna_Strip_opacity_get", "rna_Strip_opacity_set", nullptr);
2294 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2295
2296 prop = RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_FACTOR);
2297 RNA_def_property_range(prop, 0.0f, 1.0f);
2298 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
2299 RNA_def_property_float_sdna(prop, nullptr, "effect_fader");
2300 RNA_def_property_ui_text(prop, "Effect Fader Position", "Custom fade value");
2302 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2303
2304 prop = RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
2307 "Use Default Fade",
2308 "Fade effect using the built-in default (usually makes the transition "
2309 "as long as the effect strip)");
2311 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2312
2313 prop = RNA_def_property(srna, "color_tag", PROP_ENUM, PROP_NONE);
2314 RNA_def_property_enum_sdna(prop, nullptr, "color_tag");
2315 RNA_def_property_enum_funcs(prop, "rna_Strip_color_tag_get", "rna_Strip_color_tag_set", nullptr);
2317 RNA_def_property_ui_text(prop, "Strip Color", "Color tag for a strip");
2319
2320 /* modifiers */
2321 prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
2322 RNA_def_property_struct_type(prop, "StripModifier");
2323 RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting this strip");
2324 rna_def_strip_modifiers(brna, prop);
2325
2326 prop = RNA_def_property(srna, "show_retiming_keys", PROP_BOOLEAN, PROP_NONE);
2327 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_SHOW_RETIMING);
2328 RNA_def_property_ui_text(prop, "Show Retiming Keys", "Show retiming keys, so they can be moved");
2329
2330 RNA_api_strip(srna);
2331}
2332
2333static void rna_def_channel(BlenderRNA *brna)
2334{
2335 StructRNA *srna;
2336 PropertyRNA *prop;
2337
2338 srna = RNA_def_struct(brna, "SequenceTimelineChannel", nullptr);
2339 RNA_def_struct_sdna(srna, "SeqTimelineChannel");
2340 RNA_def_struct_path_func(srna, "rna_SeqTimelineChannel_path");
2341 RNA_def_struct_ui_text(srna, "Channel", "");
2342
2343 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
2345 RNA_def_property_ui_text(prop, "Name", "");
2346 RNA_def_struct_name_property(srna, prop);
2347 RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_SequenceTimelineChannel_name_set");
2349
2350 prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
2351 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_CHANNEL_LOCK);
2352 RNA_def_property_ui_text(prop, "Lock channel", "");
2354
2355 prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
2356 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_CHANNEL_MUTE);
2357 RNA_def_property_ui_text(prop, "Mute channel", "");
2359 prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTimelineChannel_mute_update");
2360}
2361
2363{
2364 StructRNA *srna;
2365
2366 srna = RNA_def_struct(brna, "StripsTopLevel", nullptr);
2367 RNA_def_struct_sdna(srna, "Editing");
2368 RNA_def_struct_ui_text(srna, "Strips", "Collection of Strips");
2369
2370 RNA_api_strips(srna, false);
2371}
2372
2373static void rna_def_editor(BlenderRNA *brna)
2374{
2375 StructRNA *srna;
2376 FunctionRNA *func;
2377 PropertyRNA *parm;
2378 PropertyRNA *prop;
2379
2380 static const EnumPropertyItem editing_storage_items[] = {
2381 {0, "PER_STRIP", 0, "Per Strip", "Store proxies using per strip settings"},
2383 "PROJECT",
2384 0,
2385 "Project",
2386 "Store proxies using project directory"},
2387 {0, nullptr, 0, nullptr, nullptr},
2388 };
2389 srna = RNA_def_struct(brna, "SequenceEditor", nullptr);
2390 RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene data-block");
2391 RNA_def_struct_path_func(srna, "rna_SequenceEditor_path");
2392 RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
2393 RNA_def_struct_sdna(srna, "Editing");
2394
2396
2397 /* DEPRECATED */
2398 prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
2399 RNA_def_property_srna(prop, "StripsTopLevel");
2400 RNA_def_property_collection_sdna(prop, nullptr, "seqbase", nullptr);
2401 RNA_def_property_struct_type(prop, "Strip");
2403 prop, "Strips", "(Deprecated: Replaced by '.strips') Top-level strips only");
2404
2405 /* DEPRECATED */
2406 prop = RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
2407 RNA_def_property_collection_sdna(prop, nullptr, "seqbase", nullptr);
2408 RNA_def_property_struct_type(prop, "Strip");
2410 "All Strips",
2411 "(Deprecated: Replaced by '.strips_all') All strips, recursively "
2412 "including those inside metastrips");
2414 "rna_SequenceEditor_strips_all_begin",
2415 "rna_SequenceEditor_strips_all_next",
2416 "rna_SequenceEditor_strips_all_end",
2417 "rna_SequenceEditor_strips_all_get",
2418 nullptr,
2419 nullptr,
2420 "rna_SequenceEditor_strips_all_lookup_string",
2421 nullptr);
2422
2423 prop = RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
2424 RNA_def_property_srna(prop, "StripsTopLevel");
2425 RNA_def_property_collection_sdna(prop, nullptr, "seqbase", nullptr);
2426 RNA_def_property_struct_type(prop, "Strip");
2427 RNA_def_property_ui_text(prop, "Strips", "Top-level strips only");
2428
2429 prop = RNA_def_property(srna, "strips_all", PROP_COLLECTION, PROP_NONE);
2430 RNA_def_property_collection_sdna(prop, nullptr, "seqbase", nullptr);
2431 RNA_def_property_struct_type(prop, "Strip");
2433 prop, "All Strips", "All strips, recursively including those inside metastrips");
2435 "rna_SequenceEditor_strips_all_begin",
2436 "rna_SequenceEditor_strips_all_next",
2437 "rna_SequenceEditor_strips_all_end",
2438 "rna_SequenceEditor_strips_all_get",
2439 nullptr,
2440 nullptr,
2441 "rna_SequenceEditor_strips_all_lookup_string",
2442 nullptr);
2443
2444 prop = RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
2445 RNA_def_property_collection_sdna(prop, nullptr, "metastack", nullptr);
2446 RNA_def_property_struct_type(prop, "Strip");
2448 prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
2450 nullptr,
2451 nullptr,
2452 nullptr,
2453 "rna_SequenceEditor_meta_stack_get",
2454 nullptr,
2455 nullptr,
2456 nullptr,
2457 nullptr);
2458
2459 prop = RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
2460 RNA_def_property_collection_sdna(prop, nullptr, "channels", nullptr);
2461 RNA_def_property_struct_type(prop, "SequenceTimelineChannel");
2462 RNA_def_property_ui_text(prop, "Channels", "");
2463
2464 prop = RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
2465 RNA_def_property_pointer_sdna(prop, nullptr, "act_strip");
2467 RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
2468
2469 prop = RNA_def_property(srna, "selected_retiming_keys", PROP_BOOLEAN, PROP_NONE);
2470 RNA_def_property_ui_text(prop, "Retiming Key Selection Status", "");
2471 RNA_def_property_boolean_funcs(prop, "rna_SequenceEditor_selected_retiming_key_get", nullptr);
2473
2474 prop = RNA_def_property(srna, "show_overlay_frame", PROP_BOOLEAN, PROP_NONE);
2475 RNA_def_property_boolean_sdna(prop, nullptr, "overlay_frame_flag", SEQ_EDIT_OVERLAY_FRAME_SHOW);
2477 prop, "Show Overlay", "Partial overlay on top of the sequencer with a frame offset");
2479
2480 prop = RNA_def_property(srna, "use_overlay_frame_lock", PROP_BOOLEAN, PROP_NONE);
2481 RNA_def_property_boolean_sdna(prop, nullptr, "overlay_frame_flag", SEQ_EDIT_OVERLAY_FRAME_ABS);
2482 RNA_def_property_ui_text(prop, "Overlay Lock", "");
2483 RNA_def_property_boolean_funcs(prop, nullptr, "rna_SequenceEditor_overlay_lock_set");
2485
2486 prop = RNA_def_property(srna, "show_missing_media", PROP_BOOLEAN, PROP_NONE);
2488 prop, nullptr, "show_missing_media_flag", SEQ_EDIT_SHOW_MISSING_MEDIA);
2490 prop, "Show Missing Media", "Render missing images/movies with a solid magenta color");
2491 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
2492
2493 /* access to fixed and relative frame */
2494 prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
2495 RNA_def_property_ui_text(prop, "Overlay Offset", "Number of frames to offset");
2497 "rna_SequenceEditor_overlay_frame_get",
2498 "rna_SequenceEditor_overlay_frame_set",
2499 nullptr);
2501
2502 prop = RNA_def_property(srna, "proxy_storage", PROP_ENUM, PROP_NONE);
2503 RNA_def_property_enum_items(prop, editing_storage_items);
2504 RNA_def_property_ui_text(prop, "Proxy Storage", "How to store proxies for this project");
2506 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
2507
2508 prop = RNA_def_property(srna, "proxy_dir", PROP_STRING, PROP_DIRPATH);
2509 RNA_def_property_string_sdna(prop, nullptr, "proxy_dir");
2510 RNA_def_property_ui_text(prop, "Proxy Directory", "");
2512 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
2513
2514 /* cache flags */
2515
2516 prop = RNA_def_property(srna, "use_cache_raw", PROP_BOOLEAN, PROP_NONE);
2517 RNA_def_property_boolean_sdna(prop, nullptr, "cache_flag", SEQ_CACHE_STORE_RAW);
2519 "Cache Raw",
2520 "Cache raw images read from disk, for faster tweaking of strip "
2521 "parameters at the cost of memory usage");
2522
2523 prop = RNA_def_property(srna, "use_cache_final", PROP_BOOLEAN, PROP_NONE);
2524 RNA_def_property_boolean_sdna(prop, nullptr, "cache_flag", SEQ_CACHE_STORE_FINAL_OUT);
2525 RNA_def_property_ui_text(prop, "Cache Final", "Cache final image for each frame");
2526
2527 prop = RNA_def_property(srna, "use_prefetch", PROP_BOOLEAN, PROP_NONE);
2528 RNA_def_property_boolean_sdna(prop, nullptr, "cache_flag", SEQ_CACHE_PREFETCH_ENABLE);
2530 prop,
2531 "Prefetch Frames",
2532 "Render frames ahead of current frame in the background for faster playback");
2534
2535 prop = RNA_def_property(srna, "cache_raw_size", PROP_INT, PROP_NONE);
2537 RNA_def_property_int_funcs(prop, "rna_SequenceEditor_get_cache_raw_size", nullptr, nullptr);
2538 RNA_def_property_ui_text(prop, "Raw Cache Size", "Size of raw source images cache in megabytes");
2539
2540 prop = RNA_def_property(srna, "cache_final_size", PROP_INT, PROP_NONE);
2542 RNA_def_property_int_funcs(prop, "rna_SequenceEditor_get_cache_final_size", nullptr, nullptr);
2544 prop, "Final Cache Size", "Size of final rendered images cache in megabytes");
2545
2546 /* functions */
2547
2548 func = RNA_def_function(srna, "display_stack", "rna_SequenceEditor_display_stack");
2550 RNA_def_function_ui_description(func, "Display strips stack");
2551 parm = RNA_def_pointer(
2552 func, "meta_sequence", "Strip", "Meta Strip", "Meta to display its stack");
2554}
2555
2557{
2558 PropertyRNA *prop;
2559
2560 static const EnumPropertyItem alpha_mode_items[] = {
2562 "STRAIGHT",
2563 0,
2564 "Straight",
2565 "RGB channels in transparent pixels are unaffected by the alpha channel"},
2567 "PREMUL",
2568 0,
2569 "Premultiplied",
2570 "RGB channels in transparent pixels are multiplied by the alpha channel"},
2571 {0, nullptr, 0, nullptr, nullptr},
2572 };
2573
2574 prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
2575 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_FILTERY);
2576 RNA_def_property_ui_text(prop, "Deinterlace", "Remove fields from video movies");
2577 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_reopen_files_update");
2578
2579 prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
2580 RNA_def_property_enum_items(prop, alpha_mode_items);
2582 prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
2583 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2584
2585 prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
2586 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_FLIPX);
2587 RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
2588 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2589
2590 prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
2591 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_FLIPY);
2592 RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
2593 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2594
2595 prop = RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
2596 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_MAKE_FLOAT);
2597 RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
2598 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2599
2600 prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
2601 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_REVERSE_FRAMES);
2602 RNA_def_property_ui_text(prop, "Reverse Frames", "Reverse frame order");
2604 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2605
2606 prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
2607 RNA_def_property_float_sdna(prop, nullptr, "mul");
2608 RNA_def_property_range(prop, 0.0f, 20.0f);
2610 RNA_def_property_ui_text(prop, "Multiply Colors", "");
2612 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2613
2614 prop = RNA_def_property(srna, "multiply_alpha", PROP_BOOLEAN, PROP_NONE);
2615 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_MULTIPLY_ALPHA);
2616 RNA_def_property_ui_text(prop, "Multiply Alpha", "Multiply alpha along with color channels");
2617 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2618
2619 prop = RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
2620 RNA_def_property_float_sdna(prop, nullptr, "sat");
2621 RNA_def_property_range(prop, 0.0f, 20.0f);
2622 RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
2624 RNA_def_property_ui_text(prop, "Saturation", "Adjust the intensity of the input's color");
2626 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2627
2628 prop = RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
2629 RNA_def_property_range(prop, 1.0f, 30.0f);
2630 RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
2632 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2633
2634 prop = RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
2635 RNA_def_property_pointer_sdna(prop, nullptr, "data->transform");
2636 RNA_def_property_ui_text(prop, "Transform", "");
2637
2638 prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
2639 RNA_def_property_pointer_sdna(prop, nullptr, "data->crop");
2640 RNA_def_property_ui_text(prop, "Crop", "");
2641}
2642
2643static void rna_def_proxy(StructRNA *srna)
2644{
2645 PropertyRNA *prop;
2646
2647 prop = RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
2648 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_USE_PROXY);
2650 prop, "Use Proxy / Timecode", "Use a preview proxy and/or time-code index for this strip");
2651 RNA_def_property_boolean_funcs(prop, nullptr, "rna_Strip_use_proxy_set");
2653 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2654
2655 prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
2656 RNA_def_property_pointer_sdna(prop, nullptr, "data->proxy");
2657 RNA_def_property_ui_text(prop, "Proxy", "");
2658}
2659
2660static void rna_def_input(StructRNA *srna)
2661{
2662 PropertyRNA *prop;
2663
2664 prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED);
2665 RNA_def_property_int_sdna(prop, nullptr, "anim_startofs");
2668 nullptr,
2669 "rna_Strip_anim_startofs_final_set",
2670 "rna_Strip_anim_startofs_final_range"); /* overlap tests */
2671 RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
2673 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2674
2675 prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
2676 RNA_def_property_int_sdna(prop, nullptr, "anim_endofs");
2679 nullptr,
2680 "rna_Strip_anim_endofs_final_set",
2681 "rna_Strip_anim_endofs_final_range"); /* overlap tests */
2682 RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
2684 prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_preprocessed_update");
2685}
2686
2688{
2689 PropertyRNA *prop;
2690
2691 prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
2693 RNA_def_property_int_funcs(prop, "rna_Strip_input_count_get", nullptr, nullptr);
2694
2695 if (count >= 1) {
2696 prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
2697 RNA_def_property_pointer_sdna(prop, nullptr, "input1");
2699 RNA_def_property_pointer_funcs(prop, nullptr, "rna_Strip_input_1_set", nullptr, nullptr);
2700 RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
2701 }
2702
2703 if (count >= 2) {
2704 prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
2705 RNA_def_property_pointer_sdna(prop, nullptr, "input2");
2707 RNA_def_property_pointer_funcs(prop, nullptr, "rna_Strip_input_2_set", nullptr, nullptr);
2708 RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
2709 }
2710}
2711
2713{
2714 PropertyRNA *prop;
2715
2716 prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
2717 RNA_def_property_pointer_sdna(prop, nullptr, "data->colorspace_settings");
2718 RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
2719 RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
2720}
2721
2723{
2724 PropertyRNA *prop;
2725
2726 prop = RNA_def_property(srna, "fps", PROP_FLOAT, PROP_NONE);
2727 RNA_def_property_ui_text(prop, "FPS", "Frames per second");
2729 RNA_def_property_float_funcs(prop, "rna_Strip_fps_get", nullptr, nullptr);
2730}
2731
2733{
2734 PropertyRNA *prop = RNA_def_property(srna, "retiming_keys", PROP_COLLECTION, PROP_NONE);
2735 RNA_def_property_collection_sdna(prop, nullptr, "retiming_keys", nullptr);
2736 RNA_def_property_struct_type(prop, "RetimingKey");
2737 RNA_def_property_ui_text(prop, "Retiming Keys", "");
2739 "rna_Strip_retiming_keys_begin",
2740 "rna_iterator_array_next",
2741 "rna_iterator_array_end",
2742 "rna_iterator_array_get",
2743 "rna_Strip_retiming_keys_length",
2744 nullptr,
2745 nullptr,
2746 nullptr);
2747 RNA_def_property_srna(prop, "RetimingKeys");
2748}
2749
2750static void rna_def_image(BlenderRNA *brna)
2751{
2752 StructRNA *srna;
2753 PropertyRNA *prop;
2754
2755 srna = RNA_def_struct(brna, "ImageStrip", "Strip");
2756 RNA_def_struct_ui_text(srna, "Image Strip", "Sequence strip to load one or more images");
2757 RNA_def_struct_sdna(srna, "Strip");
2758
2759 prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
2760 RNA_def_property_string_sdna(prop, nullptr, "data->dirpath");
2761 RNA_def_property_ui_text(prop, "Directory", "");
2763 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2764
2765 prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
2766 RNA_def_property_collection_sdna(prop, nullptr, "data->stripdata", nullptr);
2767 RNA_def_property_struct_type(prop, "StripElement");
2768 RNA_def_property_ui_text(prop, "Elements", "");
2770 "rna_Strip_elements_begin",
2771 "rna_iterator_array_next",
2772 "rna_iterator_array_end",
2773 "rna_iterator_array_get",
2774 "rna_Strip_elements_length",
2775 nullptr,
2776 nullptr,
2777 nullptr);
2778 RNA_api_strip_elements(brna, prop);
2779
2781
2782 /* multiview */
2783 prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
2784 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_USE_VIEWS);
2785 RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
2786 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_views_format_update");
2787
2788 prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
2789 RNA_def_property_enum_sdna(prop, nullptr, "views_format");
2791 RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views");
2792 RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Strip_views_format_update");
2793
2794 prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
2795 RNA_def_property_pointer_sdna(prop, nullptr, "stereo3d_format");
2797 RNA_def_property_struct_type(prop, "Stereo3dFormat");
2798 RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3D");
2799
2801 rna_def_proxy(srna);
2802 rna_def_input(srna);
2804}
2805
2807{
2808 StructRNA *srna;
2809
2810 srna = RNA_def_struct(brna, "StripsMeta", nullptr);
2811 RNA_def_struct_sdna(srna, "Strip");
2812 RNA_def_struct_ui_text(srna, "Strips", "Collection of Strips");
2813
2814 RNA_api_strips(srna, true);
2815}
2816
2817static void rna_def_meta(BlenderRNA *brna)
2818{
2819 StructRNA *srna;
2820 FunctionRNA *func;
2821 PropertyRNA *prop;
2822
2823 srna = RNA_def_struct(brna, "MetaStrip", "Strip");
2825 srna, "Meta Strip", "Sequence strip to group other strips as a single sequence strip");
2826 RNA_def_struct_sdna(srna, "Strip");
2827
2828 rna_def_strips_meta(brna);
2829
2830 /* DEPRECATED */
2831 prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
2832 RNA_def_property_srna(prop, "StripsMeta");
2833 RNA_def_property_collection_sdna(prop, nullptr, "seqbase", nullptr);
2834 RNA_def_property_struct_type(prop, "Strip");
2836 prop, "Strips", "(Deprecated: Replaced by '.strips') Strips nested in meta strip");
2837
2838 prop = RNA_def_property(srna, "strips", PROP_COLLECTION, PROP_NONE);
2839 RNA_def_property_srna(prop, "StripsMeta");
2840 RNA_def_property_collection_sdna(prop, nullptr, "seqbase", nullptr);
2841 RNA_def_property_struct_type(prop, "Strip");
2842 RNA_def_property_ui_text(prop, "Strips", "Strips nested in meta strip");
2843
2844 prop = RNA_def_property(srna, "channels", PROP_COLLECTION, PROP_NONE);
2845 RNA_def_property_collection_sdna(prop, nullptr, "channels", nullptr);
2846 RNA_def_property_struct_type(prop, "SequenceTimelineChannel");
2847 RNA_def_property_ui_text(prop, "Channels", "");
2848
2849 func = RNA_def_function(srna, "separate", "rna_Strip_separate");
2851 RNA_def_function_ui_description(func, "Separate meta");
2852
2854 rna_def_proxy(srna);
2855 rna_def_input(srna);
2856}
2857
2859{
2860 PropertyRNA *prop;
2861
2862 prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
2863 RNA_def_property_float_sdna(prop, nullptr, "volume");
2864 RNA_def_property_range(prop, 0.0f, 100.0f);
2866 RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
2868 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_audio_update");
2869}
2870
2871static void rna_def_scene(BlenderRNA *brna)
2872{
2873 StructRNA *srna;
2874 PropertyRNA *prop;
2875
2876 static const EnumPropertyItem scene_input_items[] = {
2877 {0, "CAMERA", ICON_VIEW3D, "Camera", "Use the Scene's 3D camera as input"},
2879 "SEQUENCER",
2880 ICON_SEQUENCE,
2881 "Sequencer",
2882 "Use the Scene's Sequencer timeline as input"},
2883 {0, nullptr, 0, nullptr, nullptr},
2884 };
2885
2886 srna = RNA_def_struct(brna, "SceneStrip", "Strip");
2888 srna, "Scene Strip", "Sequence strip using the rendered image of a scene");
2889 RNA_def_struct_sdna(srna, "Strip");
2890
2891 prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
2893 RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
2894 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_scene_switch_update");
2895
2896 prop = RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
2898 RNA_def_property_pointer_funcs(prop, nullptr, nullptr, nullptr, "rna_Camera_object_poll");
2899 RNA_def_property_ui_text(prop, "Camera Override", "Override the scene's active camera");
2900 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2901
2902 prop = RNA_def_property(srna, "scene_input", PROP_ENUM, PROP_NONE);
2903 RNA_def_property_enum_bitflag_sdna(prop, nullptr, "flag");
2904 RNA_def_property_enum_items(prop, scene_input_items);
2905 RNA_def_property_ui_text(prop, "Input", "Input type to use for the Scene strip");
2906 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_use_strip");
2907
2908 prop = RNA_def_property(srna, "use_annotations", PROP_BOOLEAN, PROP_NONE);
2910 RNA_def_property_ui_text(prop, "Use Annotations", "Show Annotations in OpenGL previews");
2911 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
2912
2916 rna_def_proxy(srna);
2917 rna_def_input(srna);
2918 rna_def_movie_types(srna);
2919}
2920
2921static void rna_def_movie(BlenderRNA *brna)
2922{
2923 StructRNA *srna;
2924 PropertyRNA *prop;
2925 FunctionRNA *func;
2926 PropertyRNA *parm;
2927
2928 srna = RNA_def_struct(brna, "MovieStrip", "Strip");
2929 RNA_def_struct_ui_text(srna, "Movie Strip", "Sequence strip to load a video");
2930 RNA_def_struct_sdna(srna, "Strip");
2931
2932 prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
2933 RNA_def_property_int_sdna(prop, nullptr, "streamindex");
2934 RNA_def_property_range(prop, 0, 20);
2936 prop,
2937 "Stream Index",
2938 "For files with several movie streams, use the stream with the given index");
2939 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_reopen_files_update");
2940
2941 prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
2942 RNA_def_property_collection_sdna(prop, nullptr, "data->stripdata", nullptr);
2943 RNA_def_property_struct_type(prop, "StripElement");
2944 RNA_def_property_ui_text(prop, "Elements", "");
2946 "rna_Strip_elements_begin",
2947 "rna_iterator_array_next",
2948 "rna_iterator_array_end",
2949 "rna_iterator_array_get",
2950 "rna_Strip_elements_length",
2951 nullptr,
2952 nullptr,
2953 nullptr);
2954
2956
2957 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
2958 RNA_def_property_ui_text(prop, "File", "");
2960 prop, "rna_Strip_filepath_get", "rna_Strip_filepath_length", "rna_Strip_filepath_set");
2962 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_filepath_update");
2963
2964 func = RNA_def_function(srna, "reload_if_needed", "rna_MovieStrip_reload_if_needed");
2966 /* return type */
2967 parm = RNA_def_boolean(func,
2968 "can_produce_frames",
2969 false,
2970 "True if the strip can produce frames, False otherwise",
2971 "");
2972 RNA_def_function_return(func, parm);
2973
2974 /* metadata */
2975 func = RNA_def_function(srna, "metadata", "rna_MovieStrip_metadata_get");
2977 RNA_def_function_ui_description(func, "Retrieve metadata of the movie file");
2978 /* return type */
2979 parm = RNA_def_pointer(
2980 func, "metadata", "IDPropertyWrapPtr", "", "Dict-like object containing the metadata");
2982 RNA_def_function_return(func, parm);
2983
2984 /* multiview */
2985 prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
2986 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_USE_VIEWS);
2987 RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
2988 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_views_format_update");
2989
2990 prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
2991 RNA_def_property_enum_sdna(prop, nullptr, "views_format");
2993 RNA_def_property_ui_text(prop, "Views Format", "Mode to load movie views");
2994 RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Strip_views_format_update");
2995
2996 prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
2997 RNA_def_property_pointer_sdna(prop, nullptr, "stereo3d_format");
2999 RNA_def_property_struct_type(prop, "Stereo3dFormat");
3000 RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3D");
3001
3003 rna_def_proxy(srna);
3004 rna_def_input(srna);
3006 rna_def_movie_types(srna);
3007}
3008
3010{
3011 StructRNA *srna;
3012 PropertyRNA *prop;
3013
3014 srna = RNA_def_struct(brna, "MovieClipStrip", "Strip");
3016 srna, "MovieClip Strip", "Sequence strip to load a video from the clip editor");
3017 RNA_def_struct_sdna(srna, "Strip");
3018
3019 prop = RNA_def_property(srna, "clip", PROP_POINTER, PROP_NONE);
3021 RNA_def_property_ui_text(prop, "Movie Clip", "Movie clip that this sequence uses");
3022 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3023
3024 prop = RNA_def_property(srna, "undistort", PROP_BOOLEAN, PROP_NONE);
3026 RNA_def_property_ui_text(prop, "Undistort Clip", "Use the undistorted version of the clip");
3027 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3028
3029 prop = RNA_def_property(srna, "stabilize2d", PROP_BOOLEAN, PROP_NONE);
3031 RNA_def_property_ui_text(prop, "Stabilize 2D Clip", "Use the 2D stabilized version of the clip");
3032 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3033
3035 rna_def_input(srna);
3036 rna_def_movie_types(srna);
3037}
3038
3039static void rna_def_mask(BlenderRNA *brna)
3040{
3041 StructRNA *srna;
3042 PropertyRNA *prop;
3043
3044 srna = RNA_def_struct(brna, "MaskStrip", "Strip");
3045 RNA_def_struct_ui_text(srna, "Mask Strip", "Sequence strip to load a video from a mask");
3046 RNA_def_struct_sdna(srna, "Strip");
3047
3048 prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
3050 RNA_def_property_ui_text(prop, "Mask", "Mask that this sequence uses");
3051 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3052
3054 rna_def_input(srna);
3055}
3056
3057static void rna_def_sound(BlenderRNA *brna)
3058{
3059 StructRNA *srna;
3060 PropertyRNA *prop;
3061
3062 srna = RNA_def_struct(brna, "SoundStrip", "Strip");
3064 srna, "Sound Strip", "Sequence strip defining a sound to be played over a period of time");
3065 RNA_def_struct_sdna(srna, "Strip");
3066
3067 prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
3069 RNA_def_property_struct_type(prop, "Sound");
3070 RNA_def_property_ui_text(prop, "Sound", "Sound data-block used by this sequence");
3071 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_sound_update");
3072
3074
3075 prop = RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
3076 RNA_def_property_float_sdna(prop, nullptr, "pan");
3078 RNA_def_property_ui_range(prop, -2, 2, 1, 2);
3079 RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
3081 RNA_def_property_float_funcs(prop, nullptr, nullptr, "rna_Strip_pan_range");
3082 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_audio_update");
3083
3084 prop = RNA_def_property(srna, "sound_offset", PROP_FLOAT, PROP_TIME_ABSOLUTE);
3085 RNA_def_property_float_sdna(prop, nullptr, "sound_offset");
3088 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
3090 prop,
3091 "Sound Offset",
3092 "Offset of the sound from the beginning of the strip, expressed in seconds");
3094 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_audio_update");
3095
3096 prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
3099 prop, "Display Waveform", "Display the audio waveform inside the strip");
3101
3103 rna_def_input(srna);
3104}
3105
3106static void rna_def_effect(BlenderRNA *brna)
3107{
3108 StructRNA *srna;
3109
3110 srna = RNA_def_struct(brna, "EffectStrip", "Strip");
3112 srna,
3113 "Effect Strip",
3114 "Sequence strip applying an effect on the images created by other strips");
3115 RNA_def_struct_sdna(srna, "Strip");
3116
3118 rna_def_proxy(srna);
3119}
3120
3121static void rna_def_multicam(StructRNA *srna)
3122{
3123 PropertyRNA *prop;
3124
3125 prop = RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
3126 RNA_def_property_int_sdna(prop, nullptr, "multicam_source");
3128 RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
3129 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3130
3131 rna_def_input(srna);
3132}
3133
3134static void rna_def_wipe(StructRNA *srna)
3135{
3136 PropertyRNA *prop;
3137
3138 static const EnumPropertyItem wipe_type_items[] = {
3139 {blender::seq::DO_SINGLE_WIPE, "SINGLE", 0, "Single", ""},
3140 {blender::seq::DO_DOUBLE_WIPE, "DOUBLE", 0, "Double", ""},
3141 /* not used yet {DO_BOX_WIPE, "BOX", 0, "Box", ""}, */
3142 /* not used yet {DO_CROSS_WIPE, "CROSS", 0, "Cross", ""}, */
3143 {blender::seq::DO_IRIS_WIPE, "IRIS", 0, "Iris", ""},
3144 {blender::seq::DO_CLOCK_WIPE, "CLOCK", 0, "Clock", ""},
3145 {0, nullptr, 0, nullptr, nullptr},
3146 };
3147
3148 static const EnumPropertyItem wipe_direction_items[] = {
3149 {0, "OUT", 0, "Out", ""},
3150 {1, "IN", 0, "In", ""},
3151 {0, nullptr, 0, nullptr, nullptr},
3152 };
3153
3154 RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
3155
3156 prop = RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_FACTOR);
3157 RNA_def_property_float_sdna(prop, nullptr, "edgeWidth");
3158 RNA_def_property_range(prop, 0.0f, 1.0f);
3160 prop,
3161 "Blur Width",
3162 "Width of the blur for the transition, in percentage relative to the image size");
3163 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3164
3165 prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
3166 RNA_def_property_range(prop, DEG2RADF(-90.0f), DEG2RADF(90.0f));
3167 RNA_def_property_ui_text(prop, "Angle", "Angle of the transition");
3168 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3169
3170 prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
3171 RNA_def_property_enum_sdna(prop, nullptr, "forward");
3172 RNA_def_property_enum_items(prop, wipe_direction_items);
3173 RNA_def_property_ui_text(prop, "Direction", "Whether to fade in or out");
3175 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3176
3177 prop = RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
3178 RNA_def_property_enum_sdna(prop, nullptr, "wipetype");
3179 RNA_def_property_enum_items(prop, wipe_type_items);
3181 RNA_def_property_ui_text(prop, "Transition Type", "");
3182 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3183}
3184
3185static void rna_def_glow(StructRNA *srna)
3186{
3187 PropertyRNA *prop;
3188
3189 RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
3190
3191 prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_FACTOR);
3192 RNA_def_property_float_sdna(prop, nullptr, "fMini");
3193 RNA_def_property_range(prop, 0.0f, 1.0f);
3194 RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
3195 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3196
3197 prop = RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_FACTOR);
3198 RNA_def_property_float_sdna(prop, nullptr, "fClamp");
3199 RNA_def_property_range(prop, 0.0f, 1.0f);
3200 RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
3201 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3202
3203 prop = RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
3204 RNA_def_property_float_sdna(prop, nullptr, "fBoost");
3205 RNA_def_property_range(prop, 0.0f, 10.0f);
3206 RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
3207 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3208
3209 prop = RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
3210 RNA_def_property_float_sdna(prop, nullptr, "dDist");
3211 RNA_def_property_range(prop, 0.5f, 20.0f);
3212 RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
3213 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3214
3215 prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
3216 RNA_def_property_int_sdna(prop, nullptr, "dQuality");
3217 RNA_def_property_range(prop, 1, 5);
3218 RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
3219 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3220
3221 prop = RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
3222 RNA_def_property_boolean_sdna(prop, nullptr, "bNoComp", 0);
3223 RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
3224 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3225}
3226
3228{
3229 PropertyRNA *prop;
3230
3231 static const EnumPropertyItem interpolation_items[] = {
3232 {0, "NONE", 0, "None", "No interpolation"},
3233 {1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation"},
3234 {2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation"},
3235 {0, nullptr, 0, nullptr, nullptr},
3236 };
3237
3238 static const EnumPropertyItem translation_unit_items[] = {
3239 {0, "PIXELS", 0, "Pixels", ""},
3240 {1, "PERCENT", 0, "Percent", ""},
3241 {0, nullptr, 0, nullptr, nullptr},
3242 };
3243
3244 RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
3245
3246 prop = RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
3247 RNA_def_property_float_sdna(prop, nullptr, "ScalexIni");
3248 RNA_def_property_ui_text(prop, "Scale X", "Amount to scale the input in the X axis");
3249 RNA_def_property_ui_range(prop, 0, 10, 3, 6);
3250 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3251
3252 prop = RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
3253 RNA_def_property_float_sdna(prop, nullptr, "ScaleyIni");
3254 RNA_def_property_ui_text(prop, "Scale Y", "Amount to scale the input in the Y axis");
3255 RNA_def_property_ui_range(prop, 0, 10, 3, 6);
3256 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3257
3258 prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
3259 RNA_def_property_boolean_sdna(prop, nullptr, "uniform_scale", 0);
3260 RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
3261 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3262
3263 prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
3264 RNA_def_property_float_sdna(prop, nullptr, "xIni");
3265 RNA_def_property_ui_text(prop, "Translate X", "Amount to move the input on the X axis");
3266 RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
3267 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3268
3269 prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
3270 RNA_def_property_float_sdna(prop, nullptr, "yIni");
3271 RNA_def_property_ui_text(prop, "Translate Y", "Amount to move the input on the Y axis");
3272 RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
3273 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3274
3275 prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
3276 RNA_def_property_float_sdna(prop, nullptr, "rotIni");
3277 RNA_def_property_ui_text(prop, "Rotation", "Degrees to rotate the input");
3278 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3279
3280 prop = RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
3281 RNA_def_property_enum_sdna(prop, nullptr, "percent");
3282 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
3283 RNA_def_property_enum_items(prop, translation_unit_items);
3284 RNA_def_property_ui_text(prop, "Translation Unit", "Unit of measure to translate the input");
3285 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3286
3287 prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
3288 RNA_def_property_enum_items(prop, interpolation_items);
3289 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
3291 prop, "Interpolation", "Method to determine how missing pixels are created");
3292 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3293}
3294
3296{
3297 PropertyRNA *prop;
3298
3299 RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
3300
3301 prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
3302 RNA_def_property_float_sdna(prop, nullptr, "col");
3303 RNA_def_property_ui_text(prop, "Color", "Effect Strip color");
3304 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3305}
3306
3308{
3309 PropertyRNA *prop;
3310
3311 RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
3312
3313 static const EnumPropertyItem speed_control_items[] = {
3315 "STRETCH",
3316 0,
3317 "Stretch",
3318 "Adjust input playback speed, so its duration fits strip length"},
3319 {SEQ_SPEED_MULTIPLY, "MULTIPLY", 0, "Multiply", "Multiply with the speed factor"},
3321 "FRAME_NUMBER",
3322 0,
3323 "Frame Number",
3324 "Frame number of the input strip"},
3325 {SEQ_SPEED_LENGTH, "LENGTH", 0, "Length", "Percentage of the input strip length"},
3326 {0, nullptr, 0, nullptr, nullptr},
3327 };
3328
3329 prop = RNA_def_property(srna, "speed_control", PROP_ENUM, PROP_NONE);
3330 RNA_def_property_enum_sdna(prop, nullptr, "speed_control_type");
3331 RNA_def_property_enum_items(prop, speed_control_items);
3333 RNA_def_property_ui_text(prop, "Speed Control", "Speed control method");
3334 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3335
3336 prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
3337 RNA_def_property_float_sdna(prop, nullptr, "speed_fader");
3339 prop,
3340 "Multiply Factor",
3341 "Multiply the current speed of the sequence with this number or remap current frame "
3342 "to this frame");
3343 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3344
3345 prop = RNA_def_property(srna, "speed_frame_number", PROP_FLOAT, PROP_NONE);
3346 RNA_def_property_float_sdna(prop, nullptr, "speed_fader_frame_number");
3347 RNA_def_property_ui_text(prop, "Frame Number", "Frame number of input strip");
3348 RNA_def_property_ui_range(prop, 0.0, MAXFRAME, 1.0, -1);
3349 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3350
3351 prop = RNA_def_property(srna, "speed_length", PROP_FLOAT, PROP_PERCENTAGE);
3352 RNA_def_property_float_sdna(prop, nullptr, "speed_fader_length");
3353 RNA_def_property_ui_text(prop, "Length", "Percentage of input strip length");
3354 RNA_def_property_ui_range(prop, 0.0, 100.0, 1, -1);
3355 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3356
3357 prop = RNA_def_property(srna, "use_frame_interpolate", PROP_BOOLEAN, PROP_NONE);
3360 prop, "Frame Interpolation", "Do crossfade blending between current and next frame");
3361 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3362}
3363
3365{
3366 PropertyRNA *prop;
3367
3368 RNA_def_struct_sdna_from(srna, "GaussianBlurVars", "effectdata");
3369 prop = RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_UNSIGNED);
3370 RNA_def_property_ui_text(prop, "Size X", "Size of the blur along X axis");
3371 RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
3372 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3373
3374 prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_UNSIGNED);
3375 RNA_def_property_ui_text(prop, "Size Y", "Size of the blur along Y axis");
3376 RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
3377 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3378}
3379
3380static void rna_def_text(StructRNA *srna)
3381{
3382 static const EnumPropertyItem text_alignment_x_items[] = {
3383 {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", ICON_ALIGN_LEFT, "Left", ""},
3384 {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", ICON_ALIGN_CENTER, "Center", ""},
3385 {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", ICON_ALIGN_RIGHT, "Right", ""},
3386 {0, nullptr, 0, nullptr, nullptr},
3387 };
3388
3389 static const EnumPropertyItem text_anchor_x_items[] = {
3390 {SEQ_TEXT_ALIGN_X_LEFT, "LEFT", ICON_ANCHOR_LEFT, "Left", ""},
3391 {SEQ_TEXT_ALIGN_X_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
3392 {SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", ICON_ANCHOR_RIGHT, "Right", ""},
3393 {0, nullptr, 0, nullptr, nullptr},
3394 };
3395
3396 static const EnumPropertyItem text_anchor_y_items[] = {
3397 {SEQ_TEXT_ALIGN_Y_TOP, "TOP", ICON_ANCHOR_TOP, "Top", ""},
3398 {SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", ICON_ANCHOR_CENTER, "Center", ""},
3399 {SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", ICON_ANCHOR_BOTTOM, "Bottom", ""},
3400 {0, nullptr, 0, nullptr, nullptr},
3401 };
3402
3403 PropertyRNA *prop;
3404
3405 RNA_def_struct_sdna_from(srna, "TextVars", "effectdata");
3406
3407 prop = RNA_def_property(srna, "font", PROP_POINTER, PROP_NONE);
3408 RNA_def_property_pointer_sdna(prop, nullptr, "text_font");
3409 RNA_def_property_ui_icon(prop, ICON_FILE_FONT, false);
3411 prop, "Font", "Font of the text. Falls back to the UI font by default.");
3413 RNA_def_property_pointer_funcs(prop, nullptr, "rna_Strip_text_font_set", nullptr, nullptr);
3414 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3415
3416 prop = RNA_def_property(srna, "font_size", PROP_FLOAT, PROP_UNSIGNED);
3417 RNA_def_property_float_sdna(prop, nullptr, "text_size");
3418 RNA_def_property_ui_text(prop, "Size", "Size of the text");
3419 RNA_def_property_range(prop, 0.0, 2000);
3420 RNA_def_property_ui_range(prop, 0.0f, 2000, 10.0f, 1);
3421 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3422
3423 prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
3424 RNA_def_property_float_sdna(prop, nullptr, "color");
3425 RNA_def_property_ui_text(prop, "Color", "Text color");
3426 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3427
3428 prop = RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR_GAMMA);
3429 RNA_def_property_float_sdna(prop, nullptr, "shadow_color");
3430 RNA_def_property_ui_text(prop, "Shadow Color", "");
3431 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3432
3433 prop = RNA_def_property(srna, "shadow_angle", PROP_FLOAT, PROP_ANGLE);
3434 RNA_def_property_float_sdna(prop, nullptr, "shadow_angle");
3435 RNA_def_property_range(prop, 0, M_PI * 2);
3436 RNA_def_property_ui_text(prop, "Shadow Angle", "");
3438 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3439
3440 prop = RNA_def_property(srna, "shadow_offset", PROP_FLOAT, PROP_UNSIGNED);
3441 RNA_def_property_float_sdna(prop, nullptr, "shadow_offset");
3442 RNA_def_property_ui_text(prop, "Shadow Offset", "");
3443 RNA_def_property_float_default(prop, 0.04f);
3444 RNA_def_property_range(prop, 0.0f, 1.0f);
3445 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1.0f, 2);
3446 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3447
3448 prop = RNA_def_property(srna, "shadow_blur", PROP_FLOAT, PROP_UNSIGNED);
3449 RNA_def_property_float_sdna(prop, nullptr, "shadow_blur");
3450 RNA_def_property_ui_text(prop, "Shadow Blur", "");
3452 RNA_def_property_range(prop, 0.0f, 1.0f);
3453 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1.0f, 2);
3454 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3455
3456 prop = RNA_def_property(srna, "outline_color", PROP_FLOAT, PROP_COLOR_GAMMA);
3457 RNA_def_property_float_sdna(prop, nullptr, "outline_color");
3458 RNA_def_property_ui_text(prop, "Outline Color", "");
3459 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3460
3461 prop = RNA_def_property(srna, "outline_width", PROP_FLOAT, PROP_UNSIGNED);
3462 RNA_def_property_float_sdna(prop, nullptr, "outline_width");
3463 RNA_def_property_ui_text(prop, "Outline Width", "");
3464 RNA_def_property_float_default(prop, 0.05f);
3465 RNA_def_property_range(prop, 0.0f, 1.0f);
3466 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 1.0f, 2);
3467 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3468
3469 prop = RNA_def_property(srna, "box_color", PROP_FLOAT, PROP_COLOR_GAMMA);
3470 RNA_def_property_float_sdna(prop, nullptr, "box_color");
3471 RNA_def_property_ui_text(prop, "Box Color", "");
3472 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3473
3474 prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
3475 RNA_def_property_float_sdna(prop, nullptr, "loc");
3476 RNA_def_property_ui_text(prop, "Location", "Location of the text");
3478 RNA_def_property_ui_range(prop, -10.0, 10.0, 1, -1);
3479 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3480
3481 prop = RNA_def_property(srna, "wrap_width", PROP_FLOAT, PROP_NONE);
3482 RNA_def_property_float_sdna(prop, nullptr, "wrap_width");
3483 RNA_def_property_ui_text(prop, "Wrap Width", "Word wrap width as factor, zero disables");
3485 RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
3486 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3487
3488 prop = RNA_def_property(srna, "box_margin", PROP_FLOAT, PROP_NONE);
3489 RNA_def_property_float_sdna(prop, nullptr, "box_margin");
3490 RNA_def_property_ui_text(prop, "Box Margin", "Box margin as factor of image width");
3491 RNA_def_property_range(prop, 0, 1.0);
3492 RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
3493 RNA_def_property_float_default(prop, 0.01f);
3494 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3495
3496 prop = RNA_def_property(srna, "box_roundness", PROP_FLOAT, PROP_NONE);
3497 RNA_def_property_float_sdna(prop, nullptr, "box_roundness");
3498 RNA_def_property_ui_text(prop, "Box Roundness", "Box corner radius as a factor of box height");
3499 RNA_def_property_range(prop, 0, 1.0);
3500 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3501
3502 prop = RNA_def_property(srna, "alignment_x", PROP_ENUM, PROP_NONE);
3503 RNA_def_property_enum_sdna(prop, nullptr, "align");
3504 RNA_def_property_enum_items(prop, text_alignment_x_items);
3505 RNA_def_property_ui_text(prop, "Align X", "Horizontal text alignment");
3506 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3507
3508 prop = RNA_def_property(srna, "anchor_x", PROP_ENUM, PROP_NONE);
3509 RNA_def_property_enum_sdna(prop, nullptr, "anchor_x");
3510 RNA_def_property_enum_items(prop, text_anchor_x_items);
3512 prop, "Anchor X", "Horizontal position of the text box relative to Location");
3513 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3514
3515 prop = RNA_def_property(srna, "anchor_y", PROP_ENUM, PROP_NONE);
3516 RNA_def_property_enum_sdna(prop, nullptr, "anchor_y");
3517 RNA_def_property_enum_items(prop, text_anchor_y_items);
3519 prop, "Anchor Y", "Vertical position of the text box relative to Location");
3520 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3521
3522 prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
3523 RNA_def_property_ui_text(prop, "Text", "Text that will be displayed");
3525 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3526
3527 prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
3528 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_TEXT_SHADOW);
3529 RNA_def_property_ui_text(prop, "Shadow", "Display shadow behind text");
3530 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3531
3532 prop = RNA_def_property(srna, "use_outline", PROP_BOOLEAN, PROP_NONE);
3533 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_TEXT_OUTLINE);
3534 RNA_def_property_ui_text(prop, "Outline", "Display outline around text");
3535 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3536
3537 prop = RNA_def_property(srna, "use_box", PROP_BOOLEAN, PROP_NONE);
3538 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_TEXT_BOX);
3539 RNA_def_property_ui_text(prop, "Box", "Display colored box behind text");
3541 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3542
3543 prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE);
3544 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_TEXT_BOLD);
3545 RNA_def_property_ui_text(prop, "Bold", "Display text as bold");
3546 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3547
3548 prop = RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE);
3549 RNA_def_property_boolean_sdna(prop, nullptr, "flag", SEQ_TEXT_ITALIC);
3550 RNA_def_property_ui_text(prop, "Italic", "Display text as italic");
3551 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3552}
3553
3555{
3556 static const EnumPropertyItem blend_color_items[] = {
3557 {STRIP_TYPE_DARKEN, "DARKEN", 0, "Darken", ""},
3558 {STRIP_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
3559 {STRIP_TYPE_COLOR_BURN, "BURN", 0, "Color Burn", ""},
3560 {STRIP_TYPE_LINEAR_BURN, "LINEAR_BURN", 0, "Linear Burn", ""},
3562 {STRIP_TYPE_LIGHTEN, "LIGHTEN", 0, "Lighten", ""},
3563 {STRIP_TYPE_SCREEN, "SCREEN", 0, "Screen", ""},
3564 {STRIP_TYPE_DODGE, "DODGE", 0, "Color Dodge", ""},
3565 {STRIP_TYPE_ADD, "ADD", 0, "Add", ""},
3567 {STRIP_TYPE_OVERLAY, "OVERLAY", 0, "Overlay", ""},
3568 {STRIP_TYPE_SOFT_LIGHT, "SOFT_LIGHT", 0, "Soft Light", ""},
3569 {STRIP_TYPE_HARD_LIGHT, "HARD_LIGHT", 0, "Hard Light", ""},
3570 {STRIP_TYPE_VIVID_LIGHT, "VIVID_LIGHT", 0, "Vivid Light", ""},
3571 {STRIP_TYPE_LIN_LIGHT, "LINEAR_LIGHT", 0, "Linear Light", ""},
3572 {STRIP_TYPE_PIN_LIGHT, "PIN_LIGHT", 0, "Pin Light", ""},
3574 {STRIP_TYPE_DIFFERENCE, "DIFFERENCE", 0, "Difference", ""},
3575 {STRIP_TYPE_EXCLUSION, "EXCLUSION", 0, "Exclusion", ""},
3576 {STRIP_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
3578 {STRIP_TYPE_HUE, "HUE", 0, "Hue", ""},
3579 {STRIP_TYPE_SATURATION, "SATURATION", 0, "Saturation", ""},
3580 {STRIP_TYPE_BLEND_COLOR, "COLOR", 0, "Color", ""},
3581 {STRIP_TYPE_VALUE, "VALUE", 0, "Value", ""},
3582 {0, nullptr, 0, nullptr, nullptr},
3583 };
3584
3585 PropertyRNA *prop;
3586
3587 RNA_def_struct_sdna_from(srna, "ColorMixVars", "effectdata");
3588
3589 prop = RNA_def_property(srna, "blend_effect", PROP_ENUM, PROP_NONE);
3590 RNA_def_property_enum_sdna(prop, nullptr, "blend_effect");
3591 RNA_def_property_enum_items(prop, blend_color_items);
3593 prop, "Blending Mode", "Method for controlling how the strip combines with other strips");
3594 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3595
3596 prop = RNA_def_property(srna, "factor", PROP_FLOAT, PROP_FACTOR);
3597 RNA_def_property_range(prop, 0.0f, 1.0f);
3599 prop, "Blend Factor", "Percentage of how much the strip's colors affect other strips");
3600 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Strip_invalidate_raw_update");
3601}
3602
3604 {"AddStrip", "Add Strip", "Add Strip", nullptr, 2},
3605 {"AdjustmentStrip",
3606 "Adjustment Layer Strip",
3607 "Sequence strip to perform filter adjustments to layers below",
3609 0},
3610 {"AlphaOverStrip", "Alpha Over Strip", "Alpha Over Strip", nullptr, 2},
3611 {"AlphaUnderStrip", "Alpha Under Strip", "Alpha Under Strip", nullptr, 2},
3612 {"ColorStrip",
3613 "Color Strip",
3614 "Sequence strip creating an image filled with a single color",
3616 0},
3617 {"CrossStrip", "Crossfade Strip", "Crossfade Strip", nullptr, 2},
3618 {"GammaCrossStrip", "Gamma Crossfade Strip", "Gamma Crossfade Strip", nullptr, 2},
3619 {"GlowStrip", "Glow Strip", "Sequence strip creating a glow effect", rna_def_glow, 1},
3620 {"MulticamStrip",
3621 "Multicam Select Strip",
3622 "Sequence strip to perform multicam editing",
3624 0},
3625 {"MultiplyStrip", "Multiply Strip", "Multiply Strip", nullptr, 2},
3626 {"SpeedControlStrip",
3627 "SpeedControl Strip",
3628 "Sequence strip to control the speed of other strips",
3630 1},
3631 {"SubtractStrip", "Subtract Strip", "Subtract Strip", nullptr, 2},
3632 {"TransformStrip",
3633 "Transform Strip",
3634 "Sequence strip applying affine transformations to other strips",
3636 1},
3637 {"WipeStrip", "Wipe Strip", "Sequence strip creating a wipe transition", rna_def_wipe, 2},
3638 {"GaussianBlurStrip",
3639 "Gaussian Blur Strip",
3640 "Sequence strip creating a gaussian blur",
3642 1},
3643 {"TextStrip", "Text Strip", "Sequence strip creating text", rna_def_text, 0},
3644 {"ColorMixStrip", "Color Mix Strip", "Color Mix Strip", rna_def_color_mix, 2},
3645 {"", "", "", nullptr, 0},
3646};
3647
3648static void rna_def_effects(BlenderRNA *brna)
3649{
3650 StructRNA *srna;
3651 EffectInfo *effect;
3652
3653 for (effect = def_effects; effect->struct_name[0] != '\0'; effect++) {
3654 srna = RNA_def_struct(brna, effect->struct_name, "EffectStrip");
3655 RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
3656 RNA_def_struct_sdna(srna, "Strip");
3657
3658 rna_def_effect_inputs(srna, effect->inputs);
3659
3660 if (effect->func) {
3661 effect->func(srna);
3662 }
3663 }
3664}
3665
3667{
3668 StructRNA *srna;
3669 PropertyRNA *prop;
3670
3671 static const EnumPropertyItem mask_input_type_items[] = {
3672 {SEQUENCE_MASK_INPUT_STRIP, "STRIP", 0, "Strip", "Use sequencer strip as mask input"},
3673 {SEQUENCE_MASK_INPUT_ID, "ID", 0, "Mask", "Use mask ID as mask input"},
3674 {0, nullptr, 0, nullptr, nullptr},
3675 };
3676
3677 static const EnumPropertyItem mask_time_items[] = {
3679 "RELATIVE",
3680 0,
3681 "Relative",
3682 "Mask animation is offset to start of strip"},
3684 "ABSOLUTE",
3685 0,
3686 "Absolute",
3687 "Mask animation is in sync with scene frame"},
3688 {0, nullptr, 0, nullptr, nullptr},
3689 };
3690
3691 srna = RNA_def_struct(brna, "StripModifier", nullptr);
3692 RNA_def_struct_sdna(srna, "StripModifierData");
3693 RNA_def_struct_ui_text(srna, "Strip Modifier", "Modifier for sequence strip");
3694 RNA_def_struct_refine_func(srna, "rna_StripModifier_refine");
3695 RNA_def_struct_path_func(srna, "rna_StripModifier_path");
3696
3697 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
3698 RNA_def_property_string_funcs(prop, nullptr, nullptr, "rna_StripModifier_name_set");
3699 RNA_def_property_ui_text(prop, "Name", "");
3700 RNA_def_struct_name_property(srna, prop);
3702
3703 prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
3706 RNA_def_property_ui_text(prop, "Type", "");
3708
3709 prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
3711 RNA_def_property_ui_text(prop, "Mute", "Mute this modifier");
3712 RNA_def_property_ui_icon(prop, ICON_HIDE_OFF, -1);
3713 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3714
3715 prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
3718 RNA_def_property_ui_text(prop, "Expanded", "Mute expanded settings for the modifier");
3719 RNA_def_property_ui_icon(prop, ICON_RIGHTARROW, 1);
3721
3722 prop = RNA_def_property(srna, "input_mask_type", PROP_ENUM, PROP_NONE);
3723 RNA_def_property_enum_sdna(prop, nullptr, "mask_input_type");
3724 RNA_def_property_enum_items(prop, mask_input_type_items);
3725 RNA_def_property_ui_text(prop, "Mask Input Type", "Type of input data used for mask");
3726 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3727
3728 prop = RNA_def_property(srna, "mask_time", PROP_ENUM, PROP_NONE);
3729 RNA_def_property_enum_sdna(prop, nullptr, "mask_time");
3730 RNA_def_property_enum_items(prop, mask_time_items);
3731 RNA_def_property_ui_text(prop, "Mask Time", "Time to use for the Mask animation");
3732 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3733
3734 prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE);
3735 RNA_def_property_pointer_sdna(prop, nullptr, "mask_strip");
3737 prop, nullptr, "rna_StripModifier_strip_set", nullptr, "rna_StripModifier_otherStrip_poll");
3739 RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier");
3740 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3741
3742 prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE);
3743 RNA_def_property_pointer_sdna(prop, nullptr, "mask_id");
3745 RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier");
3746 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3747}
3748
3750{
3751 StructRNA *srna;
3752 PropertyRNA *prop;
3753
3754 srna = RNA_def_struct(brna, "ColorBalanceModifier", "StripModifier");
3755 RNA_def_struct_sdna(srna, "ColorBalanceModifierData");
3757 srna, "ColorBalanceModifier", "Color balance modifier for sequence strip");
3758
3759 prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
3760 RNA_def_property_struct_type(prop, "StripColorBalanceData");
3761
3762 prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
3763 RNA_def_property_float_sdna(prop, nullptr, "color_multiply");
3764 RNA_def_property_range(prop, 0.0f, 20.0f);
3766 RNA_def_property_ui_text(prop, "Multiply Colors", "Multiply the intensity of each pixel");
3767 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3768}
3769
3771{
3772 StructRNA *srna;
3773 PropertyRNA *prop;
3774
3775 srna = RNA_def_struct(brna, "WhiteBalanceModifier", "StripModifier");
3776 RNA_def_struct_sdna(srna, "WhiteBalanceModifierData");
3778 srna, "WhiteBalanceModifier", "White balance modifier for sequence strip");
3779
3780 prop = RNA_def_property(srna, "white_value", PROP_FLOAT, PROP_COLOR_GAMMA);
3781 RNA_def_property_range(prop, 0.0, 1.0);
3782 RNA_def_property_float_sdna(prop, nullptr, "white_value");
3783 RNA_def_property_ui_text(prop, "White Value", "This color defines white in the strip");
3784 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3785}
3786
3788{
3789 StructRNA *srna;
3790 PropertyRNA *prop;
3791
3792 srna = RNA_def_struct(brna, "CurvesModifier", "StripModifier");
3793 RNA_def_struct_sdna(srna, "CurvesModifierData");
3794 RNA_def_struct_ui_text(srna, "CurvesModifier", "RGB curves modifier for sequence strip");
3795
3796 prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
3797 RNA_def_property_pointer_sdna(prop, nullptr, "curve_mapping");
3798 RNA_def_property_struct_type(prop, "CurveMapping");
3799 RNA_def_property_ui_text(prop, "Curve Mapping", "");
3800 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3801}
3802
3804{
3805 StructRNA *srna;
3806 PropertyRNA *prop;
3807
3808 srna = RNA_def_struct(brna, "HueCorrectModifier", "StripModifier");
3809 RNA_def_struct_sdna(srna, "HueCorrectModifierData");
3810 RNA_def_struct_ui_text(srna, "HueCorrectModifier", "Hue correction modifier for sequence strip");
3811
3812 prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
3813 RNA_def_property_pointer_sdna(prop, nullptr, "curve_mapping");
3814 RNA_def_property_struct_type(prop, "CurveMapping");
3815 RNA_def_property_ui_text(prop, "Curve Mapping", "");
3816 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3817}
3818
3820{
3821 StructRNA *srna;
3822 PropertyRNA *prop;
3823
3824 srna = RNA_def_struct(brna, "BrightContrastModifier", "StripModifier");
3825 RNA_def_struct_sdna(srna, "BrightContrastModifierData");
3827 srna, "BrightContrastModifier", "Bright/contrast modifier data for sequence strip");
3828
3829 prop = RNA_def_property(srna, "bright", PROP_FLOAT, PROP_UNSIGNED);
3830 RNA_def_property_float_sdna(prop, nullptr, "bright");
3832 RNA_def_property_ui_text(prop, "Brightness", "Adjust the luminosity of the colors");
3833 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3834
3835 prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_UNSIGNED);
3836 RNA_def_property_float_sdna(prop, nullptr, "contrast");
3837 RNA_def_property_range(prop, -100.0f, 100.0f);
3838 RNA_def_property_ui_text(prop, "Contrast", "Adjust the difference in luminosity between pixels");
3839 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3840}
3841
3843{
3844 StructRNA *srna;
3845 PropertyRNA *prop;
3846
3847 static const EnumPropertyItem type_items[] = {
3848 {SEQ_TONEMAP_RD_PHOTORECEPTOR, "RD_PHOTORECEPTOR", 0, "R/D Photoreceptor", ""},
3849 {SEQ_TONEMAP_RH_SIMPLE, "RH_SIMPLE", 0, "Rh Simple", ""},
3850 {0, nullptr, 0, nullptr, nullptr},
3851 };
3852
3853 srna = RNA_def_struct(brna, "SequencerTonemapModifierData", "StripModifier");
3854 RNA_def_struct_sdna(srna, "SequencerTonemapModifierData");
3855 RNA_def_struct_ui_text(srna, "SequencerTonemapModifierData", "Tone mapping modifier");
3856
3857 prop = RNA_def_property(srna, "tonemap_type", PROP_ENUM, PROP_NONE);
3858 RNA_def_property_enum_sdna(prop, nullptr, "type");
3859 RNA_def_property_enum_items(prop, type_items);
3860 RNA_def_property_ui_text(prop, "Tonemap Type", "Tone mapping algorithm");
3861 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3862
3863 prop = RNA_def_property(srna, "key", PROP_FLOAT, PROP_FACTOR);
3864 RNA_def_property_range(prop, 0.0f, 1.0f);
3865 RNA_def_property_ui_text(prop, "Key", "The value the average luminance is mapped to");
3866 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3867
3868 prop = RNA_def_property(srna, "offset", PROP_FLOAT, PROP_NONE);
3869 RNA_def_property_range(prop, 0.001f, 10.0f);
3871 prop,
3872 "Offset",
3873 "Normally always 1, but can be used as an extra control to alter the brightness curve");
3874 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3875
3876 prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_NONE);
3877 RNA_def_property_range(prop, 0.001f, 3.0f);
3878 RNA_def_property_ui_text(prop, "Gamma", "If not used, set to 1");
3879 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3880
3881 prop = RNA_def_property(srna, "intensity", PROP_FLOAT, PROP_NONE);
3882 RNA_def_property_range(prop, -8.0f, 8.0f);
3884 prop, "Intensity", "If less than zero, darkens image; otherwise, makes it brighter");
3885 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3886
3887 prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_FACTOR);
3888 RNA_def_property_range(prop, 0.0f, 1.0f);
3889 RNA_def_property_ui_text(prop, "Contrast", "Set to 0 to use estimate from input image");
3890 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3891
3892 prop = RNA_def_property(srna, "adaptation", PROP_FLOAT, PROP_FACTOR);
3893 RNA_def_property_range(prop, 0.0f, 1.0f);
3894 RNA_def_property_ui_text(prop, "Adaptation", "If 0, global; if 1, based on pixel intensity");
3895 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3896
3897 prop = RNA_def_property(srna, "correction", PROP_FLOAT, PROP_FACTOR);
3898 RNA_def_property_range(prop, 0.0f, 1.0f);
3900 prop, "Color Correction", "If 0, same for all channels; if 1, each independent");
3901 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_update");
3902}
3903
3915
3917{
3918 StructRNA *srna;
3919 PropertyRNA *prop;
3920
3921 /* Define Sound EQ */
3922 srna = RNA_def_struct(brna, "EQCurveMappingData", nullptr);
3923 RNA_def_struct_sdna(srna, "EQCurveMappingData");
3924 RNA_def_struct_ui_text(srna, "EQCurveMappingData", "EQCurveMappingData");
3925
3926 prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
3927 RNA_def_property_pointer_sdna(prop, nullptr, "curve_mapping");
3928 RNA_def_property_struct_type(prop, "CurveMapping");
3929 RNA_def_property_ui_text(prop, "Curve Mapping", "");
3931 prop, NC_SCENE | ND_SEQUENCER, "rna_StripModifier_EQCurveMapping_update");
3932}
3933
3935{
3936 StructRNA *srna;
3937 PropertyRNA *prop;
3938 FunctionRNA *func;
3939 PropertyRNA *parm;
3940
3941 srna = RNA_def_struct(brna, "SoundEqualizerModifier", "StripModifier");
3942 RNA_def_struct_sdna(srna, "SoundEqualizerModifierData");
3943 RNA_def_struct_ui_text(srna, "SoundEqualizerModifier", "Equalize audio");
3944
3945 /* Sound Equalizers. */
3946 prop = RNA_def_property(srna, "graphics", PROP_COLLECTION, PROP_NONE);
3947 RNA_def_property_struct_type(prop, "EQCurveMappingData");
3949 prop, "Graphical definition equalization", "Graphical definition equalization");
3950
3951 /* Add band. */
3952 func = RNA_def_function(srna, "new_graphic", "rna_Strip_SoundEqualizer_Curve_add");
3954 RNA_def_function_ui_description(func, "Add a new EQ band");
3955
3956 parm = RNA_def_float(func,
3957 "min_freq",
3959 0.0,
3960 SOUND_EQUALIZER_DEFAULT_MAX_FREQ, /* Hard min and max */
3961 "Minimum Frequency",
3962 "Minimum Frequency",
3963 0.0,
3964 SOUND_EQUALIZER_DEFAULT_MAX_FREQ); /* Soft min and max */
3966 parm = RNA_def_float(func,
3967 "max_freq",
3969 0.0,
3970 SOUND_EQUALIZER_DEFAULT_MAX_FREQ, /* Hard min and max */
3971 "Maximum Frequency",
3972 "Maximum Frequency",
3973 0.0,
3974 SOUND_EQUALIZER_DEFAULT_MAX_FREQ); /* Soft min and max */
3976
3977 /* return type */
3978 parm = RNA_def_pointer(func,
3979 "graphic_eqs",
3980 "EQCurveMappingData",
3981 "",
3982 "Newly created graphical Equalizer definition");
3983 RNA_def_function_return(func, parm);
3984
3985 /* clear all modifiers */
3986 func = RNA_def_function(srna, "clear_soundeqs", "rna_Strip_SoundEqualizer_Curve_clear");
3989 "Remove all graphical equalizers from the Equalizer modifier");
3990
3992}
3993
3998
4000{
4002
4005 rna_def_strip_proxy(brna);
4007 rna_def_strip_crop(brna);
4009
4010 rna_def_strip(brna);
4011 rna_def_editor(brna);
4012 rna_def_channel(brna);
4013
4014 rna_def_image(brna);
4015 rna_def_meta(brna);
4016 rna_def_scene(brna);
4017 rna_def_movie(brna);
4018 rna_def_movieclip(brna);
4019 rna_def_mask(brna);
4020 rna_def_sound(brna);
4021 rna_def_effect(brna);
4022 rna_def_effects(brna);
4023 rna_def_modifiers(brna);
4025
4027}
4028
4029#endif
AnimData * BKE_animdata_from_id(const ID *id)
Definition anim_data.cc:82
void BKE_animdata_fix_paths_rename_all(struct ID *ref_id, const char *prefix, const char *oldName, const char *newName)
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)
Scene * CTX_data_scene(const bContext *C)
void id_us_plus(ID *id)
Definition lib_id.cc:353
void BKE_report(ReportList *reports, eReportType type, const char *message)
Definition report.cc:126
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
Definition listbase.cc:586
#define LISTBASE_FOREACH(type, var, list)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
#define DEG2RADF(_deg)
#define M_PI
#define FILE_MAX
#define BLI_path_join(...)
void void void BLI_path_split_file_part(const char *filepath, char *file, size_t file_maxncpy) ATTR_NONNULL(1
void BLI_path_split_dir_file(const char *filepath, char *dir, size_t dir_maxncpy, char *file, size_t file_maxncpy) ATTR_NONNULL(1
#define SNPRINTF(dst, format,...)
Definition BLI_string.h:599
char * STRNCPY(char(&dst)[N], const char *src)
Definition BLI_string.h:688
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
#define STRNCPY_UTF8(dst, src)
#define BLI_STR_UTF8_MULTIPLICATION_SIGN
void BLI_uniquename(const struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
#define CLAMP(a, b, c)
#define UNUSED_FUNCTION(x)
#define ELEM(...)
#define BLT_I18NCONTEXT_ID_SEQUENCE
#define BLT_I18NCONTEXT_ID_SOUND
#define BLT_I18NCONTEXT_ID_MOVIECLIP
#define BLT_I18NCONTEXT_EDITOR_FILEBROWSER
void DEG_id_tag_update(ID *id, unsigned int flags)
void DEG_relations_tag_update(Main *bmain)
@ ID_RECALC_AUDIO
Definition DNA_ID.h:1040
@ ID_RECALC_SYNC_TO_EVAL
Definition DNA_ID.h:1026
@ ID_RECALC_SEQUENCER_STRIPS
Definition DNA_ID.h:1030
#define MINFRAME
#define MAXFRAME
@ SEQUENCE_MASK_INPUT_STRIP
@ SEQUENCE_MASK_INPUT_ID
@ SEQ_BLEND_REPLACE
@ SEQ_CACHE_STORE_RAW
@ SEQ_CACHE_STORE_FINAL_OUT
@ SEQ_CACHE_PREFETCH_ENABLE
@ SEQ_MOVIECLIP_RENDER_UNDISTORTED
@ SEQ_MOVIECLIP_RENDER_STABILIZED
@ SEQ_PROXY_SKIP_EXISTING
@ SEQ_FILTERY
@ SEQ_REVERSE_FRAMES
@ SEQ_FLIPX
@ SEQ_RIGHTSEL
@ SEQ_MAKE_FLOAT
@ SEQ_SCENE_STRIPS
@ SEQ_USE_PROXY
@ SEQ_USE_EFFECT_DEFAULT_FADE
@ SEQ_FLIPY
@ SEQ_MULTIPLY_ALPHA
@ SEQ_SHOW_RETIMING
@ SEQ_USE_VIEWS
@ SEQ_USE_LINEAR_MODIFIERS
@ SEQ_SCENE_NO_ANNOTATION
@ SEQ_AUDIO_DRAW_WAVEFORM
@ SEQ_LEFTSEL
@ SEQ_TEXT_ITALIC
@ SEQ_TEXT_SHADOW
@ SEQ_TEXT_BOLD
@ SEQ_TEXT_OUTLINE
@ SEQ_TEXT_BOX
@ SEQ_EDIT_SHOW_MISSING_MEDIA
@ SEQ_EDIT_PROXY_DIR_STORAGE
@ SEQ_TRANSFORM_FILTER_CUBIC_BSPLINE
@ SEQ_TRANSFORM_FILTER_AUTO
@ SEQ_TRANSFORM_FILTER_CUBIC_MITCHELL
@ SEQ_TRANSFORM_FILTER_BILINEAR
@ SEQ_TRANSFORM_FILTER_BOX
@ SEQ_TRANSFORM_FILTER_NEAREST
@ SEQ_TEXT_ALIGN_X_RIGHT
@ SEQ_TEXT_ALIGN_X_CENTER
@ SEQ_TEXT_ALIGN_X_LEFT
@ STRIP_TYPE_SCREEN
@ STRIP_TYPE_GAUSSIAN_BLUR
@ STRIP_TYPE_EXCLUSION
@ STRIP_TYPE_GAMCROSS
@ STRIP_TYPE_SCENE
@ STRIP_TYPE_MOVIECLIP
@ STRIP_TYPE_LIN_LIGHT
@ STRIP_TYPE_COLORMIX
@ STRIP_TYPE_WIPE
@ STRIP_TYPE_OVERLAY
@ STRIP_TYPE_TEXT
@ STRIP_TYPE_SOUND_HD
@ STRIP_TYPE_SOUND_RAM
@ STRIP_TYPE_DARKEN
@ STRIP_TYPE_HARD_LIGHT
@ STRIP_TYPE_ADD
@ STRIP_TYPE_COLOR_BURN
@ STRIP_TYPE_HUE
@ STRIP_TYPE_LIGHTEN
@ STRIP_TYPE_TRANSFORM
@ STRIP_TYPE_IMAGE
@ STRIP_TYPE_BLEND_COLOR
@ STRIP_TYPE_MOVIE
@ STRIP_TYPE_GLOW
@ STRIP_TYPE_DODGE
@ STRIP_TYPE_SUB
@ STRIP_TYPE_MUL
@ STRIP_TYPE_SPEED
@ STRIP_TYPE_VALUE
@ STRIP_TYPE_COLOR
@ STRIP_TYPE_ADJUSTMENT
@ STRIP_TYPE_SOFT_LIGHT
@ STRIP_TYPE_META
@ STRIP_TYPE_LINEAR_BURN
@ STRIP_TYPE_MULTICAM
@ STRIP_TYPE_MASK
@ STRIP_TYPE_ALPHAUNDER
@ STRIP_TYPE_CROSS
@ STRIP_TYPE_SATURATION
@ STRIP_TYPE_PIN_LIGHT
@ STRIP_TYPE_ALPHAOVER
@ STRIP_TYPE_DIFFERENCE
@ STRIP_TYPE_VIVID_LIGHT
@ STRIP_COLOR_NONE
@ STRIP_COLOR_03
@ STRIP_COLOR_01
@ STRIP_COLOR_04
@ STRIP_COLOR_06
@ STRIP_COLOR_02
@ STRIP_COLOR_08
@ STRIP_COLOR_09
@ STRIP_COLOR_07
@ STRIP_COLOR_05
@ SEQ_SPEED_STRETCH
@ SEQ_SPEED_MULTIPLY
@ SEQ_SPEED_LENGTH
@ SEQ_SPEED_FRAME_NUMBER
@ SEQ_CHANNEL_MUTE
@ SEQ_CHANNEL_LOCK
struct StripModifierData StripModifierData
@ seqModifierType_Curves
@ seqModifierType_WhiteBalance
@ seqModifierType_BrightContrast
@ seqModifierType_ColorBalance
@ seqModifierType_SoundEqualizer
@ seqModifierType_HueCorrect
@ seqModifierType_Tonemap
@ SEQ_TONEMAP_RD_PHOTORECEPTOR
@ SEQ_TONEMAP_RH_SIMPLE
@ SEQUENCE_MASK_TIME_RELATIVE
@ SEQUENCE_MASK_TIME_ABSOLUTE
@ SEQ_COLOR_BALANCE_INVERSE_GAIN
@ SEQ_COLOR_BALANCE_INVERSE_LIFT
@ SEQ_COLOR_BALANCE_INVERSE_SLOPE
@ SEQ_COLOR_BALANCE_INVERSE_POWER
@ SEQ_COLOR_BALANCE_INVERSE_OFFSET
@ SEQ_COLOR_BALANCE_INVERSE_GAMMA
@ SEQ_PROXY_IMAGE_SIZE_100
@ SEQ_PROXY_IMAGE_SIZE_25
@ SEQ_PROXY_IMAGE_SIZE_50
@ SEQ_PROXY_IMAGE_SIZE_75
@ SEQ_COLOR_BALANCE_METHOD_LIFTGAMMAGAIN
@ SEQ_COLOR_BALANCE_METHOD_SLOPEOFFSETPOWER
@ SEQ_PROXY_TC_RECORD_RUN_NO_GAPS
@ SEQ_PROXY_TC_RECORD_RUN
@ SEQ_PROXY_TC_NONE
@ SEQ_EDIT_OVERLAY_FRAME_ABS
@ SEQ_EDIT_OVERLAY_FRAME_SHOW
struct Strip Strip
#define STRIP_FONT_NOT_LOADED
@ SEQ_SPEED_USE_INTERPOLATION
@ SEQ_TEXT_ALIGN_Y_BOTTOM
@ SEQ_TEXT_ALIGN_Y_TOP
@ SEQ_TEXT_ALIGN_Y_CENTER
@ SEQ_STORAGE_PROXY_CUSTOM_FILE
@ SEQ_STORAGE_PROXY_CUSTOM_DIR
@ SEQUENCE_MODIFIER_MUTE
@ SEQUENCE_MODIFIER_EXPANDED
@ SEQ_ALPHA_PREMUL
@ SEQ_ALPHA_STRAIGHT
ParameterFlag
Definition RNA_types.hh:510
@ PARM_RNAPTR
Definition RNA_types.hh:513
@ PARM_REQUIRED
Definition RNA_types.hh:511
@ FUNC_USE_REPORTS
Definition RNA_types.hh:805
@ FUNC_USE_MAIN
Definition RNA_types.hh:803
@ FUNC_USE_CONTEXT
Definition RNA_types.hh:804
@ FUNC_USE_SELF_ID
Definition RNA_types.hh:792
@ PROP_FLOAT
Definition RNA_types.hh:152
@ PROP_BOOLEAN
Definition RNA_types.hh:150
@ PROP_ENUM
Definition RNA_types.hh:154
@ PROP_INT
Definition RNA_types.hh:151
@ PROP_STRING
Definition RNA_types.hh:153
@ PROP_POINTER
Definition RNA_types.hh:155
@ PROP_COLLECTION
Definition RNA_types.hh:156
#define RNA_ENUM_ITEM_SEPR
Definition RNA_types.hh:645
PropertyFlag
Definition RNA_types.hh:286
@ PROP_THICK_WRAP
Definition RNA_types.hh:397
@ PROP_ANIMATABLE
Definition RNA_types.hh:305
@ PROP_PATH_SUPPORTS_BLEND_RELATIVE
Definition RNA_types.hh:430
@ PROP_EDITABLE
Definition RNA_types.hh:292
@ PROP_NEVER_NULL
Definition RNA_types.hh:351
@ PROP_NO_DEG_UPDATE
Definition RNA_types.hh:413
@ PROP_ID_SELF_CHECK
Definition RNA_types.hh:344
@ PROP_TEXTEDIT_UPDATE
Definition RNA_types.hh:312
@ PROP_TIME
Definition RNA_types.hh:241
@ PROP_XYZ
Definition RNA_types.hh:257
@ PROP_FILENAME
Definition RNA_types.hh:226
@ PROP_PIXEL
Definition RNA_types.hh:236
@ PROP_ANGLE
Definition RNA_types.hh:240
@ PROP_TIME_ABSOLUTE
Definition RNA_types.hh:242
@ PROP_NONE
Definition RNA_types.hh:221
@ PROP_DIRPATH
Definition RNA_types.hh:225
@ PROP_PERCENTAGE
Definition RNA_types.hh:238
@ PROP_FACTOR
Definition RNA_types.hh:239
@ PROP_COLOR_GAMMA
Definition RNA_types.hh:260
@ PROP_UNSIGNED
Definition RNA_types.hh:237
@ PROP_FILEPATH
Definition RNA_types.hh:224
#define C
Definition RandGen.cpp:29
#define SOUND_EQUALIZER_DEFAULT_MAX_FREQ
Definition SEQ_sound.hh:30
#define SOUND_EQUALIZER_DEFAULT_MIN_FREQ
Definition SEQ_sound.hh:29
#define ND_SEQUENCER
Definition WM_types.hh:434
#define ND_SPACE_SEQUENCER
Definition WM_types.hh:532
#define ND_DISPLAY
Definition WM_types.hh:488
#define NC_SCENE
Definition WM_types.hh:375
ReportList * reports
Definition WM_types.hh:1025
#define NC_IMAGE
Definition WM_types.hh:381
#define NC_SPACE
Definition WM_types.hh:389
#define NA_SELECTED
Definition WM_types.hh:586
BMesh const char void * data
SIMD_FORCE_INLINE btVector3 transform(const btVector3 &point) const
int64_t size() const
Definition BLI_map.hh:976
void append(const T &value)
#define SELECT
#define offsetof(t, d)
#define input
int count
void * MEM_callocN(size_t len, const char *str)
Definition mallocn.cc:118
size_t(* MEM_allocN_len)(const void *vmemh)
Definition mallocn.cc:36
void MEM_freeN(void *vmemh)
Definition mallocn.cc:113
#define G(x, y, z)
void MOV_close(MovieReader *anim)
Definition movie_read.cc:58
IDProperty * MOV_load_metadata(MovieReader *anim)
Definition movie_read.cc:78
void prefetch_stop(Scene *scene)
Definition prefetch.cc:283
int time_right_handle_frame_get(const Scene *scene, const Strip *strip)
size_t final_image_cache_calc_memory_size(const Scene *scene)
void add_movie_reload_if_needed(Main *bmain, Scene *scene, Strip *strip, bool *r_was_reloaded, bool *r_can_produce_frames)
Definition strip_add.cc:691
void relations_invalidate_cache(Scene *scene, Strip *strip)
void retiming_key_timeline_frame_set(const Scene *scene, Strip *strip, SeqRetimingKey *key, const int timeline_frame)
Strip * lookup_strip_by_name(Editing *ed, const char *key)
void edit_remove_flagged_strips(Scene *scene, ListBase *seqbase)
bool relations_render_loop_check(Strip *strip_main, Strip *strip)
int retiming_keys_count(const Strip *strip)
void edit_flag_for_removal(Scene *scene, ListBase *seqbase, Strip *strip)
void transform_translate_strip(Scene *evil_scene, Strip *strip, int delta)
blender::Map< SeqRetimingKey *, Strip * > retiming_selection_get(const Editing *ed)
static void query_all_strips_recursive(const ListBase *seqbase, VectorSet< Strip * > &strips)
Definition iterator.cc:101
void strip_channel_set(Strip *strip, int channel)
bool transform_test_overlap(const Scene *scene, Strip *strip1, Strip *strip2)
Editing * editing_get(const Scene *scene)
Definition sequencer.cc:272
Strip * strip_from_strip_elem(ListBase *seqbase, StripElem *se)
ListBase * get_seqbase_by_strip(const Scene *scene, Strip *strip)
void meta_stack_set(const Scene *scene, Strip *dst)
Definition sequencer.cc:461
float time_strip_fps_get(Scene *scene, Strip *strip)
void edit_strip_name_set(Scene *scene, Strip *strip, const char *new_name)
void retiming_remove_key(Strip *strip, SeqRetimingKey *key)
void modifier_unique_name(Strip *strip, StripModifierData *smd)
int time_left_handle_frame_get(const Scene *, const Strip *strip)
void relations_invalidate_cache_raw(Scene *scene, Strip *strip)
float time_start_frame_get(const Strip *strip)
int sequence_supports_modifiers(Strip *strip)
Strip * lookup_strip_by_channel_owner(Editing *ed, const SeqTimelineChannel *channel)
int time_strip_length_get(const Scene *scene, const Strip *strip)
void proxy_set(Strip *strip, bool value)
Definition proxy.cc:601
void add_reload_new_file(Main *bmain, Scene *scene, Strip *strip, const bool lock_range)
Definition strip_add.cc:529
constexpr int MAX_CHANNELS
void sound_equalizermodifier_free(StripModifierData *smd)
EQCurveMappingData * sound_equalizermodifier_add_graph(SoundEqualizerModifierData *semd, float min_freq, float max_freq)
void for_each_callback(ListBase *seqbase, ForEachFunc callback, void *user_data)
Definition iterator.cc:59
bool transform_seqbase_shuffle_ex(ListBase *seqbasep, Strip *test, Scene *evil_scene, int channel_delta)
void sound_update_bounds(Scene *scene, Strip *strip)
bool modifier_remove(Strip *strip, StripModifierData *smd)
void modifier_clear(Strip *strip)
void select_active_set(Scene *scene, Strip *strip)
ListBase * get_channels_by_strip(Editing *ed, const Strip *strip)
Definition channels.cc:91
void cache_cleanup(Scene *scene)
StripModifierData * modifier_new(Strip *strip, const char *name, int type)
bool transform_is_locked(ListBase *channels, const Strip *strip)
void strip_unique_name_set(Scene *scene, ListBase *seqbasep, Strip *strip)
void effect_text_font_unload(TextVars *data, const bool do_id_user)
void time_left_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
void time_right_handle_frame_set(const Scene *scene, Strip *strip, int timeline_frame)
size_t source_image_cache_calc_memory_size(const Scene *scene)
void relations_free_imbuf(Scene *scene, ListBase *seqbase, bool for_render)
bool transform_seqbase_shuffle(ListBase *seqbasep, Strip *test, Scene *evil_scene)
bool exists_in_seqbase(const Strip *strip, const ListBase *seqbase)
bool edit_move_strip_to_seqbase(Scene *scene, ListBase *seqbase, Strip *strip, ListBase *dst_seqbase)
int effect_get_num_inputs(int strip_type)
Definition effects.cc:286
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void rna_iterator_array_begin(CollectionPropertyIterator *iter, PointerRNA *ptr, void *data, int itemsize, int length, bool free_ptr, IteratorSkipFunc skip)
const PointerRNA PointerRNA_NULL
void rna_pointer_create_with_ancestors(const PointerRNA &parent, StructRNA *type, void *data, PointerRNA &r_ptr)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
PointerRNA RNA_pointer_create_with_parent(const PointerRNA &parent, StructRNA *type, void *data)
static void rna_def_text(BlenderRNA *brna)
void RNA_def_property_boolean_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_struct_name_property(StructRNA *srna, PropertyRNA *prop)
PropertyRNA * RNA_def_string(StructOrFunctionRNA *cont_, const char *identifier, const char *default_value, const int maxlen, const char *ui_name, const char *ui_description)
void RNA_def_struct_refine_func(StructRNA *srna, const char *refine)
void RNA_def_property_pointer_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_struct_path_func(StructRNA *srna, const char *path)
void RNA_def_parameter_clear_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const char *length, const char *set)
void RNA_def_property_float_default(PropertyRNA *prop, float value)
void RNA_def_function_return(FunctionRNA *func, PropertyRNA *ret)
void RNA_def_property_enum_default(PropertyRNA *prop, int value)
void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
void RNA_def_property_string_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_icon(PropertyRNA *prop, int icon, int consecutive)
void RNA_def_property_srna(PropertyRNA *prop, const char *type)
PropertyRNA * RNA_def_float(StructOrFunctionRNA *cont_, const char *identifier, const float default_value, const float hardmin, const float hardmax, const char *ui_name, const char *ui_description, const float softmin, const float softmax)
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)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const char *set)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item)
void RNA_def_struct_sdna(StructRNA *srna, const char *structname)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_property_range(PropertyRNA *prop, double min, double max)
PropertyRNA * RNA_def_pointer(StructOrFunctionRNA *cont_, const char *identifier, const char *type, const char *ui_name, const char *ui_description)
void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
void RNA_def_struct_sdna_from(StructRNA *srna, const char *structname, const char *propname)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_property_collection_sdna(PropertyRNA *prop, const char *structname, const char *propname, const char *lengthpropname)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char *set, const char *item)
void RNA_def_property_editable_func(PropertyRNA *prop, const char *editable)
void RNA_def_property_enum_bitflag_sdna(PropertyRNA *prop, const char *structname, const char *propname)
StructRNA * RNA_def_struct(BlenderRNA *brna, const char *identifier, const char *from)
void RNA_def_function_flag(FunctionRNA *func, int flag)
void RNA_def_property_clear_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const char *set, const char *type_fn, const char *poll)
void RNA_def_property_enum_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *set, const char *range)
void RNA_def_struct_ui_icon(StructRNA *srna, int icon)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_struct_idprops_func(StructRNA *srna, const char *idproperties)
void RNA_def_property_translation_context(PropertyRNA *prop, const char *context)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
void RNA_def_property_float_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double step, int precision)
void RNA_def_property_int_sdna(PropertyRNA *prop, const char *structname, const char *propname)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
void RNA_api_strip(StructRNA *srna)
void RNA_api_strip_retiming_keys(BlenderRNA *brna)
void RNA_api_strips(StructRNA *srna, bool metastrip)
void RNA_api_strip_elements(BlenderRNA *brna, PropertyRNA *cprop)
const EnumPropertyItem rna_enum_views_format_items[]
Definition rna_scene.cc:481
static void rna_def_effect_inputs(StructRNA *srna, int count)
#define RNA_ENUM_SEQUENCER_VIDEO_MODIFIER_TYPE_ITEMS
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_sound_equalizer_modifier(BlenderRNA *brna)
static void rna_def_color_balance(BlenderRNA *brna)
static void rna_def_modifiers(BlenderRNA *brna)
static void rna_def_gaussian_blur(StructRNA *srna)
static void rna_def_brightcontrast_modifier(BlenderRNA *brna)
void RNA_def_sequencer(BlenderRNA *brna)
static void rna_def_image(BlenderRNA *brna)
static void rna_def_editor(BlenderRNA *brna)
static void rna_def_effect(BlenderRNA *brna)
static void rna_def_channel(BlenderRNA *brna)
static void rna_def_whitebalance_modifier(BlenderRNA *brna)
static void rna_def_mask(BlenderRNA *brna)
static void rna_def_strip_element(BlenderRNA *brna)
static void rna_def_movie_types(StructRNA *srna)
static void rna_def_transform(StructRNA *srna)
static void rna_def_speed_control(StructRNA *srna)
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_colorbalance_modifier(BlenderRNA *brna)
#define RNA_ENUM_SEQUENCER_AUDIO_MODIFIER_TYPE_ITEMS
static void rna_def_strip_crop(BlenderRNA *brna)
static void rna_def_strips_top_level(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_audio_options(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_graphical_sound_equalizer(BlenderRNA *brna)
static void rna_def_multicam(StructRNA *srna)
static void rna_def_strip(BlenderRNA *brna)
static void rna_def_scene(BlenderRNA *brna)
const EnumPropertyItem rna_enum_strip_video_modifier_type_items[]
const EnumPropertyItem rna_enum_strip_color_items[]
static void rna_def_effects(BlenderRNA *brna)
static void rna_def_retiming_keys(StructRNA *srna)
static void rna_def_color_management(StructRNA *srna)
const EnumPropertyItem rna_enum_strip_modifier_type_items[]
static void rna_def_curves_modifier(BlenderRNA *brna)
static void rna_def_strip_color_balance(BlenderRNA *brna)
static EffectInfo def_effects[]
static const EnumPropertyItem transform_filter_items[]
static void rna_def_strip_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
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 void rna_def_strips_meta(BlenderRNA *brna)
static void rna_def_retiming_key(BlenderRNA *brna)
static const EnumPropertyItem blend_mode_items[]
const EnumPropertyItem rna_enum_strip_sound_modifier_type_items[]
static void rna_def_sound_modifiers(BlenderRNA *brna)
#define min(a, b)
Definition sort.cc:36
#define FLT_MAX
Definition stdcycles.h:14
union CollectionPropertyIterator::@251313231040372062304153161337117373343066046335 internal
ListBaseIterator listbase
Definition RNA_types.hh:572
StripColorBalance color_balance
ListBase seqbase
ListBase channels
const char * ui_name
const char * struct_name
const char * ui_desc
void(* func)(StructRNA *)
Definition DNA_ID.h:404
void * first
void invalidate()
Definition RNA_types.hh:110
void * data
Definition RNA_types.hh:53
struct FFMpegCodecData ffcodecdata
struct Editing * ed
struct RenderData r
struct MovieReader * anim
StripProxy * proxy
StripCrop * crop
StripTransform * transform
StripElem * stripdata
char dirpath[768]
char filename[256]
struct StripModifierData * next
struct Strip * mask_strip
struct MovieReader * anim
struct Strip * input1
int8_t color_tag
StripData * data
struct IDProperty * prop
void * effectdata
ListBase seqbase
float blend_opacity
char name[64]
ListBase modifiers
struct Strip * input2
ListBase channels
ListBase anims
max
Definition text_draw.cc:251
void WM_main_add_notifier(uint type, void *reference)
PointerRNA * ptr
Definition wm_files.cc:4227