2 * ***** BEGIN GPL LICENSE BLOCK *****
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18 * Contributor(s): Blender Foundation (2008)
20 * ***** END GPL LICENSE BLOCK *****
23 /** \file blender/makesrna/intern/rna_sequencer.c
31 #include "RNA_access.h"
32 #include "RNA_define.h"
34 #include "rna_internal.h"
36 #include "DNA_anim_types.h"
37 #include "DNA_object_types.h"
38 #include "DNA_scene_types.h"
39 #include "DNA_sequence_types.h"
40 #include "DNA_movieclip_types.h"
42 #include "BKE_animsys.h"
43 #include "BKE_global.h"
44 #include "BKE_sequencer.h"
45 #include "BKE_sound.h"
47 #include "MEM_guardedalloc.h"
52 typedef struct EffectInfo {
53 const char *struct_name;
56 void (*func)(StructRNA *);
63 typedef struct SequenceSearchData {
68 /* build a temp reference to the parent */
69 static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
71 for (; seq; seq = seq->next) {
73 if (seq->type == SEQ_TYPE_META) {
74 meta_tmp_ref(seq, seq->seqbase.first);
79 static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
81 Scene *scene = (Scene *)ptr->id.data;
82 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
84 meta_tmp_ref(NULL, ed->seqbase.first);
86 rna_iterator_listbase_begin(iter, &ed->seqbase, NULL);
89 static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter)
91 ListBaseIterator *internal = iter->internal;
92 Sequence *seq = (Sequence *)internal->link;
94 if (seq->seqbase.first)
95 internal->link = (Link *)seq->seqbase.first;
97 internal->link = (Link *)seq->next;
99 internal->link = NULL;
102 seq = seq->tmp; /* XXX - seq's don't reference their parents! */
103 if (seq && seq->next) {
104 internal->link = (Link *)seq->next;
110 iter->valid = (internal->link != NULL);
114 static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
116 Sequence *seq = (Sequence *)ptr->data;
118 /* Hack? copied from sequencer.c::reload_sequence_new_file() */
119 size_t olen = MEM_allocN_len(seq->strip->stripdata) / sizeof(struct StripElem);
121 /* the problem with seq->strip->len and seq->len is that it's discounted from the offset (hard cut trim) */
125 static void rna_SequenceEditor_elements_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
127 Sequence *seq = (Sequence *)ptr->data;
128 rna_iterator_array_begin(iter, (void *)seq->strip->stripdata, sizeof(StripElem),
129 rna_SequenceEditor_elements_length(ptr), 0, NULL);
132 static void rna_Sequence_frame_change_update(Scene *scene, Sequence *seq)
134 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
135 ListBase *seqbase = BKE_sequence_seqbase(&ed->seqbase, seq);
136 BKE_sequence_calc_disp(scene, seq);
138 if (BKE_sequence_test_overlap(seqbase, seq)) {
139 BKE_sequence_base_shuffle(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
141 BKE_sequencer_sort(scene);
144 static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
146 Sequence *seq = (Sequence *)ptr->data;
147 Scene *scene = (Scene *)ptr->id.data;
149 BKE_sequence_translate(scene, seq, value - seq->start);
150 rna_Sequence_frame_change_update(scene, seq);
153 static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
155 Sequence *seq = (Sequence *)ptr->data;
156 Scene *scene = (Scene *)ptr->id.data;
158 BKE_sequence_tx_set_final_left(seq, value);
159 BKE_sequence_single_fix(seq);
160 rna_Sequence_frame_change_update(scene, seq);
163 static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
165 Sequence *seq = (Sequence *)ptr->data;
166 Scene *scene = (Scene *)ptr->id.data;
168 BKE_sequence_tx_set_final_right(seq, value);
169 BKE_sequence_single_fix(seq);
170 rna_Sequence_frame_change_update(scene, seq);
173 static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
175 Sequence *seq = (Sequence *)ptr->data;
176 Scene *scene = (Scene *)ptr->id.data;
178 seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
180 BKE_sequence_reload_new_file(scene, seq, FALSE);
181 rna_Sequence_frame_change_update(scene, seq);
184 static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
186 Sequence *seq = (Sequence *)ptr->data;
187 Scene *scene = (Scene *)ptr->id.data;
189 seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
191 BKE_sequence_reload_new_file(scene, seq, FALSE);
192 rna_Sequence_frame_change_update(scene, seq);
195 static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
197 Sequence *seq = (Sequence *)ptr->data;
198 Scene *scene = (Scene *)ptr->id.data;
200 BKE_sequence_tx_set_final_right(seq, seq->start + value);
201 rna_Sequence_frame_change_update(scene, seq);
204 static int rna_Sequence_frame_length_get(PointerRNA *ptr)
206 Sequence *seq = (Sequence *)ptr->data;
207 return BKE_sequence_tx_get_final_right(seq, 0) - BKE_sequence_tx_get_final_left(seq, 0);
210 static int rna_Sequence_frame_editable(PointerRNA *ptr)
212 Sequence *seq = (Sequence *)ptr->data;
213 /* Effect sequences' start frame and length must be readonly! */
214 return (BKE_sequence_effect_get_num_inputs(seq->type)) ? 0 : PROP_EDITABLE;
217 static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
219 Sequence *seq = (Sequence *)ptr->data;
220 Scene *scene = (Scene *)ptr->id.data;
221 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
222 ListBase *seqbase = BKE_sequence_seqbase(&ed->seqbase, seq);
224 seq->machine = value;
226 if (BKE_sequence_test_overlap(seqbase, seq) ) {
227 BKE_sequence_base_shuffle(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
229 BKE_sequencer_sort(scene);
232 /* properties that need to allocate structs */
233 static void rna_Sequence_use_color_balance_set(PointerRNA *ptr, int value)
235 Sequence *seq = (Sequence *)ptr->data;
239 seq->flag |= SEQ_USE_COLOR_BALANCE;
240 if (seq->strip->color_balance == NULL) {
241 seq->strip->color_balance = MEM_callocN(sizeof(struct StripColorBalance), "StripColorBalance");
242 for (c = 0; c < 3; c++) {
243 seq->strip->color_balance->lift[c] = 1.0f;
244 seq->strip->color_balance->gamma[c] = 1.0f;
245 seq->strip->color_balance->gain[c] = 1.0f;
250 seq->flag ^= SEQ_USE_COLOR_BALANCE;
254 static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
256 Sequence *seq = (Sequence *)ptr->data;
258 seq->flag |= SEQ_USE_PROXY;
259 if (seq->strip->proxy == NULL) {
260 seq->strip->proxy = MEM_callocN(sizeof(struct StripProxy), "StripProxy");
261 seq->strip->proxy->quality = 90;
262 seq->strip->proxy->build_tc_flags = SEQ_PROXY_TC_ALL;
263 seq->strip->proxy->build_size_flags = SEQ_PROXY_IMAGE_SIZE_25;
267 seq->flag ^= SEQ_USE_PROXY;
271 static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value)
273 Sequence *seq = (Sequence *)ptr->data;
275 seq->flag |= SEQ_USE_TRANSFORM;
276 if (seq->strip->transform == NULL) {
277 seq->strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
281 seq->flag ^= SEQ_USE_TRANSFORM;
285 static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value)
287 Sequence *seq = (Sequence *)ptr->data;
289 seq->flag |= SEQ_USE_CROP;
290 if (seq->strip->crop == NULL) {
291 seq->strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
295 seq->flag ^= SEQ_USE_CROP;
299 static int transform_seq_cmp_cb(Sequence *seq, void *arg_pt)
301 SequenceSearchData *data = arg_pt;
303 if (seq->strip && seq->strip->transform == data->data) {
305 return -1; /* done so bail out */
310 static Sequence *sequence_get_by_transform(Editing *ed, StripTransform *transform)
312 SequenceSearchData data;
315 data.data = transform;
317 /* irritating we need to search for our sequence! */
318 BKE_sequencer_base_recursive_apply(&ed->seqbase, transform_seq_cmp_cb, &data);
323 static char *rna_SequenceTransform_path(PointerRNA *ptr)
325 Scene *scene = ptr->id.data;
326 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
327 Sequence *seq = sequence_get_by_transform(ed, ptr->data);
329 if (seq && seq->name + 2)
330 return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform", seq->name + 2);
332 return BLI_strdup("");
335 static void rna_SequenceTransform_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
337 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
338 Sequence *seq = sequence_get_by_transform(ed, ptr->data);
340 BKE_sequence_invalidate_cache(scene, seq);
343 static int crop_seq_cmp_cb(Sequence *seq, void *arg_pt)
345 SequenceSearchData *data = arg_pt;
347 if (seq->strip && seq->strip->crop == data->data) {
349 return -1; /* done so bail out */
354 static Sequence *sequence_get_by_crop(Editing *ed, StripCrop *crop)
356 SequenceSearchData data;
361 /* irritating we need to search for our sequence! */
362 BKE_sequencer_base_recursive_apply(&ed->seqbase, crop_seq_cmp_cb, &data);
367 static char *rna_SequenceCrop_path(PointerRNA *ptr)
369 Scene *scene = ptr->id.data;
370 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
371 Sequence *seq = sequence_get_by_crop(ed, ptr->data);
373 if (seq && seq->name + 2)
374 return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop", seq->name + 2);
376 return BLI_strdup("");
379 static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
381 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
382 Sequence *seq = sequence_get_by_crop(ed, ptr->data);
384 BKE_sequence_invalidate_cache(scene, seq);
387 /* name functions that ignore the first two characters */
388 static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
390 Sequence *seq = (Sequence *)ptr->data;
391 BLI_strncpy(value, seq->name + 2, sizeof(seq->name) - 2);
394 static int rna_Sequence_name_length(PointerRNA *ptr)
396 Sequence *seq = (Sequence *)ptr->data;
397 return strlen(seq->name + 2);
400 static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
402 Scene *scene = (Scene *)ptr->id.data;
403 Sequence *seq = (Sequence *)ptr->data;
404 char oldname[sizeof(seq->name)];
407 /* make a copy of the old name first */
408 BLI_strncpy(oldname, seq->name + 2, sizeof(seq->name) - 2);
410 /* copy the new name into the name slot */
411 BLI_strncpy_utf8(seq->name + 2, value, sizeof(seq->name) - 2);
413 /* make sure the name is unique */
414 BKE_seqence_base_unique_name_recursive(&scene->ed->seqbase, seq);
416 /* fix all the animation data which may link to this */
418 /* don't rename everywhere because these are per scene */
419 /* BKE_all_animdata_fix_paths_rename(NULL, "sequence_editor.sequences_all", oldname, seq->name+2); */
420 adt = BKE_animdata_from_id(&scene->id);
422 BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name + 2, 0, 0, 1);
425 static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
427 Sequence *seq = (Sequence *)ptr->data;
431 return &RNA_ImageSequence;
433 return &RNA_MetaSequence;
435 return &RNA_SceneSequence;
437 return &RNA_MovieSequence;
438 case SEQ_TYPE_MOVIECLIP:
439 return &RNA_MovieClipSequence;
441 return &RNA_MaskSequence;
442 case SEQ_TYPE_SOUND_RAM:
443 return &RNA_SoundSequence;
445 return &RNA_CrossSequence;
447 return &RNA_AddSequence;
449 return &RNA_SubtractSequence;
450 case SEQ_TYPE_ALPHAOVER:
451 return &RNA_AlphaOverSequence;
452 case SEQ_TYPE_ALPHAUNDER:
453 return &RNA_AlphaUnderSequence;
454 case SEQ_TYPE_GAMCROSS:
455 return &RNA_GammaCrossSequence;
457 return &RNA_MultiplySequence;
458 case SEQ_TYPE_OVERDROP:
459 return &RNA_OverDropSequence;
460 case SEQ_TYPE_MULTICAM:
461 return &RNA_MulticamSequence;
462 case SEQ_TYPE_ADJUSTMENT:
463 return &RNA_AdjustmentSequence;
465 return &RNA_WipeSequence;
467 return &RNA_GlowSequence;
468 case SEQ_TYPE_TRANSFORM:
469 return &RNA_TransformSequence;
471 return &RNA_ColorSequence;
473 return &RNA_SpeedControlSequence;
475 return &RNA_Sequence;
479 static char *rna_Sequence_path(PointerRNA *ptr)
481 Sequence *seq = (Sequence *)ptr->data;
483 /* sequencer data comes from scene...
484 * TODO: would be nice to make SequenceEditor data a datablock of its own (for shorter paths)
487 return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"]", seq->name + 2);
489 return BLI_strdup("");
492 static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter)
494 ListBaseIterator *internal = iter->internal;
495 MetaStack *ms = (MetaStack *)internal->link;
497 return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
500 /* TODO, expose seq path setting as a higher level sequencer BKE function */
501 static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
503 Sequence *seq = (Sequence *)(ptr->data);
505 if (seq->type == SEQ_TYPE_SOUND_RAM && seq->sound) {
506 /* for sound strips we need to update the sound as well.
507 * arguably, this could load in a new sound rather than modify an existing one.
508 * but while using the sequencer its most likely your not using the sound in the game engine too.
511 RNA_id_pointer_create((ID *)seq->sound, &id_ptr);
512 RNA_string_set(&id_ptr, "filepath", value);
513 sound_load(G.main, seq->sound);
514 sound_update_scene_sound(seq->scene_sound, seq->sound);
517 BLI_split_dirfile(value, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir),
518 sizeof(seq->strip->stripdata->name));
521 static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
523 Sequence *seq = (Sequence *)(ptr->data);
525 BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name);
528 static int rna_Sequence_filepath_length(PointerRNA *ptr)
530 Sequence *seq = (Sequence *)(ptr->data);
533 BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
537 static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
539 StripProxy *proxy = (StripProxy *)(ptr->data);
540 BLI_split_dirfile(value, proxy->dir, proxy->file, sizeof(proxy->dir), sizeof(proxy->file));
543 static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
545 StripProxy *proxy = (StripProxy *)(ptr->data);
547 BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file);
550 static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
552 StripProxy *proxy = (StripProxy *)(ptr->data);
555 BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
559 static void rna_Sequence_volume_set(PointerRNA *ptr, float value)
561 Sequence *seq = (Sequence *)(ptr->data);
564 if (seq->scene_sound)
565 sound_set_scene_sound_volume(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_VOLUME_ANIMATED) != 0);
568 static void rna_Sequence_pitch_set(PointerRNA *ptr, float value)
570 Sequence *seq = (Sequence *)(ptr->data);
573 if (seq->scene_sound)
574 sound_set_scene_sound_pitch(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_PITCH_ANIMATED) != 0);
577 static void rna_Sequence_pan_set(PointerRNA *ptr, float value)
579 Sequence *seq = (Sequence *)(ptr->data);
582 if (seq->scene_sound)
583 sound_set_scene_sound_pan(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_PAN_ANIMATED) != 0);
587 static int rna_Sequence_input_count_get(PointerRNA *ptr)
589 Sequence *seq = (Sequence *)(ptr->data);
591 return BKE_sequence_effect_get_num_inputs(seq->type);
594 static int rna_Sequence_supports_mask_get(PointerRNA *ptr)
596 Sequence *seq = (Sequence *)(ptr->data);
598 return BKE_sequence_effect_get_supports_mask(seq->type);
602 static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
604 Sequence *seq = (Sequence *)(ptr->data);
605 BLI_split_dirfile(value, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir),
606 sizeof(seq->strip->stripdata->name));
609 static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
611 StripElem *elem = (StripElem *)(ptr->data);
612 BLI_split_file_part(value, elem->name, sizeof(elem->name));
616 static void rna_Sequence_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
618 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
621 Sequence *seq = (Sequence *) ptr->data;
623 BKE_sequence_invalidate_cache(scene, seq);
627 static int rna_Sequence_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
629 Sequence *seq = (Sequence *) ptr->data;
630 Sequence *cur = (Sequence *) value.data;
635 if (BKE_sequence_check_depend(seq, cur))
641 static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
643 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
645 BKE_sequencer_free_imbuf(scene, &ed->seqbase, FALSE, FALSE);
647 if (RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
648 BKE_sequencer_update_sound_bounds(scene, ptr->data);
651 static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
653 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
655 BKE_sequencer_update_muting(ed);
656 rna_Sequence_update(bmain, scene, ptr);
659 static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr)
661 Sequence *seq = (Sequence *)(ptr->data);
662 BKE_sequence_reload_new_file(scene, seq, TRUE);
663 BKE_sequence_calc(scene, seq);
664 rna_Sequence_update(bmain, scene, ptr);
667 static int seqproxy_seq_cmp_cb(Sequence *seq, void *arg_pt)
669 SequenceSearchData *data = arg_pt;
671 if (seq->strip && seq->strip->proxy == data->data) {
673 return -1; /* done so bail out */
678 static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
680 SequenceSearchData data;
685 BKE_sequencer_base_recursive_apply(&ed->seqbase, seqproxy_seq_cmp_cb, &data);
689 static void rna_Sequence_tcindex_update(Main *bmain, Scene *scene, PointerRNA *ptr)
691 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
692 Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
694 BKE_sequence_reload_new_file(scene, seq, FALSE);
695 rna_Sequence_frame_change_update(scene, seq);
698 static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
700 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
701 Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
703 BKE_sequence_invalidate_cache(scene, seq);
707 static float rna_Sequence_opacity_get(PointerRNA *ptr)
709 Sequence *seq = (Sequence *)(ptr->data);
710 return seq->blend_opacity / 100.0f;
712 static void rna_Sequence_opacity_set(PointerRNA *ptr, float value)
714 Sequence *seq = (Sequence *)(ptr->data);
715 CLAMP(value, 0.0f, 1.0f);
716 seq->blend_opacity = value * 100.0f;
719 static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt)
721 SequenceSearchData *data = arg_pt;
723 if (seq->strip && seq->strip->color_balance == data->data) {
725 return -1; /* done so bail out */
730 static Sequence *sequence_get_by_colorbalance(Editing *ed, StripColorBalance *cb)
732 SequenceSearchData data;
737 /* irritating we need to search for our sequence! */
738 BKE_sequencer_base_recursive_apply(&ed->seqbase, colbalance_seq_cmp_cb, &data);
743 static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
745 Scene *scene = ptr->id.data;
746 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
747 Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data);
749 if (seq && seq->name + 2)
750 return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name + 2);
752 return BLI_strdup("");
755 static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *ptr)
757 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
758 Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data);
760 BKE_sequence_invalidate_cache(scene, seq);
763 static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
765 Scene *scene = ptr->id.data;
766 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
771 /* convert from abs to relative and back */
772 if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) == 0 && value) {
773 ed->over_cfra = scene->r.cfra + ed->over_ofs;
774 ed->over_flag |= SEQ_EDIT_OVERLAY_ABS;
776 else if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
777 ed->over_ofs = ed->over_cfra - scene->r.cfra;
778 ed->over_flag &= ~SEQ_EDIT_OVERLAY_ABS;
782 static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
784 Scene *scene = (Scene *)ptr->id.data;
785 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
788 return scene->r.cfra;
790 if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
791 return ed->over_cfra - scene->r.cfra;
797 static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
799 Scene *scene = (Scene *)ptr->id.data;
800 Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
806 if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
807 ed->over_cfra = (scene->r.cfra + value);
809 ed->over_ofs = value;
813 static void rna_WipeSequence_angle_set(PointerRNA *ptr, float value)
815 Sequence *seq = (Sequence *)(ptr->data);
816 value = RAD2DEGF(value);
817 CLAMP(value, -90.0f, 90.0f);
818 ((WipeVars *)seq->effectdata)->angle = value;
821 static float rna_WipeSequence_angle_get(PointerRNA *ptr)
823 Sequence *seq = (Sequence *)(ptr->data);
825 return DEG2RADF(((WipeVars *)seq->effectdata)->angle);
831 static void rna_def_strip_element(BlenderRNA *brna)
836 srna = RNA_def_struct(brna, "SequenceElement", NULL);
837 RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame");
838 RNA_def_struct_sdna(srna, "StripElem");
840 prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
841 RNA_def_property_string_sdna(prop, NULL, "name");
842 RNA_def_property_ui_text(prop, "Filename", "");
843 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
845 prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
846 RNA_def_property_int_sdna(prop, NULL, "orig_width");
847 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
848 RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
850 prop = RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
851 RNA_def_property_int_sdna(prop, NULL, "orig_height");
852 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
853 RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
856 static void rna_def_strip_crop(BlenderRNA *brna)
861 srna = RNA_def_struct(brna, "SequenceCrop", NULL);
862 RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip");
863 RNA_def_struct_sdna(srna, "StripCrop");
865 prop = RNA_def_property(srna, "max_y", PROP_INT, PROP_UNSIGNED);
866 RNA_def_property_int_sdna(prop, NULL, "top");
867 RNA_def_property_ui_text(prop, "Top", "");
868 RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
869 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
871 prop = RNA_def_property(srna, "min_y", PROP_INT, PROP_UNSIGNED);
872 RNA_def_property_int_sdna(prop, NULL, "bottom");
873 RNA_def_property_ui_text(prop, "Bottom", "");
874 RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
875 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
877 prop = RNA_def_property(srna, "min_x", PROP_INT, PROP_UNSIGNED);
878 RNA_def_property_int_sdna(prop, NULL, "left");
879 RNA_def_property_ui_text(prop, "Left", "");
880 RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
881 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
883 prop = RNA_def_property(srna, "max_x", PROP_INT, PROP_UNSIGNED);
884 RNA_def_property_int_sdna(prop, NULL, "right");
885 RNA_def_property_ui_text(prop, "Right", "");
886 RNA_def_property_ui_range(prop, 0, 4096, 1, 0);
887 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
889 RNA_def_struct_path_func(srna, "rna_SequenceCrop_path");
892 static void rna_def_strip_transform(BlenderRNA *brna)
897 srna = RNA_def_struct(brna, "SequenceTransform", NULL);
898 RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform parameters for a sequence strip");
899 RNA_def_struct_sdna(srna, "StripTransform");
901 prop = RNA_def_property(srna, "offset_x", PROP_INT, PROP_NONE);
902 RNA_def_property_int_sdna(prop, NULL, "xofs");
903 RNA_def_property_ui_text(prop, "Offset X", "");
904 RNA_def_property_ui_range(prop, -4096, 4096, 1, 0);
905 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
907 prop = RNA_def_property(srna, "offset_y", PROP_INT, PROP_NONE);
908 RNA_def_property_int_sdna(prop, NULL, "yofs");
909 RNA_def_property_ui_text(prop, "Offset Y", "");
910 RNA_def_property_ui_range(prop, -4096, 4096, 1, 0);
911 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
913 RNA_def_struct_path_func(srna, "rna_SequenceTransform_path");
917 static void rna_def_strip_proxy(BlenderRNA *brna)
922 static const EnumPropertyItem seq_tc_items[] = {
923 {SEQ_PROXY_TC_NONE, "NONE", 0, "No TC in use", ""},
924 {SEQ_PROXY_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run",
925 "Use images in the order as they are recorded"},
926 {SEQ_PROXY_TC_FREE_RUN, "FREE_RUN", 0, "Free Run",
927 "Use global timestamp written by recording device"},
928 {SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN, "FREE_RUN_REC_DATE", 0, "Free Run (rec date)",
929 "Interpolate a global timestamp using the "
930 "record date and time written by recording device"},
931 {SEQ_PROXY_TC_RECORD_RUN_NO_GAPS, "RECORD_RUN_NO_GAPS", 0, "Record Run No Gaps",
932 "Like record run, but ignore timecode, "
933 "changes in framerate or dropouts"},
934 {0, NULL, 0, NULL, NULL}
937 srna = RNA_def_struct(brna, "SequenceProxy", NULL);
938 RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
939 RNA_def_struct_sdna(srna, "StripProxy");
941 prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
942 RNA_def_property_string_sdna(prop, NULL, "dir");
943 RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
944 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
946 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
947 RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
948 RNA_def_property_string_funcs(prop, "rna_Sequence_proxy_filepath_get", "rna_Sequence_proxy_filepath_length",
949 "rna_Sequence_proxy_filepath_set");
951 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
953 prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
954 RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
955 RNA_def_property_ui_text(prop, "25%", "Build 25% proxy resolution");
957 prop = RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
958 RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_50);
959 RNA_def_property_ui_text(prop, "50%", "Build 50% proxy resolution");
961 prop = RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
962 RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_75);
963 RNA_def_property_ui_text(prop, "75%", "Build 75% proxy resolution");
965 prop = RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
966 RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_100);
967 RNA_def_property_ui_text(prop, "100%", "Build 100% proxy resolution");
969 prop = RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
970 RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_RECORD_RUN);
971 RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
973 prop = RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
974 RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_FREE_RUN);
975 RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index");
977 prop = RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
978 RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN);
979 RNA_def_property_ui_text(prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time");
981 prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
982 RNA_def_property_int_sdna(prop, NULL, "quality");
983 RNA_def_property_ui_text(prop, "Quality", "JPEG Quality of proxies to build");
984 RNA_def_property_ui_range(prop, 1, 100, 1, 0);
986 prop = RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
987 RNA_def_property_enum_sdna(prop, NULL, "tc");
988 RNA_def_property_enum_items(prop, seq_tc_items);
989 RNA_def_property_ui_text(prop, "Timecode", "");
990 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_tcindex_update");
994 static void rna_def_strip_color_balance(BlenderRNA *brna)
999 srna = RNA_def_struct(brna, "SequenceColorBalance", NULL);
1000 RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
1001 RNA_def_struct_sdna(srna, "StripColorBalance");
1003 prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
1004 RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
1005 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1006 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1008 prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
1009 RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
1010 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1011 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1013 prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
1014 RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
1015 RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
1016 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1018 prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
1019 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAIN);
1020 RNA_def_property_ui_text(prop, "Inverse Gain", "");
1021 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1023 prop = RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
1024 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAMMA);
1025 RNA_def_property_ui_text(prop, "Inverse Gamma", "");
1026 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1028 prop = RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
1029 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_LIFT);
1030 RNA_def_property_ui_text(prop, "Inverse Lift", "");
1031 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
1033 RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
1037 prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
1038 RNA_def_property_range(prop, 0.0f, 1.0f);
1039 RNA_def_property_ui_text(prop, "Exposure", "");
1040 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
1042 prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
1043 RNA_def_property_range(prop, 0.0f, 1.0f);
1044 RNA_def_property_ui_text(prop, "Saturation", "");
1045 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
1049 EnumPropertyItem blend_mode_items[] = {
1050 {SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
1051 {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
1052 {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
1053 {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
1054 {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
1055 {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
1056 {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
1057 {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
1058 {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
1059 {0, NULL, 0, NULL, NULL}
1062 static void rna_def_sequence(BlenderRNA *brna)
1067 static const EnumPropertyItem seq_type_items[] = {
1068 {SEQ_TYPE_IMAGE, "IMAGE", 0, "Image", ""},
1069 {SEQ_TYPE_META, "META", 0, "Meta", ""},
1070 {SEQ_TYPE_SCENE, "SCENE", 0, "Scene", ""},
1071 {SEQ_TYPE_MOVIE, "MOVIE", 0, "Movie", ""},
1072 {SEQ_TYPE_MOVIECLIP, "MOVIECLIP", 0, "Clip", ""},
1073 {SEQ_TYPE_MASK, "MASK", 0, "Mask", ""},
1074 {SEQ_TYPE_SOUND_RAM, "SOUND", 0, "Sound", ""},
1075 {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
1076 {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
1077 {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
1078 {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
1079 {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
1080 {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
1081 {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
1082 {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
1083 {SEQ_TYPE_WIPE, "WIPE", 0, "Wipe", ""},
1084 {SEQ_TYPE_GLOW, "GLOW", 0, "Glow", ""},
1085 {SEQ_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
1086 {SEQ_TYPE_COLOR, "COLOR", 0, "Color", ""},
1087 {SEQ_TYPE_SPEED, "SPEED", 0, "Speed", ""},
1088 {SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
1089 {SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
1090 {0, NULL, 0, NULL, NULL}
1093 srna = RNA_def_struct(brna, "Sequence", NULL);
1094 RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor");
1095 RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
1096 RNA_def_struct_path_func(srna, "rna_Sequence_path");
1098 prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
1099 RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
1100 RNA_def_property_string_maxlength(prop, sizeof(((Sequence *)NULL)->name) - 2);
1101 RNA_def_property_ui_text(prop, "Name", "");
1102 RNA_def_struct_name_property(srna, prop);
1103 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
1105 prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
1106 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1107 RNA_def_property_enum_items(prop, seq_type_items);
1108 RNA_def_property_ui_text(prop, "Type", "");
1109 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1113 prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
1114 RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
1115 RNA_def_property_ui_text(prop, "Select", "");
1116 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
1118 prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
1119 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LEFTSEL);
1120 RNA_def_property_ui_text(prop, "Left Handle Selected", "");
1121 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
1123 prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
1124 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_RIGHTSEL);
1125 RNA_def_property_ui_text(prop, "Right Handle Selected", "");
1126 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
1128 prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
1129 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
1130 RNA_def_property_ui_text(prop, "Mute", "");
1131 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_mute_update");
1133 prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
1134 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
1135 RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed");
1136 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
1138 /* strip positioning */
1139 prop = RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
1140 RNA_def_property_range(prop, 1, MAXFRAME);
1141 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
1142 RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip after the handles are applied");
1143 RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set", NULL);
1144 RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1145 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1147 prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
1148 RNA_def_property_int_sdna(prop, NULL, "len");
1149 RNA_def_property_clear_flag(prop, PROP_EDITABLE | PROP_ANIMATABLE);
1150 RNA_def_property_range(prop, 1, MAXFRAME);
1151 RNA_def_property_ui_text(prop, "Length",
1152 "The length of the contents of this strip before the handles are applied");
1154 prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
1155 RNA_def_property_int_sdna(prop, NULL, "start");
1156 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
1157 RNA_def_property_ui_text(prop, "Start Frame", "");
1158 RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set", NULL); /* overlap tests and calc_seq_disp */
1159 RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1160 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1162 prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
1163 RNA_def_property_int_sdna(prop, NULL, "startdisp");
1164 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
1165 RNA_def_property_ui_text(prop, "Start Frame",
1166 "Start frame displayed in the sequence editor after offsets are applied, setting this is "
1167 "equivalent to moving the handle, not the actual start frame");
1168 /* overlap tests and calc_seq_disp */
1169 RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL);
1170 RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1171 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1173 prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
1174 RNA_def_property_int_sdna(prop, NULL, "enddisp");
1175 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
1176 RNA_def_property_ui_text(prop, "End Frame",
1177 "End frame displayed in the sequence editor after offsets are applied");
1178 /* overlap tests and calc_seq_disp */
1179 RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL);
1180 RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
1181 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1183 prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
1184 RNA_def_property_int_sdna(prop, NULL, "startofs");
1185 RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1186 RNA_def_property_ui_text(prop, "Start Offset", "");
1187 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1189 prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
1190 RNA_def_property_int_sdna(prop, NULL, "endofs");
1191 RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1192 RNA_def_property_ui_text(prop, "End Offset", "");
1193 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1195 prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
1196 RNA_def_property_int_sdna(prop, NULL, "startstill");
1197 RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1198 RNA_def_property_range(prop, 0, MAXFRAME);
1199 RNA_def_property_ui_text(prop, "Start Still", "");
1200 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1202 prop = RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
1203 RNA_def_property_int_sdna(prop, NULL, "endstill");
1204 RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
1205 RNA_def_property_range(prop, 0, MAXFRAME);
1206 RNA_def_property_ui_text(prop, "End Still", "");
1207 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1209 prop = RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
1210 RNA_def_property_int_sdna(prop, NULL, "machine");
1211 RNA_def_property_range(prop, 0, MAXSEQ - 1);
1212 RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
1213 RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set", NULL); /* overlap test */
1214 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1218 prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
1219 RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
1220 RNA_def_property_enum_items(prop, blend_mode_items);
1221 RNA_def_property_ui_text(prop, "Blend Mode", "");
1222 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1224 prop = RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
1225 RNA_def_property_range(prop, 0.0f, 1.0f);
1226 RNA_def_property_ui_text(prop, "Blend Opacity", "");
1227 /* stupid 0-100 -> 0-1 */
1228 RNA_def_property_float_funcs(prop, "rna_Sequence_opacity_get", "rna_Sequence_opacity_set", NULL);
1229 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1231 prop = RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_NONE);
1232 RNA_def_property_range(prop, 0.0f, 1.0f);
1233 RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
1234 RNA_def_property_float_sdna(prop, NULL, "effect_fader");
1235 RNA_def_property_ui_text(prop, "Effect fader position", "");
1236 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1238 prop = RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
1239 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_EFFECT_DEFAULT_FADE);
1240 RNA_def_property_ui_text(prop, "Use Default Fade",
1241 "Fade effect using the built-in default (usually make transition as long as "
1243 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1246 prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
1247 RNA_def_property_float_sdna(prop, NULL, "speed_fader");
1248 RNA_def_property_ui_text(prop, "Speed factor",
1249 "Multiply the current speed of the sequence with this number or remap current frame "
1251 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1253 RNA_api_sequence_strip(srna);
1256 static void rna_def_editor(BlenderRNA *brna)
1261 srna = RNA_def_struct(brna, "SequenceEditor", NULL);
1262 RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene datablock");
1263 RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
1264 RNA_def_struct_sdna(srna, "Editing");
1266 prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
1267 RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
1268 RNA_def_property_struct_type(prop, "Sequence");
1269 RNA_def_property_ui_text(prop, "Sequences", "");
1270 RNA_api_sequences(brna, prop);
1272 prop = RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
1273 RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
1274 RNA_def_property_struct_type(prop, "Sequence");
1275 RNA_def_property_ui_text(prop, "Sequences", "");
1276 RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_sequences_all_begin",
1277 "rna_SequenceEditor_sequences_all_next", NULL, NULL, NULL, NULL, NULL, NULL);
1279 prop = RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
1280 RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
1281 RNA_def_property_struct_type(prop, "Sequence");
1282 RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
1283 RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_SequenceEditor_meta_stack_get",
1284 NULL, NULL, NULL, NULL);
1286 prop = RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
1287 RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
1288 RNA_def_property_flag(prop, PROP_EDITABLE);
1289 RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
1291 prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
1292 RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
1293 RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay on top of the sequencer");
1294 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
1296 prop = RNA_def_property(srna, "overlay_lock", PROP_BOOLEAN, PROP_NONE);
1297 RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_ABS);
1298 RNA_def_property_ui_text(prop, "Overlay Lock", "");
1299 RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
1300 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
1302 /* access to fixed and relative frame */
1303 prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
1304 RNA_def_property_ui_text(prop, "Overlay Offset", "");
1305 RNA_def_property_int_funcs(prop, "rna_SequenceEditor_overlay_frame_get",
1306 "rna_SequenceEditor_overlay_frame_set", NULL);
1307 RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
1310 static void rna_def_filter_video(StructRNA *srna)
1314 prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
1315 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FILTERY);
1316 RNA_def_property_ui_text(prop, "De-Interlace", "For video movies to remove fields");
1317 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update_reopen_files");
1319 prop = RNA_def_property(srna, "use_premultiply", PROP_BOOLEAN, PROP_NONE);
1320 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_PREMUL);
1321 RNA_def_property_ui_text(prop, "Premultiply", "Convert RGB from key alpha to premultiplied alpha");
1322 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1324 prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
1325 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX);
1326 RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
1327 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1329 prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
1330 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPY);
1331 RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
1332 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1334 prop = RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
1335 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_FLOAT);
1336 RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
1337 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1339 prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
1340 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
1341 RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order");
1342 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1344 prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
1345 RNA_def_property_float_sdna(prop, NULL, "mul");
1346 RNA_def_property_range(prop, 0.0f, 20.0f);
1347 RNA_def_property_ui_text(prop, "Multiply Colors", "");
1348 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1350 prop = RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
1351 RNA_def_property_float_sdna(prop, NULL, "sat");
1352 RNA_def_property_range(prop, 0.0f, 20.0f);
1353 RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
1354 RNA_def_property_ui_text(prop, "Saturation", "");
1355 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1357 prop = RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
1358 RNA_def_property_range(prop, 1.0f, 30.0f);
1359 RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
1360 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1362 prop = RNA_def_property(srna, "use_color_balance", PROP_BOOLEAN, PROP_NONE);
1363 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_COLOR_BALANCE);
1364 RNA_def_property_ui_text(prop, "Use Color Balance", "(3-Way color correction) on input");
1365 RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_color_balance_set");
1366 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1368 prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
1369 RNA_def_property_pointer_sdna(prop, NULL, "strip->color_balance");
1370 RNA_def_property_ui_text(prop, "Color Balance", "");
1372 prop = RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
1373 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
1374 RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing");
1375 RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_translation_set");
1376 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1378 prop = RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
1379 RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
1380 RNA_def_property_ui_text(prop, "Transform", "");
1382 prop = RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE);
1383 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP);
1384 RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing");
1385 RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_crop_set");
1386 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1388 prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
1389 RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
1390 RNA_def_property_ui_text(prop, "Crop", "");
1393 static void rna_def_proxy(StructRNA *srna)
1397 prop = RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
1398 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY);
1399 RNA_def_property_ui_text(prop, "Use Proxy / Timecode", "Use a preview proxy and/or timecode index for this strip");
1400 RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set");
1402 prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
1403 RNA_def_property_pointer_sdna(prop, NULL, "strip->proxy");
1404 RNA_def_property_ui_text(prop, "Proxy", "");
1406 prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
1407 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_DIR);
1408 RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
1409 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1411 prop = RNA_def_property(srna, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
1412 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_FILE);
1413 RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
1414 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1417 static void rna_def_input(StructRNA *srna)
1421 prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED);
1422 RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
1423 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
1424 RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); /* overlap tests */
1426 RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
1427 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1429 prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
1430 RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
1431 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
1432 RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); /* overlap tests */
1433 RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
1434 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1437 static void rna_def_effect_inputs(StructRNA *srna, int count, int supports_mask)
1441 prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
1442 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1443 RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
1445 prop = RNA_def_property(srna, "is_supports_mask", PROP_INT, PROP_UNSIGNED);
1446 RNA_def_property_clear_flag(prop, PROP_EDITABLE);
1447 RNA_def_property_int_funcs(prop, "rna_Sequence_supports_mask_get", NULL, NULL);
1450 prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
1451 RNA_def_property_pointer_sdna(prop, NULL, "seq1");
1452 RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
1453 RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
1457 prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
1458 RNA_def_property_pointer_sdna(prop, NULL, "seq2");
1459 RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
1460 RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
1464 if (count == 3) { // not used by any effects (perhaps one day plugins?)
1465 prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
1466 RNA_def_property_pointer_sdna(prop, NULL, "seq3");
1467 RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
1468 RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
1472 if (supports_mask) {
1473 prop = RNA_def_property(srna, "input_mask", PROP_POINTER, PROP_NONE);
1474 RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
1475 RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Sequence_otherSequence_poll");
1476 RNA_def_property_flag(prop, PROP_EDITABLE);
1477 RNA_def_property_ui_text(prop, "Mask", "Mask input for the effect strip");
1478 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1482 static void rna_def_image(BlenderRNA *brna)
1487 srna = RNA_def_struct(brna, "ImageSequence", "Sequence");
1488 RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images");
1489 RNA_def_struct_sdna(srna, "Sequence");
1491 prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
1492 RNA_def_property_string_sdna(prop, NULL, "strip->dir");
1493 RNA_def_property_ui_text(prop, "Directory", "");
1494 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1496 prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
1497 RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
1498 RNA_def_property_struct_type(prop, "SequenceElement");
1499 RNA_def_property_ui_text(prop, "Elements", "");
1500 RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next",
1501 "rna_iterator_array_end", "rna_iterator_array_get",
1502 "rna_SequenceEditor_elements_length", NULL, NULL, NULL);
1503 RNA_api_sequence_elements(brna, prop);
1505 rna_def_filter_video(srna);
1506 rna_def_proxy(srna);
1507 rna_def_input(srna);
1510 static void rna_def_meta(BlenderRNA *brna)
1515 srna = RNA_def_struct(brna, "MetaSequence", "Sequence");
1516 RNA_def_struct_ui_text(srna, "Meta Sequence", "Sequence strip to group other strips as a single sequence strip");
1517 RNA_def_struct_sdna(srna, "Sequence");
1519 prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
1520 RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
1521 RNA_def_property_struct_type(prop, "Sequence");
1522 RNA_def_property_ui_text(prop, "Sequences", "");
1524 rna_def_filter_video(srna);
1525 rna_def_proxy(srna);
1526 rna_def_input(srna);
1529 static void rna_def_scene(BlenderRNA *brna)
1534 srna = RNA_def_struct(brna, "SceneSequence", "Sequence");
1535 RNA_def_struct_ui_text(srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene");
1536 RNA_def_struct_sdna(srna, "Sequence");
1538 prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
1539 RNA_def_property_flag(prop, PROP_EDITABLE);
1540 RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
1541 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1543 prop = RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
1544 RNA_def_property_flag(prop, PROP_EDITABLE);
1545 RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
1546 RNA_def_property_ui_text(prop, "Camera Override", "Override the scenes active camera");
1547 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1549 rna_def_filter_video(srna);
1550 rna_def_proxy(srna);
1551 rna_def_input(srna);
1554 static void rna_def_movie(BlenderRNA *brna)
1559 srna = RNA_def_struct(brna, "MovieSequence", "Sequence");
1560 RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video");
1561 RNA_def_struct_sdna(srna, "Sequence");
1563 prop = RNA_def_property(srna, "mpeg_preseek", PROP_INT, PROP_NONE);
1564 RNA_def_property_int_sdna(prop, NULL, "anim_preseek");
1565 RNA_def_property_range(prop, 0, 50);
1566 RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames");
1567 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1569 prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
1570 RNA_def_property_int_sdna(prop, NULL, "streamindex");
1571 RNA_def_property_range(prop, 0, 20);
1572 RNA_def_property_ui_text(prop, "Stream Index",
1573 "For files with several movie streams, use the stream with the given index");
1574 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update_reopen_files");
1576 prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
1577 RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
1578 RNA_def_property_struct_type(prop, "SequenceElement");
1579 RNA_def_property_ui_text(prop, "Elements", "");
1580 RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next",
1581 "rna_iterator_array_end", "rna_iterator_array_get",
1582 "rna_SequenceEditor_elements_length", NULL, NULL, NULL);
1584 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
1585 RNA_def_property_ui_text(prop, "File", "");
1586 RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
1587 "rna_Sequence_filepath_set");
1588 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
1590 rna_def_filter_video(srna);
1591 rna_def_proxy(srna);
1592 rna_def_input(srna);
1595 static void rna_def_movieclip(BlenderRNA *brna)
1600 srna = RNA_def_struct(brna, "MovieClipSequence", "Sequence");
1601 RNA_def_struct_ui_text(srna, "MovieClip Sequence", "Sequence strip to load a video from the clip editor");
1602 RNA_def_struct_sdna(srna, "Sequence");
1604 /* TODO - add clip property? */
1606 prop = RNA_def_property(srna, "undistort", PROP_BOOLEAN, PROP_NONE);
1607 RNA_def_property_boolean_sdna(prop, NULL, "clip_flag", SEQ_MOVIECLIP_RENDER_UNDISTORTED);
1608 RNA_def_property_ui_text(prop, "Undistort Clip", "Use the undistorted version of the clip");
1609 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1611 prop = RNA_def_property(srna, "stabilize2d", PROP_BOOLEAN, PROP_NONE);
1612 RNA_def_property_boolean_sdna(prop, NULL, "clip_flag", SEQ_MOVIECLIP_RENDER_STABILIZED);
1613 RNA_def_property_ui_text(prop, "Stabilize 2D Clip", "Use the 2D stabilized version of the clip");
1614 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1616 rna_def_filter_video(srna);
1617 rna_def_input(srna);
1620 static void rna_def_mask(BlenderRNA *brna)
1625 srna = RNA_def_struct(brna, "MaskSequence", "Sequence");
1626 RNA_def_struct_ui_text(srna, "Mask Sequence", "Sequence strip to load a video from a mask");
1627 RNA_def_struct_sdna(srna, "Sequence");
1629 prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
1630 RNA_def_property_flag(prop, PROP_EDITABLE);
1631 RNA_def_property_ui_text(prop, "Mask", "Mask that this sequence uses");
1632 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1634 rna_def_filter_video(srna);
1635 rna_def_input(srna);
1638 static void rna_def_sound(BlenderRNA *brna)
1643 srna = RNA_def_struct(brna, "SoundSequence", "Sequence");
1644 RNA_def_struct_ui_text(srna, "Sound Sequence",
1645 "Sequence strip defining a sound to be played over a period of time");
1646 RNA_def_struct_sdna(srna, "Sequence");
1648 prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
1649 RNA_def_property_struct_type(prop, "Sound");
1650 RNA_def_property_ui_text(prop, "Sound", "Sound datablock used by this sequence");
1651 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1653 prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
1654 RNA_def_property_float_sdna(prop, NULL, "volume");
1655 RNA_def_property_range(prop, 0.0f, 100.0f);
1656 RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
1657 RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_volume_set", NULL);
1658 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1660 prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
1661 RNA_def_property_float_sdna(prop, NULL, "pitch");
1662 RNA_def_property_range(prop, 0.1f, 10.0f);
1663 RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
1664 RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pitch_set", NULL);
1665 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1667 prop = RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
1668 RNA_def_property_float_sdna(prop, NULL, "pan");
1669 RNA_def_property_range(prop, -2.0f, 2.0f);
1670 RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
1671 RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pan_set", NULL);
1672 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1674 prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
1675 RNA_def_property_ui_text(prop, "File", "");
1676 RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
1677 "rna_Sequence_filepath_set");
1678 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
1680 prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
1681 RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
1682 RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");
1683 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
1685 rna_def_input(srna);
1688 static void rna_def_effect(BlenderRNA *brna)
1692 srna = RNA_def_struct(brna, "EffectSequence", "Sequence");
1693 RNA_def_struct_ui_text(srna, "Effect Sequence",
1694 "Sequence strip applying an effect on the images created by other strips");
1695 RNA_def_struct_sdna(srna, "Sequence");
1697 rna_def_filter_video(srna);
1698 rna_def_proxy(srna);
1701 static void rna_def_multicam(StructRNA *srna)
1705 prop = RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
1706 RNA_def_property_int_sdna(prop, NULL, "multicam_source");
1707 RNA_def_property_range(prop, 0, MAXSEQ - 1);
1708 RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
1709 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1711 rna_def_input(srna);
1714 static void rna_def_wipe(StructRNA *srna)
1718 static const EnumPropertyItem wipe_type_items[] = {
1719 {0, "SINGLE", 0, "Single", ""},
1720 {1, "DOUBLE", 0, "Double", ""},
1721 /* not used yet {2, "BOX", 0, "Box", ""}, */
1722 /* not used yet {3, "CROSS", 0, "Cross", ""}, */
1723 {4, "IRIS", 0, "Iris", ""},
1724 {5, "CLOCK", 0, "Clock", ""},
1725 {0, NULL, 0, NULL, NULL}
1728 static const EnumPropertyItem wipe_direction_items[] = {
1729 {0, "OUT", 0, "Out", ""},
1730 {1, "IN", 0, "In", ""},
1731 {0, NULL, 0, NULL, NULL}
1734 RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
1736 prop = RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_UNSIGNED);
1737 RNA_def_property_float_sdna(prop, NULL, "edgeWidth");
1738 RNA_def_property_range(prop, 0.0f, 1.0f);
1739 RNA_def_property_ui_text(prop, "Blur Width",
1740 "Width of the blur edge, in percentage relative to the image size");
1741 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1743 #if 1 /* expose as radians */
1744 prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
1745 RNA_def_property_float_funcs(prop, "rna_WipeSequence_angle_get", "rna_WipeSequence_angle_set", NULL);
1746 RNA_def_property_range(prop, DEG2RAD(-90.0), DEG2RAD(90.0));
1748 prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_NONE);
1749 RNA_def_property_float_sdna(prop, NULL, "angle");
1750 RNA_def_property_range(prop, -90.0f, 90.0f);
1752 RNA_def_property_ui_text(prop, "Angle", "Edge angle");
1753 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1755 prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
1756 RNA_def_property_enum_sdna(prop, NULL, "forward");
1757 RNA_def_property_enum_items(prop, wipe_direction_items);
1758 RNA_def_property_ui_text(prop, "Direction", "Wipe direction");
1759 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1761 prop = RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
1762 RNA_def_property_enum_sdna(prop, NULL, "wipetype");
1763 RNA_def_property_enum_items(prop, wipe_type_items);
1764 RNA_def_property_ui_text(prop, "Transition Type", "");
1765 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1768 static void rna_def_glow(StructRNA *srna)
1772 RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
1774 prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
1775 RNA_def_property_float_sdna(prop, NULL, "fMini");
1776 RNA_def_property_range(prop, 0.0f, 1.0f);
1777 RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
1778 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1780 prop = RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
1781 RNA_def_property_float_sdna(prop, NULL, "fClamp");
1782 RNA_def_property_range(prop, 0.0f, 1.0f);
1783 RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
1784 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1786 prop = RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
1787 RNA_def_property_float_sdna(prop, NULL, "fBoost");
1788 RNA_def_property_range(prop, 0.0f, 10.0f);
1789 RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
1790 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1792 prop = RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
1793 RNA_def_property_float_sdna(prop, NULL, "dDist");
1794 RNA_def_property_range(prop, 0.5f, 20.0f);
1795 RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
1796 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1798 prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
1799 RNA_def_property_int_sdna(prop, NULL, "dQuality");
1800 RNA_def_property_range(prop, 1, 5);
1801 RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
1802 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1804 prop = RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
1805 RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
1806 RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
1807 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1810 static void rna_def_transform(StructRNA *srna)
1814 static const EnumPropertyItem interpolation_items[] = {
1815 {0, "NONE", 0, "None", "No interpolation"},
1816 {1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation"},
1817 {2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation"},
1818 {0, NULL, 0, NULL, NULL}
1821 static const EnumPropertyItem translation_unit_items[] = {
1822 {0, "PIXELS", 0, "Pixels", ""},
1823 {1, "PERCENT", 0, "Percent", ""},
1824 {0, NULL, 0, NULL, NULL}
1827 RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
1829 prop = RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
1830 RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
1831 RNA_def_property_ui_text(prop, "Scale X", "");
1832 RNA_def_property_ui_range(prop, 0, 10, 3, 10);
1833 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1835 prop = RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
1836 RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
1837 RNA_def_property_ui_text(prop, "Scale Y", "");
1838 RNA_def_property_ui_range(prop, 0, 10, 3, 10);
1839 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1841 prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
1842 RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
1843 RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
1844 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1846 prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
1847 RNA_def_property_float_sdna(prop, NULL, "xIni");
1848 RNA_def_property_ui_text(prop, "Translate X", "");
1849 RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
1850 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1852 prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
1853 RNA_def_property_float_sdna(prop, NULL, "yIni");
1854 RNA_def_property_ui_text(prop, "Translate Y", "");
1855 RNA_def_property_ui_range(prop, -500.0f, 500.0f, 3, 10);
1856 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1858 prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
1859 RNA_def_property_float_sdna(prop, NULL, "rotIni");
1860 RNA_def_property_range(prop, -360.0f, 360.0f);
1861 RNA_def_property_ui_text(prop, "Rotation", "");
1862 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1864 prop = RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
1865 RNA_def_property_enum_sdna(prop, NULL, "percent");
1866 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
1867 RNA_def_property_enum_items(prop, translation_unit_items);
1868 RNA_def_property_ui_text(prop, "Translation Unit", "");
1869 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1871 prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
1872 RNA_def_property_enum_items(prop, interpolation_items);
1873 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
1874 RNA_def_property_ui_text(prop, "Interpolation", "");
1875 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1878 static void rna_def_solid_color(StructRNA *srna)
1882 RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
1884 prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
1885 RNA_def_property_float_sdna(prop, NULL, "col");
1886 RNA_def_property_ui_text(prop, "Color", "");
1887 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1890 static void rna_def_speed_control(StructRNA *srna)
1894 RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
1896 prop = RNA_def_property(srna, "multiply_speed", PROP_FLOAT, PROP_UNSIGNED);
1897 RNA_def_property_float_sdna(prop, NULL, "globalSpeed");
1898 RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* seq->facf0 is used to animate this */
1899 RNA_def_property_ui_text(prop, "Multiply Speed", "Multiply the resulting speed after the speed factor");
1900 RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, 0);
1901 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1903 prop = RNA_def_property(srna, "use_as_speed", PROP_BOOLEAN, PROP_NONE);
1904 RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_INTEGRATE);
1905 RNA_def_property_ui_text(prop, "Use as speed", "Interpret the value as speed instead of a frame number");
1906 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1908 prop = RNA_def_property(srna, "use_frame_blend", PROP_BOOLEAN, PROP_NONE);
1909 RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_BLEND);
1910 RNA_def_property_ui_text(prop, "Frame Blending", "Blend two frames into the target for a smoother result");
1911 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1913 prop = RNA_def_property(srna, "scale_to_length", PROP_BOOLEAN, PROP_NONE);
1914 RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y);
1915 RNA_def_property_ui_text(prop, "Scale to length", "Scale values from 0.0 to 1.0 to target sequence length");
1916 RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
1919 static EffectInfo def_effects[] = {
1920 {"AddSequence", "Add Sequence",
1923 {"AdjustmentSequence", "Adjustment Layer Sequence",
1924 "Sequence strip to perform filter adjustments to layers below",
1925 rna_def_input, 0, TRUE},
1926 {"AlphaOverSequence", "Alpha Over Sequence",
1927 "Alpha Over Sequence",
1929 {"AlphaUnderSequence", "Alpha Under Sequence",
1930 "Alpha Under Sequence",
1932 {"ColorSequence", "Color Sequence",
1933 "Sequence strip creating an image filled with a single color",
1934 rna_def_solid_color, 0, FALSE},
1935 {"CrossSequence", "Cross Sequence",
1938 {"GammaCrossSequence", "Gamma Cross Sequence",
1939 "Gamma Cross Sequence",
1941 {"GlowSequence", "Glow Sequence",
1942 "Sequence strip creating a glow effect",
1943 rna_def_glow, 1, FALSE},
1944 {"MulticamSequence", "Multicam Select Sequence",
1945 "Sequence strip to perform multicam editing",
1946 rna_def_multicam, 0, FALSE},
1947 {"MultiplySequence", "Multiply Sequence",
1948 "Multiply Sequence",
1950 {"OverDropSequence", "Over Drop Sequence",
1951 "Over Drop Sequence",
1953 {"SpeedControlSequence", "SpeedControl Sequence",
1954 "Sequence strip to control the speed of other strips",
1955 rna_def_speed_control, 1, FALSE},
1956 {"SubtractSequence", "Subtract Sequence",
1957 "Subtract Sequence",
1959 {"TransformSequence", "Transform Sequence",
1960 "Sequence strip applying affine transformations to other strips",
1961 rna_def_transform, 1, FALSE},
1962 {"WipeSequence", "Wipe Sequence",
1963 "Sequence strip creating a wipe transition",
1964 rna_def_wipe, 1, FALSE},
1965 {"", "", "", NULL, 0, FALSE}
1968 static void rna_def_effects(BlenderRNA *brna)
1973 for (effect = def_effects; effect->struct_name[0] != '\0'; effect++) {
1974 srna = RNA_def_struct(brna, effect->struct_name, "EffectSequence");
1975 RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
1976 RNA_def_struct_sdna(srna, "Sequence");
1978 rna_def_effect_inputs(srna, effect->inputs, effect->supports_mask);
1985 void RNA_def_sequencer(BlenderRNA *brna)
1987 rna_def_strip_element(brna);
1988 rna_def_strip_proxy(brna);
1989 rna_def_strip_color_balance(brna);
1990 rna_def_strip_crop(brna);
1991 rna_def_strip_transform(brna);
1993 rna_def_sequence(brna);
1994 rna_def_editor(brna);
1996 rna_def_image(brna);
1998 rna_def_scene(brna);
1999 rna_def_movie(brna);
2000 rna_def_movieclip(brna);
2002 rna_def_sound(brna);
2003 rna_def_effect(brna);
2004 rna_def_effects(brna);