2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2010-06-21 22:05:34 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software Foundation,
|
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
2019-02-18 08:08:12 +11:00
|
|
|
/** \file
|
|
|
|
* \ingroup RNA
|
2011-02-27 20:20:01 +00:00
|
|
|
*/
|
|
|
|
|
2010-06-21 22:05:34 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
#include "DNA_scene_types.h"
|
|
|
|
#include "DNA_sequence_types.h"
|
|
|
|
|
|
|
|
#include "BLI_utildefines.h"
|
|
|
|
|
2010-06-21 22:05:34 +00:00
|
|
|
#include "RNA_access.h"
|
|
|
|
#include "RNA_define.h"
|
|
|
|
|
|
|
|
#include "rna_internal.h"
|
|
|
|
|
|
|
|
#ifdef RNA_RUNTIME
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
//#include "DNA_anim_types.h"
|
|
|
|
#include "DNA_image_types.h"
|
2012-06-07 18:24:36 +00:00
|
|
|
#include "DNA_mask_types.h"
|
2012-05-10 15:10:51 +00:00
|
|
|
#include "DNA_sound_types.h"
|
|
|
|
|
|
|
|
#include "BLI_path_util.h" /* BLI_split_dirfile */
|
|
|
|
|
|
|
|
#include "BKE_image.h"
|
2012-06-07 18:24:36 +00:00
|
|
|
#include "BKE_mask.h"
|
2018-11-07 18:00:24 +01:00
|
|
|
#include "BKE_movieclip.h"
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2010-06-21 22:05:34 +00:00
|
|
|
#include "BKE_report.h"
|
|
|
|
#include "BKE_sequencer.h"
|
2012-05-10 15:10:51 +00:00
|
|
|
#include "BKE_sound.h"
|
|
|
|
|
|
|
|
#include "IMB_imbuf.h"
|
|
|
|
#include "IMB_imbuf_types.h"
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
2010-06-21 22:05:34 +00:00
|
|
|
|
2018-07-01 15:47:09 +02:00
|
|
|
static void rna_Sequence_update_rnafunc(ID *id, Sequence *self, bool do_data)
|
2013-01-02 16:15:45 +00:00
|
|
|
{
|
|
|
|
if (do_data) {
|
|
|
|
BKE_sequencer_update_changed_seq_and_deps((Scene *)id, self, true, true);
|
|
|
|
// new_tstripdata(self); // need 2.6x version of this.
|
|
|
|
}
|
|
|
|
BKE_sequence_calc((Scene *)id, self);
|
|
|
|
BKE_sequence_calc_disp((Scene *)id, self);
|
|
|
|
}
|
|
|
|
|
2010-06-21 22:05:34 +00:00
|
|
|
static void rna_Sequence_swap_internal(Sequence *seq_self, ReportList *reports, Sequence *seq_other)
|
|
|
|
{
|
2011-05-28 09:59:34 +00:00
|
|
|
const char *error_msg;
|
2018-06-09 14:40:09 +02:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
if (BKE_sequence_swap(seq_self, seq_other, &error_msg) == 0)
|
2011-05-28 09:59:34 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, error_msg);
|
2010-06-21 22:05:34 +00:00
|
|
|
}
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
static Sequence *alloc_generic_sequence(Editing *ed, const char *name, int frame_start,
|
2012-05-10 15:10:51 +00:00
|
|
|
int channel, int type, const char *file)
|
|
|
|
{
|
|
|
|
Sequence *seq;
|
|
|
|
Strip *strip;
|
|
|
|
StripElem *se;
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = BKE_sequence_alloc(ed->seqbasep, frame_start, channel);
|
2012-05-10 15:10:51 +00:00
|
|
|
seq->type = type;
|
|
|
|
|
|
|
|
BLI_strncpy(seq->name + 2, name, sizeof(seq->name) - 2);
|
2012-10-04 18:30:28 +00:00
|
|
|
BKE_sequence_base_unique_name_recursive(&ed->seqbase, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
seq->strip = strip = MEM_callocN(sizeof(Strip), "strip");
|
|
|
|
seq->strip->us = 1;
|
|
|
|
|
|
|
|
if (file) {
|
|
|
|
strip->stripdata = se = MEM_callocN(sizeof(StripElem), "stripelem");
|
|
|
|
BLI_split_dirfile(file, strip->dir, se->name, sizeof(strip->dir), sizeof(se->name));
|
2012-11-05 14:44:29 +00:00
|
|
|
|
|
|
|
BKE_sequence_init_colorspace(seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
}
|
|
|
|
else {
|
|
|
|
strip->stripdata = NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
|
2012-06-28 12:32:06 +00:00
|
|
|
static Sequence *rna_Sequences_new_clip(ID *id, Editing *ed,
|
2012-05-10 15:10:51 +00:00
|
|
|
const char *name, MovieClip *clip, int channel,
|
2013-01-06 12:42:47 +00:00
|
|
|
int frame_start)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
Sequence *seq;
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_MOVIECLIP, clip->name);
|
2012-05-10 15:10:51 +00:00
|
|
|
seq->clip = clip;
|
|
|
|
seq->len = BKE_movieclip_get_duration(clip);
|
|
|
|
id_us_plus((ID *)clip);
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
|
2012-06-28 12:32:06 +00:00
|
|
|
static Sequence *rna_Sequences_new_mask(ID *id, Editing *ed,
|
2012-06-07 18:24:36 +00:00
|
|
|
const char *name, Mask *mask, int channel,
|
2013-01-06 12:42:47 +00:00
|
|
|
int frame_start)
|
2012-06-07 18:24:36 +00:00
|
|
|
{
|
|
|
|
Scene *scene = (Scene *)id;
|
|
|
|
Sequence *seq;
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_MASK, mask->id.name);
|
2012-06-07 18:24:36 +00:00
|
|
|
seq->mask = mask;
|
|
|
|
seq->len = BKE_mask_get_duration(mask);
|
|
|
|
id_us_plus((ID *)mask);
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-06-07 18:24:36 +00:00
|
|
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
|
2012-06-28 12:32:06 +00:00
|
|
|
static Sequence *rna_Sequences_new_scene(ID *id, Editing *ed,
|
2012-05-10 15:10:51 +00:00
|
|
|
const char *name, Scene *sce_seq, int channel,
|
2013-01-06 12:42:47 +00:00
|
|
|
int frame_start)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
Sequence *seq;
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_SCENE, NULL);
|
2012-05-10 15:10:51 +00:00
|
|
|
seq->scene = sce_seq;
|
|
|
|
seq->len = sce_seq->r.efra - sce_seq->r.sfra + 1;
|
2015-03-26 11:35:41 +01:00
|
|
|
seq->scene_sound = BKE_sound_scene_add_scene_sound(scene, seq, frame_start, frame_start + seq->len, 0);
|
2012-05-10 15:10:51 +00:00
|
|
|
id_us_plus((ID *)sce_seq);
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
|
2012-05-11 11:05:48 +00:00
|
|
|
static Sequence *rna_Sequences_new_image(ID *id, Editing *ed, ReportList *reports,
|
2012-05-10 15:22:29 +00:00
|
|
|
const char *name, const char *file, int channel,
|
2013-01-06 12:42:47 +00:00
|
|
|
int frame_start)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
Sequence *seq;
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_IMAGE, file);
|
2012-05-10 15:10:51 +00:00
|
|
|
seq->len = 1;
|
|
|
|
|
|
|
|
if (seq->strip->stripdata->name[0] == '\0') {
|
|
|
|
BKE_report(reports, RPT_ERROR, "Sequences.new_image: unable to open image file");
|
2012-05-10 15:22:29 +00:00
|
|
|
BLI_remlink(&ed->seqbase, seq);
|
2012-09-06 09:23:38 +00:00
|
|
|
BKE_sequence_free(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
|
2012-05-11 11:05:48 +00:00
|
|
|
static Sequence *rna_Sequences_new_movie(ID *id, Editing *ed, ReportList *reports,
|
2012-05-10 15:22:29 +00:00
|
|
|
const char *name, const char *file, int channel,
|
2013-01-06 12:42:47 +00:00
|
|
|
int frame_start)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
Sequence *seq;
|
2015-04-06 10:40:12 -03:00
|
|
|
StripAnim *sanim;
|
2012-05-10 15:10:51 +00:00
|
|
|
|
Color Management, Stage 2: Switch color pipeline to use OpenColorIO
Replace old color pipeline which was supporting linear/sRGB color spaces
only with OpenColorIO-based pipeline.
This introduces two configurable color spaces:
- Input color space for images and movie clips. This space is used to convert
images/movies from color space in which file is saved to Blender's linear
space (for float images, byte images are not internally converted, only input
space is stored for such images and used later).
This setting could be found in image/clip data block settings.
- Display color space which defines space in which particular display is working.
This settings could be found in scene's Color Management panel.
When render result is being displayed on the screen, apart from converting image
to display space, some additional conversions could happen.
This conversions are:
- View, which defines tone curve applying before display transformation.
These are different ways to view the image on the same display device.
For example it could be used to emulate film view on sRGB display.
- Exposure affects on image exposure before tone map is applied.
- Gamma is post-display gamma correction, could be used to match particular
display gamma.
- RGB curves are user-defined curves which are applying before display
transformation, could be used for different purposes.
All this settings by default are only applying on render result and does not
affect on other images. If some particular image needs to be affected by this
transformation, "View as Render" setting of image data block should be set to
truth. Movie clips are always affected by all display transformations.
This commit also introduces configurable color space in which sequencer is
working. This setting could be found in scene's Color Management panel and
it should be used if such stuff as grading needs to be done in color space
different from sRGB (i.e. when Film view on sRGB display is use, using VD16
space as sequencer's internal space would make grading working in space
which is close to the space using for display).
Some technical notes:
- Image buffer's float buffer is now always in linear space, even if it was
created from 16bit byte images.
- Space of byte buffer is stored in image buffer's rect_colorspace property.
- Profile of image buffer was removed since it's not longer meaningful.
- OpenGL and GLSL is supposed to always work in sRGB space. It is possible
to support other spaces, but it's quite large project which isn't so
much important.
- Legacy Color Management option disabled is emulated by using None display.
It could have some regressions, but there's no clear way to avoid them.
- If OpenColorIO is disabled on build time, it should make blender behaving
in the same way as previous release with color management enabled.
More details could be found at this page (more details would be added soon):
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.64/Color_Management
--
Thanks to Xavier Thomas, Lukas Toene for initial work on OpenColorIO
integration and to Brecht van Lommel for some further development and code/
usecase review!
2012-09-15 10:05:07 +00:00
|
|
|
struct anim *an = openanim(file, IB_rect, 0, NULL);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
if (an == NULL) {
|
|
|
|
BKE_report(reports, RPT_ERROR, "Sequences.new_movie: unable to open movie file");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_MOVIE, file);
|
2015-04-06 10:40:12 -03:00
|
|
|
|
|
|
|
sanim = MEM_mallocN(sizeof(StripAnim), "Strip Anim");
|
|
|
|
BLI_addtail(&seq->anims, sanim);
|
|
|
|
sanim->anim = an;
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
seq->anim_preseek = IMB_anim_get_preseek(an);
|
|
|
|
seq->len = IMB_anim_get_duration(an, IMB_TC_RECORD_RUN);
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef WITH_AUDASPACE
|
2012-05-11 11:05:48 +00:00
|
|
|
static Sequence *rna_Sequences_new_sound(ID *id, Editing *ed, Main *bmain, ReportList *reports,
|
2013-01-06 12:42:47 +00:00
|
|
|
const char *name, const char *file, int channel, int frame_start)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
Sequence *seq;
|
|
|
|
|
2015-03-26 11:35:41 +01:00
|
|
|
bSound *sound = BKE_sound_new_file(bmain, file);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2015-05-03 03:28:43 +10:00
|
|
|
if (sound->playback_handle == NULL) {
|
2019-01-14 15:47:11 +01:00
|
|
|
BKE_id_free(bmain, sound);
|
2012-05-10 15:10:51 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Sequences.new_sound: unable to open sound file");
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = alloc_generic_sequence(ed, name, frame_start, channel, SEQ_TYPE_SOUND_RAM, sound->name);
|
2012-05-10 15:10:51 +00:00
|
|
|
seq->sound = sound;
|
2015-03-26 11:35:41 +01:00
|
|
|
seq->len = ceil((double)BKE_sound_get_length(sound) * FPS);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2015-03-26 11:35:41 +01:00
|
|
|
seq->scene_sound = BKE_sound_add_scene_sound(scene, seq, frame_start, frame_start + seq->len, 0);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
#else /* WITH_AUDASPACE */
|
2012-05-17 14:59:11 +00:00
|
|
|
static Sequence *rna_Sequences_new_sound(ID *UNUSED(id), Editing *UNUSED(ed), Main *UNUSED(bmain), ReportList *reports,
|
2012-10-20 10:28:34 +00:00
|
|
|
const char *UNUSED(name), const char *UNUSED(file), int UNUSED(channel),
|
2013-01-06 12:42:47 +00:00
|
|
|
int UNUSED(frame_start))
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Blender compiled without Audaspace support");
|
2012-05-10 15:10:51 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
#endif /* WITH_AUDASPACE */
|
|
|
|
|
2012-05-11 11:05:48 +00:00
|
|
|
static Sequence *rna_Sequences_new_effect(ID *id, Editing *ed, ReportList *reports,
|
2012-05-10 15:10:51 +00:00
|
|
|
const char *name, int type, int channel,
|
2013-01-06 12:42:47 +00:00
|
|
|
int frame_start, int frame_end,
|
2012-05-10 15:10:51 +00:00
|
|
|
Sequence *seq1, Sequence *seq2, Sequence *seq3)
|
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
Sequence *seq;
|
|
|
|
struct SeqEffectHandle sh;
|
2012-10-20 10:28:34 +00:00
|
|
|
int num_inputs = BKE_sequence_effect_get_num_inputs(type);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-10-20 10:28:34 +00:00
|
|
|
switch (num_inputs) {
|
2012-05-10 15:10:51 +00:00
|
|
|
case 0:
|
2013-01-06 12:42:47 +00:00
|
|
|
if (frame_end <= frame_start) {
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Sequences.new_effect: end frame not set");
|
2012-05-10 15:10:51 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 1:
|
|
|
|
if (seq1 == NULL) {
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 1 input sequence");
|
2012-05-10 15:10:51 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 2:
|
|
|
|
if (seq1 == NULL || seq2 == NULL) {
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 2 input sequences");
|
2012-05-10 15:10:51 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case 3:
|
|
|
|
if (seq1 == NULL || seq2 == NULL || seq3 == NULL) {
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Sequences.new_effect: effect takes 3 input sequences");
|
2012-05-10 15:10:51 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
2012-10-20 10:28:34 +00:00
|
|
|
BKE_reportf(reports, RPT_ERROR,
|
|
|
|
"Sequences.new_effect: effect expects more than 3 inputs (%d, should never happen!)",
|
|
|
|
num_inputs);
|
2012-05-10 15:10:51 +00:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2013-01-06 12:42:47 +00:00
|
|
|
seq = alloc_generic_sequence(ed, name, frame_start, channel, type, NULL);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
sh = BKE_sequence_get_effect(seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
seq->seq1 = seq1;
|
|
|
|
seq->seq2 = seq2;
|
|
|
|
seq->seq3 = seq3;
|
|
|
|
|
|
|
|
sh.init(seq);
|
|
|
|
|
|
|
|
if (!seq1) { /* effect has no deps */
|
|
|
|
seq->len = 1;
|
2013-01-06 12:42:47 +00:00
|
|
|
BKE_sequence_tx_set_final_right(seq, frame_end);
|
2012-05-10 15:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
seq->flag |= SEQ_USE_EFFECT_DEFAULT_FADE;
|
|
|
|
|
2015-01-16 10:40:27 +01:00
|
|
|
BKE_sequence_calc(scene, seq);
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
return seq;
|
|
|
|
}
|
|
|
|
|
2012-11-02 09:41:26 +00:00
|
|
|
static void rna_Sequences_remove(ID *id, Editing *ed, ReportList *reports, PointerRNA *seq_ptr)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-11-02 09:41:26 +00:00
|
|
|
Sequence *seq = seq_ptr->data;
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2014-03-20 15:45:20 +06:00
|
|
|
if (BLI_remlink_safe(&ed->seqbase, seq) == false) {
|
2012-11-02 09:41:26 +00:00
|
|
|
BKE_reportf(reports, RPT_ERROR, "Sequence '%s' not in scene '%s'", seq->name + 2, scene->id.name + 2);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-09-06 09:23:38 +00:00
|
|
|
BKE_sequence_free(scene, seq);
|
2012-11-02 09:41:26 +00:00
|
|
|
RNA_POINTER_INVALIDATE(seq_ptr);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
}
|
|
|
|
|
2014-03-28 12:11:52 +11:00
|
|
|
static StripElem *rna_SequenceElements_append(ID *id, Sequence *seq, const char *filename)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-10 15:10:51 +00:00
|
|
|
StripElem *se;
|
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
seq->strip->stripdata = se = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem) * (seq->len + 1));
|
2012-05-10 15:10:51 +00:00
|
|
|
se += seq->len;
|
|
|
|
BLI_strncpy(se->name, filename, sizeof(se->name));
|
|
|
|
seq->len++;
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
return se;
|
|
|
|
}
|
|
|
|
|
2012-05-14 21:32:35 +00:00
|
|
|
static void rna_SequenceElements_pop(ID *id, Sequence *seq, ReportList *reports, int index)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
2012-05-11 11:05:48 +00:00
|
|
|
Scene *scene = (Scene *)id;
|
2012-05-14 21:32:35 +00:00
|
|
|
StripElem *new_seq, *se;
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
if (seq->len == 1) {
|
2012-10-26 17:32:50 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "SequenceElements.pop: cannot pop the last element");
|
2012-05-10 15:10:51 +00:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2012-06-06 06:01:51 +00:00
|
|
|
/* python style negative indexing */
|
|
|
|
if (index < 0) {
|
|
|
|
index += seq->len;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (seq->len <= index || index < 0) {
|
2012-05-14 21:32:35 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "SequenceElements.pop: index out of range");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
new_seq = MEM_callocN(sizeof(StripElem) * (seq->len - 1), "SequenceElements_pop");
|
2012-05-10 15:10:51 +00:00
|
|
|
seq->len--;
|
|
|
|
|
2012-06-08 22:05:26 +00:00
|
|
|
se = seq->strip->stripdata;
|
|
|
|
if (index > 0)
|
|
|
|
memcpy(new_seq, se, sizeof(StripElem) * index);
|
|
|
|
|
|
|
|
if (index < seq->len)
|
|
|
|
memcpy(&new_seq[index], &se[index + 1], sizeof(StripElem) * (seq->len - index));
|
2012-05-14 21:32:35 +00:00
|
|
|
|
|
|
|
MEM_freeN(seq->strip->stripdata);
|
|
|
|
seq->strip->stripdata = new_seq;
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
2012-05-10 15:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-06-21 22:05:34 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
void RNA_api_sequence_strip(StructRNA *srna)
|
|
|
|
{
|
|
|
|
FunctionRNA *func;
|
|
|
|
PropertyRNA *parm;
|
|
|
|
|
2013-01-02 16:15:45 +00:00
|
|
|
func = RNA_def_function(srna, "update", "rna_Sequence_update_rnafunc");
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
|
|
|
RNA_def_function_ui_description(func, "Update the strip dimensions");
|
2014-06-17 17:33:57 +10:00
|
|
|
parm = RNA_def_boolean(func, "data", false, "Data",
|
2013-01-02 16:15:45 +00:00
|
|
|
"Update strip data");
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "strip_elem_from_frame", "BKE_sequencer_give_stripelem");
|
2011-09-19 13:23:58 +00:00
|
|
|
RNA_def_function_ui_description(func, "Return the strip element from a given frame or None");
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
|
2012-05-10 15:22:29 +00:00
|
|
|
"The frame to get the strip element from", -MAXFRAME, MAXFRAME);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "",
|
2012-05-10 15:22:29 +00:00
|
|
|
"strip element of the current frame"));
|
2010-06-21 22:05:34 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
|
2010-06-21 22:05:34 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
2012-03-05 23:30:41 +00:00
|
|
|
parm = RNA_def_pointer(func, "other", "Sequence", "Other", "");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
|
2010-06-21 22:05:34 +00:00
|
|
|
}
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *parm;
|
|
|
|
FunctionRNA *func;
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "SequenceElements");
|
|
|
|
srna = RNA_def_struct(brna, "SequenceElements", NULL);
|
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
RNA_def_struct_ui_text(srna, "SequenceElements", "Collection of SequenceElement");
|
|
|
|
|
2014-03-28 12:11:52 +11:00
|
|
|
func = RNA_def_function(srna, "append", "rna_SequenceElements_append");
|
2012-05-11 11:05:48 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Push an image from ImageSequence.directory");
|
2012-05-10 15:32:01 +00:00
|
|
|
parm = RNA_def_string(func, "filename", "File", 0, "", "Filepath to image");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "elem", "SequenceElement", "", "New SequenceElement");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "pop", "rna_SequenceElements_pop");
|
2012-05-11 11:05:48 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Pop an image off the collection");
|
2012-06-06 06:01:51 +00:00
|
|
|
parm = RNA_def_int(func, "index", -1, INT_MIN, INT_MAX, "", "Index of image to remove", INT_MIN, INT_MAX);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
{
|
|
|
|
StructRNA *srna;
|
|
|
|
PropertyRNA *parm;
|
|
|
|
FunctionRNA *func;
|
|
|
|
|
2017-10-18 15:07:26 +11:00
|
|
|
static const EnumPropertyItem seq_effect_items[] = {
|
2012-06-07 15:49:02 +00:00
|
|
|
{SEQ_TYPE_CROSS, "CROSS", 0, "Cross", ""},
|
|
|
|
{SEQ_TYPE_ADD, "ADD", 0, "Add", ""},
|
|
|
|
{SEQ_TYPE_SUB, "SUBTRACT", 0, "Subtract", ""},
|
|
|
|
{SEQ_TYPE_ALPHAOVER, "ALPHA_OVER", 0, "Alpha Over", ""},
|
|
|
|
{SEQ_TYPE_ALPHAUNDER, "ALPHA_UNDER", 0, "Alpha Under", ""},
|
|
|
|
{SEQ_TYPE_GAMCROSS, "GAMMA_CROSS", 0, "Gamma Cross", ""},
|
|
|
|
{SEQ_TYPE_MUL, "MULTIPLY", 0, "Multiply", ""},
|
|
|
|
{SEQ_TYPE_OVERDROP, "OVER_DROP", 0, "Over Drop", ""},
|
|
|
|
{SEQ_TYPE_WIPE, "WIPE", 0, "Wipe", ""},
|
|
|
|
{SEQ_TYPE_GLOW, "GLOW", 0, "Glow", ""},
|
|
|
|
{SEQ_TYPE_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
|
|
|
|
{SEQ_TYPE_COLOR, "COLOR", 0, "Color", ""},
|
|
|
|
{SEQ_TYPE_SPEED, "SPEED", 0, "Speed", ""},
|
|
|
|
{SEQ_TYPE_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
|
|
|
|
{SEQ_TYPE_ADJUSTMENT, "ADJUSTMENT", 0, "Adjustment Layer", ""},
|
2014-07-19 22:16:10 +06:00
|
|
|
{SEQ_TYPE_GAUSSIAN_BLUR, "GAUSSIAN_BLUR", 0, "Gaussian Blur", ""},
|
2015-07-01 20:29:18 +02:00
|
|
|
{SEQ_TYPE_TEXT, "TEXT", 0, "Text", ""},
|
2017-11-27 23:33:08 +01:00
|
|
|
{SEQ_TYPE_COLORMIX, "COLORMIX", 0, "Color Mix", ""},
|
2019-02-03 14:01:45 +11:00
|
|
|
{0, NULL, 0, NULL, NULL},
|
2012-05-10 15:10:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
RNA_def_property_srna(cprop, "Sequences");
|
|
|
|
srna = RNA_def_struct(brna, "Sequences", NULL);
|
|
|
|
RNA_def_struct_sdna(srna, "Editing");
|
|
|
|
RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences");
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip");
|
2012-06-28 12:32:06 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new movie clip sequence");
|
2012-10-20 05:51:45 +00:00
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to add");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
|
2015-02-12 02:36:33 +11:00
|
|
|
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
|
|
|
|
"The channel for the new sequence", 1, MAXSEQ);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
|
2012-06-07 18:24:36 +00:00
|
|
|
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-06-07 18:24:36 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new_mask", "rna_Sequences_new_mask");
|
2012-06-28 12:32:06 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
2012-10-20 05:51:45 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new mask sequence");
|
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-06-07 18:24:36 +00:00
|
|
|
parm = RNA_def_pointer(func, "mask", "Mask", "", "Mask to add");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
|
2015-02-12 02:36:33 +11:00
|
|
|
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
|
|
|
|
"The channel for the new sequence", 1, MAXSEQ);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
|
2012-05-10 15:22:29 +00:00
|
|
|
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene");
|
2012-06-28 12:32:06 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new scene sequence");
|
2012-10-20 05:51:45 +00:00
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to add");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
|
2015-02-12 02:36:33 +11:00
|
|
|
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
|
|
|
|
"The channel for the new sequence", 1, MAXSEQ);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
|
2012-05-10 15:22:29 +00:00
|
|
|
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new_image", "rna_Sequences_new_image");
|
2012-05-11 11:05:48 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new image sequence");
|
2012-10-20 05:51:45 +00:00
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to image");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2015-02-12 02:36:33 +11:00
|
|
|
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
|
|
|
|
"The channel for the new sequence", 1, MAXSEQ);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
|
2012-05-10 15:22:29 +00:00
|
|
|
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new_movie", "rna_Sequences_new_movie");
|
2012-05-11 11:05:48 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new movie sequence");
|
2012-10-20 05:51:45 +00:00
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2015-02-12 02:36:33 +11:00
|
|
|
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
|
|
|
|
"The channel for the new sequence", 1, MAXSEQ);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
|
2012-05-10 15:22:29 +00:00
|
|
|
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new_sound", "rna_Sequences_new_sound");
|
2012-05-11 11:05:48 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID | FUNC_USE_MAIN);
|
2012-10-20 05:51:45 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new sound sequence");
|
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2015-02-12 02:36:33 +11:00
|
|
|
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
|
|
|
|
"The channel for the new sequence", 1, MAXSEQ);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
|
2012-05-10 15:22:29 +00:00
|
|
|
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "new_effect", "rna_Sequences_new_effect");
|
2012-05-11 11:05:48 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Add a new effect sequence");
|
2012-10-20 05:51:45 +00:00
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2012-05-10 15:10:51 +00:00
|
|
|
parm = RNA_def_enum(func, "type", seq_effect_items, 0, "Type",
|
|
|
|
"type for the new sequence");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2015-02-12 02:36:33 +11:00
|
|
|
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
|
|
|
|
"The channel for the new sequence", 1, MAXSEQ);
|
2013-01-06 10:17:38 +00:00
|
|
|
/* don't use MAXFRAME since it makes importer scripts fail */
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
parm = RNA_def_int(func, "frame_start", 0, INT_MIN, INT_MAX, "",
|
2013-01-06 10:17:38 +00:00
|
|
|
"The start frame for the new sequence", INT_MIN, INT_MAX);
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
|
2013-01-06 12:42:47 +00:00
|
|
|
RNA_def_int(func, "frame_end", 0, INT_MIN, INT_MAX, "",
|
2013-01-06 10:17:38 +00:00
|
|
|
"The end frame for the new sequence", INT_MIN, INT_MAX);
|
2012-11-01 09:54:00 +00:00
|
|
|
RNA_def_pointer(func, "seq1", "Sequence", "", "Sequence 1 for effect");
|
|
|
|
RNA_def_pointer(func, "seq2", "Sequence", "", "Sequence 2 for effect");
|
|
|
|
RNA_def_pointer(func, "seq3", "Sequence", "", "Sequence 3 for effect");
|
2012-05-10 15:10:51 +00:00
|
|
|
/* return type */
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
|
|
|
|
func = RNA_def_function(srna, "remove", "rna_Sequences_remove");
|
2012-11-02 09:41:26 +00:00
|
|
|
RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_function_ui_description(func, "Remove a Sequence");
|
|
|
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "Sequence to remove");
|
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore),
and also makes things slightly cleaner.
To simplify (and make more clear the differences between mere properties
and function parameters), also added RNA_def_parameter_flags function (and
its clear counterpart), to be used instead of RNA_def_property_flag for
function parameters.
This patch is also a big cleanup (some RNA function definitions were
still using 'prop' PropertyRNA pointer, etc.).
And yes, am aware this will be annoying for all branches, but we really need
to get new flags available for properties (will need at least one for override, etc.).
Reviewers: sergey, Severin
Subscribers: dfelinto, brecht
Differential Revision: https://developer.blender.org/D2400
2016-12-12 15:23:55 +01:00
|
|
|
RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);
|
|
|
|
RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0);
|
2012-05-10 15:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2010-06-21 22:05:34 +00:00
|
|
|
#endif
|