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 (2010)
20 * ***** END GPL LICENSE BLOCK *****
23 /** \file blender/makesrna/intern/rna_sequencer_api.c
31 #include "DNA_scene_types.h"
32 #include "DNA_sequence_types.h"
34 #include "BLI_utildefines.h"
36 #include "RNA_access.h"
37 #include "RNA_define.h"
39 #include "rna_internal.h"
43 //#include "DNA_anim_types.h"
44 #include "DNA_image_types.h"
45 #include "DNA_mask_types.h"
46 #include "DNA_sound_types.h"
48 #include "BLI_path_util.h" /* BLI_split_dirfile */
50 #include "BKE_image.h"
51 #include "BKE_library.h" /* id_us_plus */
52 #include "BKE_movieclip.h"
55 #include "BKE_report.h"
56 #include "BKE_sequencer.h"
57 #include "BKE_sound.h"
59 #include "IMB_imbuf.h"
60 #include "IMB_imbuf_types.h"
64 static void rna_Sequence_update_rnafunc(ID *id, Sequence *self, int do_data)
67 BKE_sequencer_update_changed_seq_and_deps((Scene *)id, self, true, true);
68 // new_tstripdata(self); // need 2.6x version of this.
70 BKE_sequence_calc((Scene *)id, self);
71 BKE_sequence_calc_disp((Scene *)id, self);
74 static void rna_Sequence_swap_internal(Sequence *seq_self, ReportList *reports, Sequence *seq_other)
76 const char *error_msg;
78 if (BKE_sequence_swap(seq_self, seq_other, &error_msg) == 0)
79 BKE_report(reports, RPT_ERROR, error_msg);
82 static Sequence *alloc_generic_sequence(Editing *ed, const char *name, int frame_start,
83 int channel, int type, const char *file)
89 seq = BKE_sequence_alloc(ed->seqbasep, frame_start, channel);
92 BLI_strncpy(seq->name + 2, name, sizeof(seq->name) - 2);
93 BKE_sequence_base_unique_name_recursive(&ed->seqbase, seq);
95 seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
99 strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem");
100 BLI_split_dirfile(file, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name));
102 BKE_sequence_init_colorspace(seq);
105 strip->stripdata = NULL;
111 static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed,
112 const char *name, MovieClip *clip, int channel,
115 Scene *scene = (Scene *)id;
118 seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_MOVIECLIP, clip->name);
120 seq->len = BKE_movieclip_get_duration(clip);
121 id_us_plus((ID *)clip);
123 BKE_sequence_calc_disp(scene, seq);
125 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
130 static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed,
131 const char *name, Mask *mask, int channel,
134 Scene *scene = (Scene *)id;
137 seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_MASK, mask->id.name);
139 seq->len = BKE_mask_get_duration(mask);
140 id_us_plus((ID *)mask);
142 BKE_sequence_calc_disp(scene, seq);
144 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
149 static Sequence *rna_Sequences_new_scene(ID *id, Editing *ed,
150 const char *name, Scene *sce_seq, int channel,
153 Scene *scene = (Scene *)id;
156 seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_SCENE, NULL);
157 seq->scene = sce_seq;
158 seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1;
159 seq->scene_sound = BKE_sound_scene_add_scene_sound(scene, seq, frame_start, frame_start + seq->len, 0);
160 id_us_plus((ID *)sce_seq);
162 BKE_sequence_calc_disp(scene, seq);
164 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
169 static Sequence *rna_Sequences_new_image(ID *id, Editing *ed, ReportList *reports,
170 const char *name, const char *file, int channel,
173 Scene *scene = (Scene *)id;
176 seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_IMAGE, file);
179 if (seq->strip->stripdata->name[0] == '\0') {
180 BKE_report(reports, RPT_ERROR, "Sequences.new_image: unable to open image file");
181 BLI_remlink(&ed->seqbase, seq);
182 BKE_sequence_free(scene, seq);
186 BKE_sequence_calc_disp(scene, seq);
188 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
193 static Sequence *rna_Sequences_new_movie(ID *id, Editing *ed, ReportList *reports,
194 const char *name, const char *file, int channel,
197 Scene *scene = (Scene *)id;
201 struct anim *an = openanim(file, IB_rect, 0, NULL);
204 BKE_report(reports, RPT_ERROR, "Sequences.new_movie: unable to open movie file");
208 seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_MOVIE, file);
210 sanim = MEM_mallocN(sizeof(StripAnim), "Strip Anim");
211 BLI_addtail(&seq->anims, sanim);
214 seq->anim_preseek = IMB_anim_get_preseek(an);
215 seq->len = IMB_anim_get_duration(an, IMB_TC_RECORD_RUN);
217 BKE_sequence_calc_disp(scene, seq);
219 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
224 #ifdef WITH_AUDASPACE
225 static Sequence *rna_Sequences_new_sound(ID *id, Editing *ed, Main *bmain, ReportList *reports,
226 const char *name, const char *file, int channel, int frame_start)
228 Scene *scene = (Scene *)id;
231 bSound *sound = BKE_sound_new_file(bmain, file);
233 if (sound->playback_handle == NULL) {
234 BKE_libblock_free(bmain, sound);
235 BKE_report(reports, RPT_ERROR, "Sequences.new_sound: unable to open sound file");
239 seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_SOUND_RAM, sound->name);
241 seq->len = ceil((double)BKE_sound_get_length(sound) * FPS);
243 seq->scene_sound = BKE_sound_add_scene_sound(scene, seq, frame_start, frame_start + seq->len, 0);
245 BKE_sequence_calc_disp(scene, seq);
247 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
251 #else /* WITH_AUDASPACE */
252 static Sequence *rna_Sequences_new_sound(ID *UNUSED(id), Editing *UNUSED(ed), Main *UNUSED(bmain), ReportList *reports,
253 const char *UNUSED(name), const char *UNUSED(file), int UNUSED(channel),
254 int UNUSED(frame_start))
256 BKE_report(reports, RPT_ERROR, "Blender compiled without Audaspace support");
259 #endif /* WITH_AUDASPACE */
261 static Sequence *rna_Sequences_new_effect(ID *id, Editing *ed, ReportList *reports,
262 const char *name, int type, int channel,
263 int frame_start, int frame_end,
264 Sequence *seq1, Sequence *seq2, Sequence *seq3)
266 Scene *scene = (Scene *)id;
268 struct SeqEffectHandle sh;
269 int num_inputs = BKE_sequence_effect_get_num_inputs(type);
271 switch (num_inputs) {
273 if (frame_end <= frame_start) {
274 BKE_report(reports, RPT_ERROR, "Sequences.new_effect: end frame not set");
280 BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 1 input sequence");
285 if (seq1 == NULL || seq2 == NULL) {
286 BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 2 input sequences");
291 if (seq1 == NULL || seq2 == NULL || seq3 == NULL) {
292 BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 3 input sequences");
297 BKE_reportf(reports, RPT_ERROR,
298 "Sequences.new_effect: effect expects more than 3 inputs (%d, should never happen!)",
303 seq = alloc_generic_sequence(ed, name, frame_start, channel, type, NULL);
305 sh = BKE_sequence_get_effect(seq);
313 if (!seq1) { /* effect has no deps */
315 BKE_sequence_tx_set_final_right(seq, frame_end);
318 seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE;
320 BKE_sequence_calc(scene, seq);
321 BKE_sequence_calc_disp(scene, seq);
323 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
328 static void rna_Sequences_remove(ID *id, Editing *ed, ReportList *reports, PointerRNA *seq_ptr)
330 Sequence *seq = seq_ptr->data;
331 Scene *scene = (Scene *)id;
333 if (BLI_remlink_safe(&ed->seqbase, seq) == false) {
334 BKE_reportf(reports, RPT_ERROR, "Sequence '%s' not in scene '%s'", seq->name + 2, scene->id.name + 2);
338 BKE_sequence_free(scene, seq);
339 RNA_POINTER_INVALIDATE(seq_ptr);
341 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
344 static StripElem *rna_SequenceElements_append(ID *id, Sequence *seq, const char *filename)
346 Scene *scene = (Scene *)id;
349 seq->strip->stripdata = se = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem) * (seq->len + 1));
351 BLI_strncpy(se->name, filename, sizeof(se->name));
354 BKE_sequence_calc_disp(scene, seq);
356 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
361 static void rna_SequenceElements_pop(ID *id, Sequence *seq, ReportList *reports, int index)
363 Scene *scene = (Scene *)id;
364 StripElem *new_seq, *se;
367 BKE_report(reports, RPT_ERROR, "SequenceElements.pop: cannot pop the last element");
371 /* python style negative indexing */
376 if (seq->len <= index || index < 0) {
377 BKE_report(reports, RPT_ERROR, "SequenceElements.pop: index out of range");
381 new_seq = MEM_callocN(sizeof(StripElem) * (seq->len - 1), "SequenceElements_pop");
384 se = seq->strip->stripdata;
386 memcpy(new_seq, se, sizeof(StripElem) * index);
388 if (index < seq->len)
389 memcpy(&new_seq[index], &se[index + 1], sizeof(StripElem) * (seq->len - index));
391 MEM_freeN(seq->strip->stripdata);
392 seq->strip->stripdata = new_seq;
394 BKE_sequence_calc_disp(scene, seq);
396 WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
402 void RNA_api_sequence_strip(StructRNA *srna)
407 func = RNA_def_function(srna, "update", "rna_Sequence_update_rnafunc");
408 RNA_def_function_flag(func, FUNC_USE_SELF_ID);
409 RNA_def_function_ui_description(func, "Update the strip dimensions");
410 parm = RNA_def_boolean(func, "data", false, "Data",
411 "Update strip data");
413 func = RNA_def_function(srna, "strip_elem_from_frame", "BKE_sequencer_give_stripelem");
414 RNA_def_function_ui_description(func, "Return the strip element from a given frame or None");
415 parm = RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
416 "The frame to get the strip element from", -MAXFRAME, MAXFRAME);
417 RNA_def_property_flag(parm, PROP_REQUIRED);
418 RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "",
419 "strip element of the current frame"));
421 func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
422 RNA_def_function_flag(func, FUNC_USE_REPORTS);
423 parm = RNA_def_pointer(func, "other", "Sequence", "Other", "");
424 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
427 void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
433 RNA_def_property_srna(cprop, "SequenceElements");
434 srna = RNA_def_struct(brna, "SequenceElements", NULL);
435 RNA_def_struct_sdna(srna, "Sequence");
436 RNA_def_struct_ui_text(srna, "SequenceElements", "Collection of SequenceElement");
438 func = RNA_def_function(srna, "append", "rna_SequenceElements_append");
439 RNA_def_function_flag(func, FUNC_USE_SELF_ID);
440 RNA_def_function_ui_description(func, "Push an image from ImageSequence.directory");
441 parm = RNA_def_string(func, "filename", "File", 0, "", "Filepath to image");
442 RNA_def_property_flag(parm, PROP_REQUIRED);
444 parm = RNA_def_pointer(func, "elem", "SequenceElement", "", "New SequenceElement");
445 RNA_def_function_return(func, parm);
447 func = RNA_def_function(srna, "pop", "rna_SequenceElements_pop");
448 RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
449 RNA_def_function_ui_description(func, "Pop an image off the collection");
450 parm = RNA_def_int(func, "index", -1, INT_MIN, INT_MAX, "", "Index of image to remove", INT_MIN, INT_MAX);
451 RNA_def_property_flag(parm, PROP_REQUIRED);
454 void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
460 static EnumPropertyItem seq_effect_items[] = {
461 {SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
462 {SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
463 {SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
464 {SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
465 {SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
466 {SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
467 {SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
468 {SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
469 {SEQ_TYPE_WIPE, "WIPE", 0, "Wipe", ""},
470 {SEQ_TYPE_GLOW, "GLOW", 0, "Glow", ""},
471 {SEQ_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
472 {SEQ_TYPE_COLOR, "COLOR", 0, "Color", ""},
473 {SEQ_TYPE_SPEED, "SPEED", 0, "Speed", ""},
474 {SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
475 {SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
476 {SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
477 {SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
478 {0, NULL, 0, NULL, NULL}
481 RNA_def_property_srna(cprop, "Sequences");
482 srna = RNA_def_struct(brna, "Sequences", NULL);
483 RNA_def_struct_sdna(srna, "Editing");
484 RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences");
486 func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip");
487 RNA_def_function_flag(func, FUNC_USE_SELF_ID);
488 RNA_def_function_ui_description(func, "Add a new movie clip sequence");
489 parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
490 RNA_def_property_flag(parm, PROP_REQUIRED);
491 parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to add");
492 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
493 parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
494 "The channel for the new sequence", 1, MAXSEQ);
495 RNA_def_property_flag(parm, PROP_REQUIRED);
496 parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
497 "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
498 RNA_def_property_flag(parm, PROP_REQUIRED);
500 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
501 RNA_def_function_return(func, parm);
503 func = RNA_def_function(srna, "new_mask", "rna_Sequences_new_mask");
504 RNA_def_function_flag(func, FUNC_USE_SELF_ID);
505 RNA_def_function_ui_description(func, "Add a new mask sequence");
506 parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
507 RNA_def_property_flag(parm, PROP_REQUIRED);
508 parm = RNA_def_pointer(func, "mask", "Mask", "", "Mask to add");
509 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
510 parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
511 "The channel for the new sequence", 1, MAXSEQ);
512 RNA_def_property_flag(parm, PROP_REQUIRED);
513 parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
514 "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
515 RNA_def_property_flag(parm, PROP_REQUIRED);
517 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
518 RNA_def_function_return(func, parm);
520 func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene");
521 RNA_def_function_flag(func, FUNC_USE_SELF_ID);
522 RNA_def_function_ui_description(func, "Add a new scene sequence");
523 parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
524 RNA_def_property_flag(parm, PROP_REQUIRED);
525 parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to add");
526 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
527 parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
528 "The channel for the new sequence", 1, MAXSEQ);
529 RNA_def_property_flag(parm, PROP_REQUIRED);
530 parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
531 "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
532 RNA_def_property_flag(parm, PROP_REQUIRED);
534 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
535 RNA_def_function_return(func, parm);
537 func = RNA_def_function(srna, "new_image", "rna_Sequences_new_image");
538 RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
539 RNA_def_function_ui_description(func, "Add a new image sequence");
540 parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
541 RNA_def_property_flag(parm, PROP_REQUIRED);
542 parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to image");
543 RNA_def_property_flag(parm, PROP_REQUIRED);
544 parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
545 "The channel for the new sequence", 1, MAXSEQ);
546 RNA_def_property_flag(parm, PROP_REQUIRED);
547 parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
548 "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
549 RNA_def_property_flag(parm, PROP_REQUIRED);
551 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
552 RNA_def_function_return(func, parm);
554 func = RNA_def_function(srna, "new_movie", "rna_Sequences_new_movie");
555 RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
556 RNA_def_function_ui_description(func, "Add a new movie sequence");
557 parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
558 RNA_def_property_flag(parm, PROP_REQUIRED);
559 parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
560 RNA_def_property_flag(parm, PROP_REQUIRED);
561 parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
562 "The channel for the new sequence", 1, MAXSEQ);
563 RNA_def_property_flag(parm, PROP_REQUIRED);
564 parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
565 "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
566 RNA_def_property_flag(parm, PROP_REQUIRED);
568 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
569 RNA_def_function_return(func, parm);
571 func = RNA_def_function(srna, "new_sound", "rna_Sequences_new_sound");
572 RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID | FUNC_USE_MAIN);
573 RNA_def_function_ui_description(func, "Add a new sound sequence");
574 parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
575 RNA_def_property_flag(parm, PROP_REQUIRED);
576 parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
577 RNA_def_property_flag(parm, PROP_REQUIRED);
578 parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
579 "The channel for the new sequence", 1, MAXSEQ);
580 RNA_def_property_flag(parm, PROP_REQUIRED);
581 parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
582 "The start frame for the new sequence", -MAXFRAME, MAXFRAME);
583 RNA_def_property_flag(parm, PROP_REQUIRED);
585 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
586 RNA_def_function_return(func, parm);
588 func = RNA_def_function(srna, "new_effect", "rna_Sequences_new_effect");
589 RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
590 RNA_def_function_ui_description(func, "Add a new effect sequence");
591 parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
592 RNA_def_property_flag(parm, PROP_REQUIRED);
593 parm = RNA_def_enum(func, "type", seq_effect_items, 0, "Type",
594 "type for the new sequence");
595 RNA_def_property_flag(parm, PROP_REQUIRED);
596 parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
597 "The channel for the new sequence", 1, MAXSEQ);
598 /* don't use MAXFRAME since it makes importer scripts fail */
599 RNA_def_property_flag(parm, PROP_REQUIRED);
600 parm = RNA_def_int(func, "frame_start", 0, INT_MIN, INT_MAX, "",
601 "The start frame for the new sequence", INT_MIN, INT_MAX);
602 RNA_def_property_flag(parm, PROP_REQUIRED);
603 RNA_def_int(func, "frame_end", 0, INT_MIN, INT_MAX, "",
604 "The end frame for the new sequence", INT_MIN, INT_MAX);
605 RNA_def_pointer(func, "seq1", "Sequence", "", "Sequence 1 for effect");
606 RNA_def_pointer(func, "seq2", "Sequence", "", "Sequence 2 for effect");
607 RNA_def_pointer(func, "seq3", "Sequence", "", "Sequence 3 for effect");
609 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
610 RNA_def_function_return(func, parm);
613 func = RNA_def_function(srna, "remove", "rna_Sequences_remove");
614 RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
615 RNA_def_function_ui_description(func, "Remove a Sequence");
616 parm = RNA_def_pointer(func, "sequence", "Sequence", "", "Sequence to remove");
617 RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
618 RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);