Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer.c353
1 files changed, 301 insertions, 52 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c
index 7464df6eb79..f46efb675ca 100644
--- a/source/blender/makesrna/intern/rna_sequencer.c
+++ b/source/blender/makesrna/intern/rna_sequencer.c
@@ -27,10 +27,10 @@
#include "RNA_access.h"
#include "RNA_define.h"
-#include "RNA_types.h"
#include "rna_internal.h"
+#include "DNA_anim_types.h"
#include "DNA_object_types.h"
#include "DNA_scene_types.h"
#include "DNA_sequence_types.h"
@@ -41,9 +41,20 @@
#include "MEM_guardedalloc.h"
#include "WM_types.h"
+#include "BLI_math.h"
#ifdef RNA_RUNTIME
+static float to_dB(float x)
+{
+ return logf(x * x + 1e-30f) * 4.34294480f;
+}
+
+static float from_dB(float x)
+{
+ return expf(x * 0.11512925f);
+}
+
/* build a temp referene to the parent */
static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
{
@@ -131,7 +142,29 @@ static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
rna_Sequence_frame_change_update(scene, seq);
}
-static void rna_Sequence_length_set(PointerRNA *ptr, int value)
+static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ Scene *scene= (Scene*)ptr->id.data;
+
+ seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
+
+ reload_sequence_new_file(scene, seq, FALSE);
+ rna_Sequence_frame_change_update(scene, seq);
+}
+
+static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
+{
+ Sequence *seq= (Sequence*)ptr->data;
+ Scene *scene= (Scene*)ptr->id.data;
+
+ seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
+
+ reload_sequence_new_file(scene, seq, FALSE);
+ rna_Sequence_frame_change_update(scene, seq);
+}
+
+static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
{
Sequence *seq= (Sequence*)ptr->data;
Scene *scene= (Scene*)ptr->id.data;
@@ -140,7 +173,7 @@ static void rna_Sequence_length_set(PointerRNA *ptr, int value)
rna_Sequence_frame_change_update(scene, seq);
}
-static int rna_Sequence_length_get(PointerRNA *ptr)
+static int rna_Sequence_frame_length_get(PointerRNA *ptr)
{
Sequence *seq= (Sequence*)ptr->data;
return seq_tx_get_final_right(seq, 0)-seq_tx_get_final_left(seq, 0);
@@ -237,7 +270,8 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
{
Scene *scene= (Scene*)ptr->id.data;
Sequence *seq= (Sequence*)ptr->data;
- char oldname[32];
+ char oldname[sizeof(seq->name)];
+ AnimData *adt;
/* make a copy of the old name first */
BLI_strncpy(oldname, seq->name+2, sizeof(seq->name)-2);
@@ -249,7 +283,12 @@ static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
seqbase_unique_name_recursive(&scene->ed->seqbase, seq);
/* fix all the animation data which may link to this */
- BKE_all_animdata_fix_paths_rename("sequence_editor.sequences_all", oldname, seq->name+2);
+
+ /* dont rename everywhere because these are per scene */
+ /* BKE_all_animdata_fix_paths_rename("sequence_editor.sequences_all", oldname, seq->name+2); */
+ adt= BKE_animdata_from_id(&scene->id);
+ if(adt)
+ BKE_animdata_fix_paths_rename(&scene->id, adt, "sequence_editor.sequences_all", oldname, seq->name+2, 0, 0, 1);
}
static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
@@ -276,6 +315,8 @@ static StructRNA* rna_Sequence_refine(struct PointerRNA *ptr)
case SEQ_MUL:
case SEQ_OVERDROP:
return &RNA_EffectSequence;
+ case SEQ_MULTICAM:
+ return &RNA_MulticamSequence;
case SEQ_PLUGIN:
return &RNA_PluginSequence;
case SEQ_WIPE:
@@ -314,12 +355,23 @@ static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *
return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
}
+/* TODO, expose seq path setting as a higher level sequencer BKE function */
static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
{
Sequence *seq= (Sequence*)(ptr->data);
char dir[FILE_MAX], name[FILE_MAX];
- BLI_split_dirfile_basic(value, dir, name);
+ if(seq->type == SEQ_SOUND && seq->sound) {
+ /* for sound strips we need to update the sound as well.
+ * arguably, this could load in a new sound rather then modify an existing one.
+ * but while using the sequencer its most likely your not using the sound in the game engine too.
+ */
+ PointerRNA id_ptr;
+ RNA_id_pointer_create((ID *)seq->sound, &id_ptr);
+ RNA_string_set(&id_ptr, "filepath", value);
+ }
+
+ BLI_split_dirfile(value, dir, name);
BLI_strncpy(seq->strip->dir, dir, sizeof(seq->strip->dir));
BLI_strncpy(seq->strip->stripdata->name, name, sizeof(seq->strip->stripdata->name));
}
@@ -342,12 +394,55 @@ static int rna_Sequence_filepath_length(PointerRNA *ptr)
return strlen(path)+1;
}
-static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
+static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
+{
+ StripProxy *proxy= (StripProxy*)(ptr->data);
+ char dir[FILE_MAX], name[FILE_MAX];
+
+ BLI_split_dirfile(value, dir, name);
+ BLI_strncpy(proxy->dir, dir, sizeof(proxy->dir));
+ BLI_strncpy(proxy->file, name, sizeof(proxy->file));
+}
+
+static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
+{
+ StripProxy *proxy= (StripProxy*)(ptr->data);
+ char path[FILE_MAX];
+
+ BLI_join_dirfile(path, proxy->dir, proxy->file);
+ BLI_strncpy(value, path, strlen(path)+1);
+}
+
+static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
+{
+ StripProxy *proxy= (StripProxy*)(ptr->data);
+ char path[FILE_MAX];
+
+ BLI_join_dirfile(path, proxy->dir, proxy->file);
+ return strlen(path)+1;
+}
+
+static float rna_Sequence_attenuation_get(PointerRNA *ptr)
+{
+ Sequence *seq= (Sequence*)(ptr->data);
+
+ return to_dB(seq->volume);
+}
+
+static void rna_Sequence_attenuation_set(PointerRNA *ptr, float value)
+{
+ Sequence *seq= (Sequence*)(ptr->data);
+
+ seq->volume = from_dB(value);
+}
+
+
+/*static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
{
Sequence *seq= (Sequence*)(ptr->data);
char dir[FILE_MAX], name[FILE_MAX];
- BLI_split_dirfile_basic(value, dir, name);
+ BLI_split_dirfile(value, dir, name);
BLI_strncpy(seq->strip->dir, dir, sizeof(seq->strip->dir));
BLI_strncpy(seq->strip->stripdata->name, name, sizeof(seq->strip->stripdata->name));
}
@@ -357,9 +452,9 @@ static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
StripElem *elem= (StripElem*)(ptr->data);
char name[FILE_MAX];
- BLI_split_dirfile_basic(value, NULL, name);
+ BLI_split_dirfile(value, NULL, name);
BLI_strncpy(elem->name, name, sizeof(elem->name));
-}
+}*/
static void rna_Sequence_update(Main *bmain, Scene *scene, PointerRNA *ptr)
{
@@ -379,6 +474,14 @@ static void rna_Sequence_mute_update(Main *bmain, Scene *scene, PointerRNA *ptr)
rna_Sequence_update(bmain, scene, ptr);
}
+static void rna_Sequence_filepath_update(Main *bmain, Scene *scene, PointerRNA *ptr)
+{
+ Sequence *seq= (Sequence*)(ptr->data);
+ reload_sequence_new_file(scene, seq, TRUE);
+ calc_sequence(scene, seq);
+ rna_Sequence_update(bmain, scene, ptr);
+}
+
/* do_versions? */
static float rna_Sequence_opacity_get(PointerRNA *ptr) {
return ((Sequence*)(ptr->data))->blend_opacity / 100.0f;
@@ -387,6 +490,86 @@ static void rna_Sequence_opacity_set(PointerRNA *ptr, float value) {
((Sequence*)(ptr->data))->blend_opacity = value * 100.0f;
}
+
+static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt)
+{
+ struct { Sequence *seq; void *color_balance; } *data= arg_pt;
+
+ if(seq->strip && seq->strip->color_balance == data->color_balance) {
+ data->seq= seq;
+ return -1; /* done so bail out */
+ }
+ return 1;
+}
+static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
+{
+ Scene *scene= ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+ Sequence *seq;
+
+ struct { Sequence *seq; void *color_balance; } data;
+ data.seq= NULL;
+ data.color_balance= ptr->data;
+
+ /* irritating we need to search for our sequence! */
+ seqbase_recursive_apply(&ed->seqbase, colbalance_seq_cmp_cb, &data);
+ seq= data.seq;
+
+ if (seq && seq->name+2)
+ return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", seq->name+2);
+ else
+ return BLI_strdup("");
+}
+
+static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
+{
+ Scene *scene= ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+
+ if(ed==NULL)
+ return;
+
+ /* convert from abs to relative and back */
+ if((ed->over_flag & SEQ_EDIT_OVERLAY_ABS)==0 && value) {
+ ed->over_cfra= scene->r.cfra + ed->over_ofs;
+ ed->over_flag |= SEQ_EDIT_OVERLAY_ABS;
+ }
+ else if((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
+ ed->over_ofs= ed->over_cfra - scene->r.cfra;
+ ed->over_flag &= ~SEQ_EDIT_OVERLAY_ABS;
+ }
+}
+
+static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
+{
+ Scene *scene= (Scene *)ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+
+ if(ed==NULL)
+ return scene->r.cfra;
+
+ if(ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
+ return ed->over_cfra - scene->r.cfra;
+ else
+ return ed->over_ofs;
+
+}
+
+static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
+{
+ Scene *scene= (Scene *)ptr->id.data;
+ Editing *ed= seq_give_editing(scene, FALSE);
+
+ if(ed==NULL)
+ return;
+
+
+ if(ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
+ ed->over_cfra= (scene->r.cfra + value);
+ else
+ ed->over_ofs= value;
+}
+
#else
static void rna_def_strip_element(BlenderRNA *brna)
@@ -400,9 +583,7 @@ static void rna_def_strip_element(BlenderRNA *brna)
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
RNA_def_property_string_sdna(prop, NULL, "name");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_ui_text(prop, "Filename", "");
- RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceElement_filename_set");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -447,7 +628,7 @@ static void rna_def_strip_transform(BlenderRNA *brna)
prop= RNA_def_property(srna, "offset_x", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "xofs");
- RNA_def_property_ui_text(prop, "Offset Y", "");
+ RNA_def_property_ui_text(prop, "Offset X", "");
RNA_def_property_ui_range(prop, -4096, 4096, 1, 0);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -469,12 +650,13 @@ static void rna_def_strip_proxy(BlenderRNA *brna)
prop= RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
RNA_def_property_string_sdna(prop, NULL, "dir");
- RNA_def_property_ui_text(prop, "Directory", "Location to story the proxy file");
+ RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "file", PROP_STRING, PROP_DIRPATH);
- RNA_def_property_string_sdna(prop, NULL, "file");
- RNA_def_property_ui_text(prop, "File", "Proxy file name");
+ prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
+ RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
+ RNA_def_property_string_funcs(prop, "rna_Sequence_proxy_filepath_get", "rna_Sequence_proxy_filepath_length", "rna_Sequence_proxy_filepath_set");
+
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -489,14 +671,17 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
prop= RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
+ RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
+ RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
+ RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "inverse_gain", PROP_BOOLEAN, PROP_NONE);
@@ -513,7 +698,9 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_LIFT);
RNA_def_property_ui_text(prop, "Inverse Lift", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
+
+ RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
+
/* not yet used
prop= RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
@@ -530,7 +717,6 @@ static void rna_def_sequence(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
- FunctionRNA *func;
static const EnumPropertyItem seq_type_items[]= {
{SEQ_IMAGE, "IMAGE", 0, "Image", ""},
@@ -552,6 +738,7 @@ static void rna_def_sequence(BlenderRNA *brna)
{SEQ_TRANSFORM, "TRANSFORM", 0, "Transform", ""},
{SEQ_COLOR, "COLOR", 0, "Color", ""},
{SEQ_SPEED, "SPEED", 0, "Speed", ""},
+ {SEQ_MULTICAM, "MULTICAM", 0, "Multicam Selector", ""},
{0, NULL, 0, NULL, NULL}};
static const EnumPropertyItem blend_mode_items[]= {
@@ -585,35 +772,30 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
//prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
- //RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by this sequence");
+ //RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by this sequence");
/* flags */
prop= RNA_def_property(srna, "selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
RNA_def_property_ui_text(prop, "Selected", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER_SELECT, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
prop= RNA_def_property(srna, "left_handle_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LEFTSEL);
RNA_def_property_ui_text(prop, "Left Handle Selected", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER_SELECT, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
prop= RNA_def_property(srna, "right_handle_selected", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_RIGHTSEL);
RNA_def_property_ui_text(prop, "Right Handle Selected", "");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER_SELECT, NULL);
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER|NA_SELECTED, NULL);
prop= RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
RNA_def_property_ui_text(prop, "Mute", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_mute_update");
- prop= RNA_def_property(srna, "frame_locked", PROP_BOOLEAN, PROP_NONE);
- RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_IPO_FRAME_LOCKED);
- RNA_def_property_ui_text(prop, "Frame Locked", "Lock the animation curve to the global frame counter");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
-
prop= RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed");
@@ -621,55 +803,60 @@ static void rna_def_sequence(BlenderRNA *brna)
/* strip positioning */
- prop= RNA_def_property(srna, "length", PROP_INT, PROP_TIME);
- RNA_def_property_int_sdna(prop, NULL, "len");
+ prop= RNA_def_property(srna, "frame_final_length", PROP_INT, PROP_TIME);
RNA_def_property_range(prop, 1, MAXFRAME);
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied");
- RNA_def_property_int_funcs(prop, "rna_Sequence_length_get", "rna_Sequence_length_set",NULL);
+ RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set",NULL);
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "frame_length", PROP_INT, PROP_TIME);
+ RNA_def_property_int_sdna(prop, NULL, "len");
+ RNA_def_property_clear_flag(prop, PROP_EDITABLE|PROP_ANIMATABLE);
+ RNA_def_property_range(prop, 1, MAXFRAME);
+ RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip before the handles are applied");
- prop= RNA_def_property(srna, "start_frame", PROP_INT, PROP_TIME);
+ prop= RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "start");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "Start Frame", "");
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set",NULL); // overlap tests and calc_seq_disp
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "start_frame_final", PROP_INT, PROP_TIME);
+ prop= RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startdisp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
- RNA_def_property_ui_text(prop, "Start Frame", "Start frame displayed in the sequence editor after offsets are applied, setting this is equivilent to moving the handle, not the actual start frame");
+ RNA_def_property_ui_text(prop, "Start Frame", "Start frame displayed in the sequence editor after offsets are applied, setting this is equivalent to moving the handle, not the actual start frame");
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL); // overlap tests and calc_seq_disp
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "end_frame_final", PROP_INT, PROP_TIME);
+ prop= RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "enddisp");
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
RNA_def_property_ui_text(prop, "End Frame", "End frame displayed in the sequence editor after offsets are applied");
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL); // overlap tests and calc_seq_disp
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "start_offset", PROP_INT, PROP_TIME);
+ prop= RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_ui_text(prop, "Start Offset", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "end_offset", PROP_INT, PROP_TIME);
+ prop= RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endofs");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
- RNA_def_property_ui_text(prop, "End offset", "");
+ RNA_def_property_ui_text(prop, "End Offset", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "start_still", PROP_INT, PROP_TIME);
+ prop= RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "startstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_range(prop, 0, MAXFRAME);
RNA_def_property_ui_text(prop, "Start Still", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- prop= RNA_def_property(srna, "end_still", PROP_INT, PROP_TIME);
+ prop= RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
RNA_def_property_int_sdna(prop, NULL, "endstill");
RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap tests
RNA_def_property_range(prop, 0, MAXFRAME);
@@ -704,7 +891,7 @@ static void rna_def_sequence(BlenderRNA *brna)
prop= RNA_def_property(srna, "use_effect_default_fade", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_EFFECT_DEFAULT_FADE);
- RNA_def_property_ui_text(prop, "Use Default Fade", "Fade effect using the builtin default (usually make transition as long as effect strip)");
+ RNA_def_property_ui_text(prop, "Use Default Fade", "Fade effect using the built-in default (usually make transition as long as effect strip)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
@@ -713,12 +900,7 @@ static void rna_def_sequence(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Speed effect fader position", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
- /* functions */
- func= RNA_def_function(srna, "getStripElem", "give_stripelem");
- RNA_def_function_ui_description(func, "Return the strip element from a given frame or None.");
- prop= RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame", "The frame to get the strip element from", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(prop, PROP_REQUIRED);
- RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "", "strip element of the current frame"));
+ RNA_api_sequence_strip(srna);
}
static void rna_def_editor(BlenderRNA *brna)
@@ -750,6 +932,24 @@ static void rna_def_editor(BlenderRNA *brna)
prop= RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+
+ prop= RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
+ RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay ontop of the sequencer");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+
+ prop= RNA_def_property(srna, "overlay_lock", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_ABS);
+ RNA_def_property_ui_text(prop, "Overlay Lock", "");
+ RNA_def_property_boolean_funcs(prop, NULL, "rna_SequenceEditor_overlay_lock_set");
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
+
+ /* access to fixed and relative frame */
+ prop= RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Overlay Offset", "");
+ RNA_def_property_int_funcs(prop, "rna_SequenceEditor_overlay_frame_get", "rna_SequenceEditor_overlay_frame_set", NULL);
+ RNA_def_property_update(prop, NC_SPACE|ND_SPACE_SEQUENCER, NULL);
RNA_def_property_ui_text(prop, "Active Strip", "Sequencers active strip");
}
@@ -792,6 +992,13 @@ static void rna_def_filter_video(StructRNA *srna)
RNA_def_property_ui_text(prop, "Multiply Colors", "");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ prop= RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
+ RNA_def_property_float_sdna(prop, NULL, "sat");
+ RNA_def_property_range(prop, 0.0f, 20.0f);
+ RNA_def_property_ui_range(prop, 0.0f, 2.0f, 3, 3);
+ RNA_def_property_ui_text(prop, "Saturation", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
prop= RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 1.0f, 30.0f);
RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
@@ -845,6 +1052,11 @@ static void rna_def_proxy(StructRNA *srna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_DIR);
RNA_def_property_ui_text(prop, "Proxy Custom Directory", "Use a custom directory to store data");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ prop= RNA_def_property(srna, "proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY_CUSTOM_FILE);
+ RNA_def_property_ui_text(prop, "Proxy Custom File", "Use a custom file to read proxy data from");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
static void rna_def_input(StructRNA *srna)
@@ -853,13 +1065,16 @@ static void rna_def_input(StructRNA *srna)
prop= RNA_def_property(srna, "animation_start_offset", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); // overlap tests
+
RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
prop= RNA_def_property(srna, "animation_end_offset", PROP_INT, PROP_UNSIGNED);
RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
- RNA_def_property_clear_flag(prop, PROP_EDITABLE); // overlap test
+ RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
+ RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); // overlap tests
RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
}
@@ -921,6 +1136,11 @@ static void rna_def_scene(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ prop= RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
+ RNA_def_property_flag(prop, PROP_EDITABLE);
+ RNA_def_property_ui_text(prop, "Camera Override", "Override the scenes active camera");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
rna_def_filter_video(srna);
rna_def_proxy(srna);
rna_def_input(srna);
@@ -945,7 +1165,7 @@ static void rna_def_movie(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "File", "");
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
"rna_Sequence_filepath_set");
- RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_filepath_update");
rna_def_filter_video(srna);
rna_def_proxy(srna);
@@ -968,10 +1188,17 @@ static void rna_def_sound(BlenderRNA *brna)
prop= RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "volume");
- RNA_def_property_range(prop, 0.0f, 2.0f);
+ RNA_def_property_range(prop, 0.0f, 100.0f);
RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+ prop= RNA_def_property(srna, "attenuation", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_range(prop, -100.0f, +40.0f);
+ RNA_def_property_ui_text(prop, "Attenuation/db", "Attenuation in dezibel");
+ RNA_def_property_float_funcs(prop, "rna_Sequence_attenuation_get", "rna_Sequence_attenuation_set", NULL);
+
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
prop= RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
RNA_def_property_ui_text(prop, "File", "");
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
@@ -989,7 +1216,28 @@ static void rna_def_effect(BlenderRNA *brna)
RNA_def_struct_ui_text(srna, "Effect Sequence", "Sequence strip applying an effect on the images created by other strips");
RNA_def_struct_sdna(srna, "Sequence");
+ rna_def_filter_video(srna);
+ rna_def_proxy(srna);
+}
+
+static void rna_def_multicam(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna = RNA_def_struct(brna, "MulticamSequence", "Sequence");
+ RNA_def_struct_ui_text(srna, "Multicam Select Sequence", "Sequence strip to perform multicam editing: select channel from below");
+ RNA_def_struct_sdna(srna, "Sequence");
+
+ prop= RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "multicam_source");
+ RNA_def_property_range(prop, 0, MAXSEQ-1);
+ RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
+ RNA_def_property_update(prop, NC_SCENE|ND_SEQUENCER, "rna_Sequence_update");
+
+ rna_def_filter_video(srna);
rna_def_proxy(srna);
+ rna_def_input(srna);
}
static void rna_def_plugin(BlenderRNA *brna)
@@ -1182,7 +1430,7 @@ static void rna_def_solid_color(BlenderRNA *brna)
PropertyRNA *prop;
srna = RNA_def_struct(brna, "ColorSequence", "EffectSequence");
- RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single color");
+ RNA_def_struct_ui_text(srna, "Color Sequence", "Sequence strip creating an image filled with a single g");
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
@@ -1240,6 +1488,7 @@ void RNA_def_sequencer(BlenderRNA *brna)
rna_def_movie(brna);
rna_def_sound(brna);
rna_def_effect(brna);
+ rna_def_multicam(brna);
rna_def_plugin(brna);
rna_def_wipe(brna);
rna_def_glow(brna);