2011-02-23 10:52:22 +00:00
|
|
|
/*
|
2008-12-15 10:48:04 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
|
|
|
|
*
|
|
|
|
|
* 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2008-12-15 10:48:04 +00:00
|
|
|
*
|
|
|
|
|
* Contributor(s): Blender Foundation (2008)
|
|
|
|
|
*
|
|
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
|
|
|
|
*/
|
|
|
|
|
|
2011-02-27 20:20:01 +00:00
|
|
|
/** \file blender/makesrna/intern/rna_sequencer.c
|
|
|
|
|
* \ingroup RNA
|
|
|
|
|
*/
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
|
#include <limits.h>
|
|
|
|
|
|
2010-07-07 16:17:18 +00:00
|
|
|
#include "DNA_anim_types.h"
|
2008-12-15 10:48:04 +00:00
|
|
|
#include "DNA_object_types.h"
|
|
|
|
|
#include "DNA_scene_types.h"
|
|
|
|
|
#include "DNA_sequence_types.h"
|
2012-03-21 18:02:29 +00:00
|
|
|
#include "DNA_movieclip_types.h"
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2013-01-24 21:57:13 +00:00
|
|
|
#include "BLI_math.h"
|
|
|
|
|
|
2015-08-16 17:32:01 +10:00
|
|
|
#include "BLT_translation.h"
|
2013-03-18 18:43:22 +00:00
|
|
|
|
2010-03-01 05:19:07 +00:00
|
|
|
#include "BKE_animsys.h"
|
2010-08-13 14:23:44 +00:00
|
|
|
#include "BKE_global.h"
|
2009-12-13 14:56:45 +00:00
|
|
|
#include "BKE_sequencer.h"
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
#include "BKE_sound.h"
|
2009-06-10 06:02:08 +00:00
|
|
|
|
2009-06-13 01:30:47 +00:00
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
|
|
2013-03-07 02:44:55 +00:00
|
|
|
#include "RNA_access.h"
|
|
|
|
|
#include "RNA_define.h"
|
|
|
|
|
#include "RNA_enum_types.h"
|
|
|
|
|
|
|
|
|
|
#include "rna_internal.h"
|
|
|
|
|
|
2009-07-08 17:41:45 +00:00
|
|
|
#include "WM_types.h"
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
typedef struct EffectInfo {
|
2012-05-10 15:10:51 +00:00
|
|
|
const char *struct_name;
|
|
|
|
|
const char *ui_name;
|
|
|
|
|
const char *ui_desc;
|
2012-05-10 15:22:29 +00:00
|
|
|
void (*func)(StructRNA *);
|
2012-05-10 15:10:51 +00:00
|
|
|
int inputs;
|
|
|
|
|
} EffectInfo;
|
|
|
|
|
|
2015-11-23 13:49:52 +11:00
|
|
|
EnumPropertyItem rna_enum_sequence_modifier_type_items[] = {
|
2012-08-20 10:15:32 +00:00
|
|
|
{seqModifierType_ColorBalance, "COLOR_BALANCE", ICON_NONE, "Color Balance", ""},
|
|
|
|
|
{seqModifierType_Curves, "CURVES", ICON_NONE, "Curves", ""},
|
2012-08-22 16:44:32 +00:00
|
|
|
{seqModifierType_HueCorrect, "HUE_CORRECT", ICON_NONE, "Hue Correct", ""},
|
2012-08-24 09:07:04 +00:00
|
|
|
{seqModifierType_BrightContrast, "BRIGHT_CONTRAST", ICON_NONE, "Bright/Contrast", ""},
|
2013-05-08 14:20:57 +00:00
|
|
|
{seqModifierType_Mask, "MASK", ICON_NONE, "Mask", ""},
|
2015-12-28 11:55:14 +01:00
|
|
|
{seqModifierType_WhiteBalance, "WHITE_BALANCE", ICON_NONE, "White Balance", ""},
|
2012-08-20 10:15:32 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2009-07-08 17:41:45 +00:00
|
|
|
#ifdef RNA_RUNTIME
|
2009-06-16 00:52:21 +00:00
|
|
|
|
2012-08-20 10:15:32 +00:00
|
|
|
#include "BKE_report.h"
|
2015-04-02 21:05:12 +11:00
|
|
|
#include "BKE_idprop.h"
|
2012-08-20 10:15:32 +00:00
|
|
|
|
|
|
|
|
#include "WM_api.h"
|
|
|
|
|
|
2014-02-25 13:49:38 +06:00
|
|
|
#include "IMB_imbuf.h"
|
|
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
typedef struct SequenceSearchData {
|
|
|
|
|
Sequence *seq;
|
|
|
|
|
void *data;
|
2012-08-23 13:32:54 +00:00
|
|
|
SequenceModifierData *smd;
|
2012-08-08 16:46:40 +00:00
|
|
|
} SequenceSearchData;
|
|
|
|
|
|
2012-07-16 23:23:33 +00:00
|
|
|
/* build a temp reference to the parent */
|
2009-12-09 18:47:52 +00:00
|
|
|
static void meta_tmp_ref(Sequence *seq_par, Sequence *seq)
|
2009-12-09 16:00:53 +00:00
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
for (; seq; seq = seq->next) {
|
|
|
|
|
seq->tmp = seq_par;
|
2012-06-07 15:49:02 +00:00
|
|
|
if (seq->type == SEQ_TYPE_META) {
|
2009-12-09 16:00:53 +00:00
|
|
|
meta_tmp_ref(seq, seq->seqbase.first);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-08-29 04:08:44 +00:00
|
|
|
static void rna_SequenceElement_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2013-08-29 04:08:44 +00:00
|
|
|
|
|
|
|
|
if (ed) {
|
|
|
|
|
StripElem *se = (StripElem *)ptr->data;
|
|
|
|
|
Sequence *seq;
|
|
|
|
|
|
|
|
|
|
/* slow but we can't avoid! */
|
|
|
|
|
seq = BKE_sequencer_from_elem(&ed->seqbase, se);
|
|
|
|
|
if (seq) {
|
|
|
|
|
BKE_sequence_invalidate_cache(scene, seq);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2013-03-25 17:22:00 +00:00
|
|
|
static void rna_Sequence_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2013-03-25 17:22:00 +00:00
|
|
|
|
|
|
|
|
if (ed) {
|
|
|
|
|
Sequence *seq = (Sequence *) ptr->data;
|
|
|
|
|
|
|
|
|
|
BKE_sequence_invalidate_cache(scene, seq);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-09 16:00:53 +00:00
|
|
|
static void rna_SequenceEditor_sequences_all_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2009-12-09 16:00:53 +00:00
|
|
|
|
|
|
|
|
meta_tmp_ref(NULL, ed->seqbase.first);
|
|
|
|
|
|
|
|
|
|
rna_iterator_listbase_begin(iter, &ed->seqbase, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2015-04-07 16:08:46 +02:00
|
|
|
static void rna_SequenceEditor_update_cache(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
|
2015-03-26 17:54:16 +01:00
|
|
|
{
|
2015-04-07 16:08:46 +02:00
|
|
|
Editing *ed = scene->ed;
|
2015-03-26 17:54:16 +01:00
|
|
|
|
|
|
|
|
BKE_sequencer_free_imbuf(scene, &ed->seqbase, false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
2009-12-09 16:00:53 +00:00
|
|
|
static void rna_SequenceEditor_sequences_all_next(CollectionPropertyIterator *iter)
|
|
|
|
|
{
|
2014-04-05 14:36:18 +02:00
|
|
|
ListBaseIterator *internal = &iter->internal.listbase;
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)internal->link;
|
2009-12-09 16:00:53 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (seq->seqbase.first)
|
2012-05-10 15:22:29 +00:00
|
|
|
internal->link = (Link *)seq->seqbase.first;
|
2012-03-05 23:30:41 +00:00
|
|
|
else if (seq->next)
|
2012-05-10 15:22:29 +00:00
|
|
|
internal->link = (Link *)seq->next;
|
2009-12-09 16:00:53 +00:00
|
|
|
else {
|
2012-03-05 23:30:41 +00:00
|
|
|
internal->link = NULL;
|
2009-12-09 16:00:53 +00:00
|
|
|
|
|
|
|
|
do {
|
2012-03-18 07:38:51 +00:00
|
|
|
seq = seq->tmp; /* XXX - seq's don't reference their parents! */
|
2012-03-05 23:30:41 +00:00
|
|
|
if (seq && seq->next) {
|
2012-05-10 15:22:29 +00:00
|
|
|
internal->link = (Link *)seq->next;
|
2009-12-09 16:00:53 +00:00
|
|
|
break;
|
|
|
|
|
}
|
2012-03-05 23:30:41 +00:00
|
|
|
} while (seq);
|
2009-12-09 16:00:53 +00:00
|
|
|
}
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
iter->valid = (internal->link != NULL);
|
2009-12-09 16:00:53 +00:00
|
|
|
}
|
|
|
|
|
|
2009-12-15 11:27:46 +00:00
|
|
|
/* internal use */
|
2011-05-26 09:20:30 +00:00
|
|
|
static int rna_SequenceEditor_elements_length(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2011-05-26 09:20:30 +00:00
|
|
|
|
|
|
|
|
/* Hack? copied from sequencer.c::reload_sequence_new_file() */
|
2012-05-10 15:22:29 +00:00
|
|
|
size_t olen = MEM_allocN_len(seq->strip->stripdata) / sizeof(struct StripElem);
|
2011-05-26 09:20:30 +00:00
|
|
|
|
|
|
|
|
/* the problem with seq->strip->len and seq->len is that it's discounted from the offset (hard cut trim) */
|
|
|
|
|
return (int) olen;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SequenceEditor_elements_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
rna_iterator_array_begin(iter, (void *)seq->strip->stripdata, sizeof(StripElem),
|
2012-03-18 09:27:36 +00:00
|
|
|
rna_SequenceEditor_elements_length(ptr), 0, NULL);
|
2011-05-26 09:20:30 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
static void rna_Sequence_views_format_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
rna_Sequence_update(bmain, scene, ptr);
|
|
|
|
|
}
|
|
|
|
|
|
2013-03-25 17:22:00 +00:00
|
|
|
static void do_sequence_frame_change_update(Scene *scene, Sequence *seq)
|
2009-06-10 19:57:06 +00:00
|
|
|
{
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 11:15:40 +00:00
|
|
|
ListBase *seqbase = BKE_sequence_seqbase(&ed->seqbase, seq);
|
2013-05-02 08:25:22 +00:00
|
|
|
Sequence *tseq;
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc_disp(scene, seq);
|
2009-12-15 11:27:46 +00:00
|
|
|
|
2013-05-02 08:25:22 +00:00
|
|
|
/* ensure effects are always fit in length to their input */
|
|
|
|
|
|
|
|
|
|
/* TODO(sergey): probably could be optimized.
|
|
|
|
|
* in terms skipping update of non-changing strips
|
|
|
|
|
*/
|
|
|
|
|
for (tseq = seqbase->first; tseq; tseq = tseq->next) {
|
|
|
|
|
if (tseq->seq1 || tseq->seq2 || tseq->seq3) {
|
|
|
|
|
BKE_sequence_calc(scene, tseq);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
if (BKE_sequence_test_overlap(seqbase, seq)) {
|
|
|
|
|
BKE_sequence_base_shuffle(seqbase, seq, scene); /* XXX - BROKEN!, uses context seqbasep */
|
2009-06-10 19:57:06 +00:00
|
|
|
}
|
2012-05-11 10:04:55 +00:00
|
|
|
BKE_sequencer_sort(scene);
|
2009-12-15 11:27:46 +00:00
|
|
|
}
|
|
|
|
|
|
2013-03-25 17:22:00 +00:00
|
|
|
/* A simple wrapper around above func, directly usable as prop update func.
|
|
|
|
|
* Also invalidate cache if needed.
|
|
|
|
|
*/
|
|
|
|
|
static void rna_Sequence_frame_change_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
|
|
|
|
do_sequence_frame_change_update(scene, (Sequence *)ptr->data);
|
|
|
|
|
rna_Sequence_update(bmain, scene, ptr);
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-15 11:27:46 +00:00
|
|
|
static void rna_Sequence_start_frame_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2009-12-15 11:27:46 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_translate(scene, seq, value - seq->start);
|
2013-03-25 17:22:00 +00:00
|
|
|
do_sequence_frame_change_update(scene, seq);
|
2009-12-15 11:27:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_start_frame_final_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2009-12-15 11:27:46 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_tx_set_final_left(seq, value);
|
|
|
|
|
BKE_sequence_single_fix(seq);
|
2013-03-25 17:22:00 +00:00
|
|
|
do_sequence_frame_change_update(scene, seq);
|
2009-12-15 11:27:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_end_frame_final_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2009-12-15 11:27:46 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_tx_set_final_right(seq, value);
|
|
|
|
|
BKE_sequence_single_fix(seq);
|
2013-03-25 17:22:00 +00:00
|
|
|
do_sequence_frame_change_update(scene, seq);
|
2009-06-10 19:57:06 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-18 18:30:55 +00:00
|
|
|
static void rna_Sequence_anim_startofs_final_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2010-04-18 18:30:55 +00:00
|
|
|
|
|
|
|
|
seq->anim_startofs = MIN2(value, seq->len + seq->anim_startofs);
|
|
|
|
|
|
2014-03-20 15:45:20 +06:00
|
|
|
BKE_sequence_reload_new_file(scene, seq, false);
|
2013-03-25 17:22:00 +00:00
|
|
|
do_sequence_frame_change_update(scene, seq);
|
2010-04-18 18:30:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_anim_endofs_final_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2010-04-18 18:30:55 +00:00
|
|
|
|
|
|
|
|
seq->anim_endofs = MIN2(value, seq->len + seq->anim_endofs);
|
|
|
|
|
|
2014-03-20 15:45:20 +06:00
|
|
|
BKE_sequence_reload_new_file(scene, seq, false);
|
2013-03-25 17:22:00 +00:00
|
|
|
do_sequence_frame_change_update(scene, seq);
|
2010-04-18 18:30:55 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-22 13:45:21 +00:00
|
|
|
static void rna_Sequence_frame_length_set(PointerRNA *ptr, int value)
|
2009-06-10 19:57:06 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2009-06-10 19:57:06 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_tx_set_final_right(seq, seq->start + value);
|
2013-03-25 17:22:00 +00:00
|
|
|
do_sequence_frame_change_update(scene, seq);
|
2009-06-10 19:57:06 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-22 13:45:21 +00:00
|
|
|
static int rna_Sequence_frame_length_get(PointerRNA *ptr)
|
2009-06-10 19:57:06 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2014-03-20 15:45:20 +06:00
|
|
|
return BKE_sequence_tx_get_final_right(seq, false) - BKE_sequence_tx_get_final_left(seq, false);
|
2009-06-10 19:57:06 +00:00
|
|
|
}
|
|
|
|
|
|
2011-11-16 20:03:54 +00:00
|
|
|
static int rna_Sequence_frame_editable(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2011-11-16 20:03:54 +00:00
|
|
|
/* Effect sequences' start frame and length must be readonly! */
|
2012-08-08 11:15:40 +00:00
|
|
|
return (BKE_sequence_effect_get_num_inputs(seq->type)) ? 0 : PROP_EDITABLE;
|
2011-11-16 20:03:54 +00:00
|
|
|
}
|
|
|
|
|
|
2009-12-08 12:59:21 +00:00
|
|
|
static void rna_Sequence_channel_set(PointerRNA *ptr, int value)
|
2009-06-10 19:57:06 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 11:15:40 +00:00
|
|
|
ListBase *seqbase = BKE_sequence_seqbase(&ed->seqbase, seq);
|
2009-06-10 19:57:06 +00:00
|
|
|
|
2015-02-12 06:18:02 +11:00
|
|
|
/* check channel increment or decrement */
|
|
|
|
|
const int channel_delta = (value >= seq->machine) ? 1 : -1;
|
|
|
|
|
seq->machine = value;
|
|
|
|
|
|
2014-01-16 19:15:53 +11:00
|
|
|
if (BKE_sequence_test_overlap(seqbase, seq)) {
|
2015-02-12 06:18:02 +11:00
|
|
|
/* XXX - BROKEN!, uses context seqbasep */
|
|
|
|
|
BKE_sequence_base_shuffle_ex(seqbase, seq, scene, channel_delta);
|
2009-06-10 19:57:06 +00:00
|
|
|
}
|
2012-05-11 10:04:55 +00:00
|
|
|
BKE_sequencer_sort(scene);
|
2009-06-10 19:57:06 +00:00
|
|
|
}
|
|
|
|
|
|
2014-06-25 16:45:03 +10:00
|
|
|
static void rna_Sequence_frame_offset_range(PointerRNA *ptr, int *min, int *max,
|
|
|
|
|
int *UNUSED(softmin), int *UNUSED(softmax))
|
|
|
|
|
{
|
|
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
*min = ELEM(seq->type, SEQ_TYPE_SOUND_RAM, SEQ_TYPE_SOUND_HD) ? 0 : INT_MIN;
|
|
|
|
|
*max = INT_MAX;
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-08 12:59:21 +00:00
|
|
|
static void rna_Sequence_use_proxy_set(PointerRNA *ptr, int value)
|
2009-06-10 22:03:50 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2015-01-29 12:36:23 +01:00
|
|
|
BKE_sequencer_proxy_set(seq, value != 0);
|
2009-06-10 22:03:50 +00:00
|
|
|
}
|
|
|
|
|
|
2009-12-08 12:59:21 +00:00
|
|
|
static void rna_Sequence_use_translation_set(PointerRNA *ptr, int value)
|
2009-06-11 11:54:56 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (value) {
|
2009-06-11 11:54:56 +00:00
|
|
|
seq->flag |= SEQ_USE_TRANSFORM;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (seq->strip->transform == NULL) {
|
2009-06-11 11:54:56 +00:00
|
|
|
seq->strip->transform = MEM_callocN(sizeof(struct StripTransform), "StripTransform");
|
|
|
|
|
}
|
2012-03-24 06:24:53 +00:00
|
|
|
}
|
|
|
|
|
else {
|
2009-06-11 11:54:56 +00:00
|
|
|
seq->flag ^= SEQ_USE_TRANSFORM;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-08 12:59:21 +00:00
|
|
|
static void rna_Sequence_use_crop_set(PointerRNA *ptr, int value)
|
2009-06-11 11:54:56 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (value) {
|
2009-06-11 11:54:56 +00:00
|
|
|
seq->flag |= SEQ_USE_CROP;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (seq->strip->crop == NULL) {
|
2009-06-11 11:54:56 +00:00
|
|
|
seq->strip->crop = MEM_callocN(sizeof(struct StripCrop), "StripCrop");
|
|
|
|
|
}
|
2012-03-24 06:24:53 +00:00
|
|
|
}
|
|
|
|
|
else {
|
2009-06-11 11:54:56 +00:00
|
|
|
seq->flag ^= SEQ_USE_CROP;
|
|
|
|
|
}
|
|
|
|
|
}
|
2010-07-23 17:48:16 +00:00
|
|
|
|
|
|
|
|
static int transform_seq_cmp_cb(Sequence *seq, void *arg_pt)
|
|
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData *data = arg_pt;
|
2010-07-23 17:48:16 +00:00
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
if (seq->strip && seq->strip->transform == data->data) {
|
2012-03-05 23:30:41 +00:00
|
|
|
data->seq = seq;
|
2010-07-23 17:48:16 +00:00
|
|
|
return -1; /* done so bail out */
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
static Sequence *sequence_get_by_transform(Editing *ed, StripTransform *transform)
|
2010-07-23 17:48:16 +00:00
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData data;
|
2010-07-23 17:48:16 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
data.seq = NULL;
|
2012-08-08 16:46:40 +00:00
|
|
|
data.data = transform;
|
2010-07-23 17:48:16 +00:00
|
|
|
|
|
|
|
|
/* irritating we need to search for our sequence! */
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequencer_base_recursive_apply(&ed->seqbase, transform_seq_cmp_cb, &data);
|
2012-08-08 16:46:40 +00:00
|
|
|
|
|
|
|
|
return data.seq;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static char *rna_SequenceTransform_path(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 16:46:40 +00:00
|
|
|
Sequence *seq = sequence_get_by_transform(ed, ptr->data);
|
2010-07-23 17:48:16 +00:00
|
|
|
|
2013-04-23 20:10:22 +00:00
|
|
|
if (seq && seq->name + 2) {
|
|
|
|
|
char name_esc[(sizeof(seq->name) - 2) * 2];
|
|
|
|
|
|
|
|
|
|
BLI_strescape(name_esc, seq->name + 2, sizeof(name_esc));
|
|
|
|
|
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].transform", name_esc);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2010-07-23 17:48:16 +00:00
|
|
|
return BLI_strdup("");
|
2013-04-23 20:10:22 +00:00
|
|
|
}
|
2010-07-23 17:48:16 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_SequenceTransform_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2012-08-08 16:46:40 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 16:46:40 +00:00
|
|
|
Sequence *seq = sequence_get_by_transform(ed, ptr->data);
|
|
|
|
|
|
|
|
|
|
BKE_sequence_invalidate_cache(scene, seq);
|
|
|
|
|
}
|
|
|
|
|
|
2010-07-23 17:48:16 +00:00
|
|
|
static int crop_seq_cmp_cb(Sequence *seq, void *arg_pt)
|
|
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData *data = arg_pt;
|
2010-07-23 17:48:16 +00:00
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
if (seq->strip && seq->strip->crop == data->data) {
|
2012-03-05 23:30:41 +00:00
|
|
|
data->seq = seq;
|
2010-07-23 17:48:16 +00:00
|
|
|
return -1; /* done so bail out */
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
static Sequence *sequence_get_by_crop(Editing *ed, StripCrop *crop)
|
2010-07-23 17:48:16 +00:00
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData data;
|
2010-07-23 17:48:16 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
data.seq = NULL;
|
2012-08-08 16:46:40 +00:00
|
|
|
data.data = crop;
|
2010-07-23 17:48:16 +00:00
|
|
|
|
|
|
|
|
/* irritating we need to search for our sequence! */
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequencer_base_recursive_apply(&ed->seqbase, crop_seq_cmp_cb, &data);
|
2012-08-08 16:46:40 +00:00
|
|
|
|
|
|
|
|
return data.seq;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static char *rna_SequenceCrop_path(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 16:46:40 +00:00
|
|
|
Sequence *seq = sequence_get_by_crop(ed, ptr->data);
|
2010-07-23 17:48:16 +00:00
|
|
|
|
2013-04-23 20:10:22 +00:00
|
|
|
if (seq && seq->name + 2) {
|
|
|
|
|
char name_esc[(sizeof(seq->name) - 2) * 2];
|
|
|
|
|
|
|
|
|
|
BLI_strescape(name_esc, seq->name + 2, sizeof(name_esc));
|
|
|
|
|
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].crop", name_esc);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2010-07-23 17:48:16 +00:00
|
|
|
return BLI_strdup("");
|
2013-04-23 20:10:22 +00:00
|
|
|
}
|
2010-07-23 17:48:16 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_SequenceCrop_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2012-08-08 16:46:40 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 16:46:40 +00:00
|
|
|
Sequence *seq = sequence_get_by_crop(ed, ptr->data);
|
|
|
|
|
|
|
|
|
|
BKE_sequence_invalidate_cache(scene, seq);
|
|
|
|
|
}
|
2010-07-23 17:48:16 +00:00
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
/* name functions that ignore the first two characters */
|
|
|
|
|
static void rna_Sequence_name_get(PointerRNA *ptr, char *value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
BLI_strncpy(value, seq->name + 2, sizeof(seq->name) - 2);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_Sequence_name_length(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
|
|
|
|
return strlen(seq->name + 2);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_name_set(PointerRNA *ptr, const char *value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
|
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2010-04-04 14:33:41 +00:00
|
|
|
char oldname[sizeof(seq->name)];
|
2010-07-07 16:17:18 +00:00
|
|
|
AnimData *adt;
|
2010-03-01 02:33:53 +00:00
|
|
|
|
|
|
|
|
/* make a copy of the old name first */
|
2012-05-10 15:22:29 +00:00
|
|
|
BLI_strncpy(oldname, seq->name + 2, sizeof(seq->name) - 2);
|
2010-03-01 02:33:53 +00:00
|
|
|
|
|
|
|
|
/* copy the new name into the name slot */
|
2012-05-10 15:22:29 +00:00
|
|
|
BLI_strncpy_utf8(seq->name + 2, value, sizeof(seq->name) - 2);
|
2010-03-01 02:33:53 +00:00
|
|
|
|
|
|
|
|
/* make sure the name is unique */
|
2012-10-04 18:30:28 +00:00
|
|
|
BKE_sequence_base_unique_name_recursive(&scene->ed->seqbase, seq);
|
2010-03-01 02:33:53 +00:00
|
|
|
|
|
|
|
|
/* fix all the animation data which may link to this */
|
2010-07-07 16:17:18 +00:00
|
|
|
|
2012-03-18 07:38:51 +00:00
|
|
|
/* don't rename everywhere because these are per scene */
|
2015-04-04 15:13:56 +11:00
|
|
|
/* BKE_animdata_fix_paths_rename_all(NULL, "sequence_editor.sequences_all", oldname, seq->name + 2); */
|
2012-03-05 23:30:41 +00:00
|
|
|
adt = BKE_animdata_from_id(&scene->id);
|
|
|
|
|
if (adt)
|
2012-05-10 15:22:29 +00:00
|
|
|
BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, "sequence_editor.sequences_all", oldname, seq->name + 2, 0, 0, 1);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
switch (seq->type) {
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_IMAGE:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_ImageSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_META:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_MetaSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_SCENE:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_SceneSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_MOVIE:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_MovieSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_MOVIECLIP:
|
2012-03-21 18:02:29 +00:00
|
|
|
return &RNA_MovieClipSequence;
|
2012-06-07 18:24:36 +00:00
|
|
|
case SEQ_TYPE_MASK:
|
|
|
|
|
return &RNA_MaskSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_SOUND_RAM:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_SoundSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_CROSS:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_CrossSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_ADD:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_AddSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_SUB:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_SubtractSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_ALPHAOVER:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_AlphaOverSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_ALPHAUNDER:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_AlphaUnderSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_GAMCROSS:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_GammaCrossSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_MUL:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_MultiplySequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_OVERDROP:
|
2012-05-10 15:10:51 +00:00
|
|
|
return &RNA_OverDropSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_MULTICAM:
|
2010-07-04 08:49:54 +00:00
|
|
|
return &RNA_MulticamSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_ADJUSTMENT:
|
2011-05-16 17:14:47 +00:00
|
|
|
return &RNA_AdjustmentSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_WIPE:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_WipeSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_GLOW:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_GlowSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_TRANSFORM:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_TransformSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_COLOR:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_ColorSequence;
|
2012-06-07 15:49:02 +00:00
|
|
|
case SEQ_TYPE_SPEED:
|
2008-12-15 10:48:04 +00:00
|
|
|
return &RNA_SpeedControlSequence;
|
2014-07-19 22:16:10 +06:00
|
|
|
case SEQ_TYPE_GAUSSIAN_BLUR:
|
|
|
|
|
return &RNA_GaussianBlurSequence;
|
2015-07-01 20:29:18 +02:00
|
|
|
case SEQ_TYPE_TEXT:
|
|
|
|
|
return &RNA_TextSequence;
|
2008-12-15 10:48:04 +00:00
|
|
|
default:
|
|
|
|
|
return &RNA_Sequence;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2009-09-04 22:50:15 +00:00
|
|
|
static char *rna_Sequence_path(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)ptr->data;
|
2009-09-04 22:50:15 +00:00
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
/* sequencer data comes from scene...
|
2015-10-24 02:44:43 +11:00
|
|
|
* TODO: would be nice to make SequenceEditor data a data-block of its own (for shorter paths)
|
2009-09-04 22:50:15 +00:00
|
|
|
*/
|
2013-04-23 20:10:22 +00:00
|
|
|
if (seq->name + 2) {
|
|
|
|
|
char name_esc[(sizeof(seq->name) - 2) * 2];
|
|
|
|
|
|
|
|
|
|
BLI_strescape(name_esc, seq->name + 2, sizeof(name_esc));
|
|
|
|
|
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"]", name_esc);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2009-11-19 04:50:00 +00:00
|
|
|
return BLI_strdup("");
|
2013-04-23 20:10:22 +00:00
|
|
|
}
|
2009-09-04 22:50:15 +00:00
|
|
|
}
|
|
|
|
|
|
2015-04-02 21:05:12 +11:00
|
|
|
static IDProperty *rna_Sequence_idprops(PointerRNA *ptr, bool create)
|
|
|
|
|
{
|
|
|
|
|
Sequence *seq = ptr->data;
|
|
|
|
|
|
|
|
|
|
if (create && !seq->prop) {
|
|
|
|
|
IDPropertyTemplate val = {0};
|
|
|
|
|
seq->prop = IDP_New(IDP_GROUP, &val, "Sequence ID properties");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return seq->prop;
|
|
|
|
|
}
|
|
|
|
|
|
2009-11-19 03:21:37 +00:00
|
|
|
static PointerRNA rna_SequenceEditor_meta_stack_get(CollectionPropertyIterator *iter)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
2014-04-05 14:36:18 +02:00
|
|
|
ListBaseIterator *internal = &iter->internal.listbase;
|
2012-05-10 15:22:29 +00:00
|
|
|
MetaStack *ms = (MetaStack *)internal->link;
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2009-02-02 19:57:57 +00:00
|
|
|
return rna_pointer_inherit_refine(&iter->parent, &RNA_Sequence, ms->parseq);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2010-06-10 15:41:01 +00:00
|
|
|
/* TODO, expose seq path setting as a higher level sequencer BKE function */
|
2010-02-28 11:17:55 +00:00
|
|
|
static void rna_Sequence_filepath_set(PointerRNA *ptr, const char *value)
|
2009-09-21 13:23:47 +00:00
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2009-09-21 13:23:47 +00:00
|
|
|
|
2012-06-07 15:49:02 +00:00
|
|
|
if (seq->type == SEQ_TYPE_SOUND_RAM && seq->sound) {
|
2010-06-10 15:41:01 +00:00
|
|
|
/* for sound strips we need to update the sound as well.
|
2011-05-28 13:11:24 +00:00
|
|
|
* arguably, this could load in a new sound rather than modify an existing one.
|
2010-06-10 15:41:01 +00:00
|
|
|
* 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);
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_load(G.main, seq->sound);
|
|
|
|
|
BKE_sound_update_scene_sound(seq->scene_sound, seq->sound);
|
2010-06-10 15:41:01 +00:00
|
|
|
}
|
|
|
|
|
|
2012-03-18 09:27:36 +00:00
|
|
|
BLI_split_dirfile(value, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir),
|
|
|
|
|
sizeof(seq->strip->stripdata->name));
|
2009-09-21 13:23:47 +00:00
|
|
|
}
|
|
|
|
|
|
2010-02-28 11:17:55 +00:00
|
|
|
static void rna_Sequence_filepath_get(PointerRNA *ptr, char *value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2010-02-28 11:17:55 +00:00
|
|
|
|
2011-09-28 06:48:17 +00:00
|
|
|
BLI_join_dirfile(value, FILE_MAX, seq->strip->dir, seq->strip->stripdata->name);
|
2010-02-28 11:17:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_Sequence_filepath_length(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2010-02-28 11:17:55 +00:00
|
|
|
char path[FILE_MAX];
|
|
|
|
|
|
2011-02-13 03:21:27 +00:00
|
|
|
BLI_join_dirfile(path, sizeof(path), seq->strip->dir, seq->strip->stripdata->name);
|
2011-09-28 06:48:17 +00:00
|
|
|
return strlen(path);
|
2010-02-28 11:17:55 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-11 19:26:46 +00:00
|
|
|
static void rna_Sequence_proxy_filepath_set(PointerRNA *ptr, const char *value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
StripProxy *proxy = (StripProxy *)(ptr->data);
|
2011-10-15 03:56:05 +00:00
|
|
|
BLI_split_dirfile(value, proxy->dir, proxy->file, sizeof(proxy->dir), sizeof(proxy->file));
|
2014-02-25 13:49:38 +06:00
|
|
|
if (proxy->anim) {
|
|
|
|
|
IMB_free_anim(proxy->anim);
|
|
|
|
|
proxy->anim = NULL;
|
|
|
|
|
}
|
2010-04-11 19:26:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_proxy_filepath_get(PointerRNA *ptr, char *value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
StripProxy *proxy = (StripProxy *)(ptr->data);
|
2010-04-11 19:26:46 +00:00
|
|
|
|
2011-09-28 06:48:17 +00:00
|
|
|
BLI_join_dirfile(value, FILE_MAX, proxy->dir, proxy->file);
|
2010-04-11 19:26:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_Sequence_proxy_filepath_length(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
StripProxy *proxy = (StripProxy *)(ptr->data);
|
2010-04-11 19:26:46 +00:00
|
|
|
char path[FILE_MAX];
|
|
|
|
|
|
2011-02-13 03:21:27 +00:00
|
|
|
BLI_join_dirfile(path, sizeof(path), proxy->dir, proxy->file);
|
2011-09-28 06:48:17 +00:00
|
|
|
return strlen(path);
|
2010-04-11 19:26:46 +00:00
|
|
|
}
|
|
|
|
|
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
static void rna_Sequence_volume_set(PointerRNA *ptr, float value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
|
|
|
|
|
seq->volume = value;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (seq->scene_sound)
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_set_scene_sound_volume(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_VOLUME_ANIMATED) != 0);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_pitch_set(PointerRNA *ptr, float value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
|
|
|
|
|
seq->pitch = value;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (seq->scene_sound)
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_set_scene_sound_pitch(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_PITCH_ANIMATED) != 0);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_pan_set(PointerRNA *ptr, float value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
|
|
|
|
|
seq->pan = value;
|
2012-03-05 23:30:41 +00:00
|
|
|
if (seq->scene_sound)
|
2015-03-26 11:35:41 +01:00
|
|
|
BKE_sound_set_scene_sound_pan(seq->scene_sound, value, (seq->flag & SEQ_AUDIO_PAN_ANIMATED) != 0);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
}
|
|
|
|
|
|
2010-04-11 19:26:46 +00:00
|
|
|
|
2010-10-30 12:04:00 +00:00
|
|
|
static int rna_Sequence_input_count_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2010-10-30 12:04:00 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
return BKE_sequence_effect_get_num_inputs(seq->type);
|
2010-10-30 12:04:00 +00:00
|
|
|
}
|
2012-05-10 15:22:29 +00:00
|
|
|
|
|
|
|
|
#if 0
|
|
|
|
|
static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
|
2009-09-21 13:23:47 +00:00
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2012-03-18 09:27:36 +00:00
|
|
|
BLI_split_dirfile(value, seq->strip->dir, seq->strip->stripdata->name, sizeof(seq->strip->dir),
|
|
|
|
|
sizeof(seq->strip->stripdata->name));
|
2009-09-21 13:23:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SequenceElement_filename_set(PointerRNA *ptr, const char *value)
|
|
|
|
|
{
|
2012-05-12 11:01:29 +00:00
|
|
|
StripElem *elem = (StripElem *)(ptr->data);
|
2011-10-21 02:13:36 +00:00
|
|
|
BLI_split_file_part(value, elem->name, sizeof(elem->name));
|
2012-05-10 15:22:29 +00:00
|
|
|
}
|
|
|
|
|
#endif
|
2009-09-21 13:23:47 +00:00
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_Sequence_update_reopen_files(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-07-22 08:57:23 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2010-07-22 08:57:23 +00:00
|
|
|
|
2014-03-20 15:45:20 +06:00
|
|
|
BKE_sequencer_free_imbuf(scene, &ed->seqbase, false);
|
2010-07-22 08:57:23 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (RNA_struct_is_a(ptr->type, &RNA_SoundSequence))
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequencer_update_sound_bounds(scene, ptr->data);
|
2010-07-22 08:57:23 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_Sequence_mute_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
2009-12-08 12:59:21 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2009-12-08 13:57:51 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequencer_update_muting(ed);
|
2009-12-08 17:23:48 +00:00
|
|
|
rna_Sequence_update(bmain, scene, ptr);
|
2009-12-08 12:59:21 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_Sequence_filepath_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
|
2010-05-08 16:36:28 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2014-03-20 15:45:20 +06:00
|
|
|
BKE_sequence_reload_new_file(scene, seq, true);
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequence_calc(scene, seq);
|
2010-05-08 16:36:28 +00:00
|
|
|
rna_Sequence_update(bmain, scene, ptr);
|
|
|
|
|
}
|
|
|
|
|
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
static int seqproxy_seq_cmp_cb(Sequence *seq, void *arg_pt)
|
|
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData *data = arg_pt;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
if (seq->strip && seq->strip->proxy == data->data) {
|
2012-03-05 23:30:41 +00:00
|
|
|
data->seq = seq;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
return -1; /* done so bail out */
|
|
|
|
|
}
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
static Sequence *sequence_get_by_proxy(Editing *ed, StripProxy *proxy)
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData data;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
data.seq = NULL;
|
2012-08-08 16:46:40 +00:00
|
|
|
data.data = proxy;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequencer_base_recursive_apply(&ed->seqbase, seqproxy_seq_cmp_cb, &data);
|
2012-08-08 16:46:40 +00:00
|
|
|
return data.seq;
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-20 06:35:28 +00:00
|
|
|
static void rna_Sequence_tcindex_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2012-08-08 16:46:40 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 16:46:40 +00:00
|
|
|
Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2014-03-20 15:45:20 +06:00
|
|
|
BKE_sequence_reload_new_file(scene, seq, false);
|
2013-03-25 17:22:00 +00:00
|
|
|
do_sequence_frame_change_update(scene, seq);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_SequenceProxy_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2012-08-08 16:46:40 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-08 16:46:40 +00:00
|
|
|
Sequence *seq = sequence_get_by_proxy(ed, ptr->data);
|
|
|
|
|
|
|
|
|
|
BKE_sequence_invalidate_cache(scene, seq);
|
|
|
|
|
}
|
|
|
|
|
|
2009-12-21 16:57:39 +00:00
|
|
|
/* do_versions? */
|
2011-06-02 08:45:28 +00:00
|
|
|
static float rna_Sequence_opacity_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2011-06-02 08:45:28 +00:00
|
|
|
return seq->blend_opacity / 100.0f;
|
2009-12-21 16:57:39 +00:00
|
|
|
}
|
2011-06-02 08:45:28 +00:00
|
|
|
static void rna_Sequence_opacity_set(PointerRNA *ptr, float value)
|
|
|
|
|
{
|
2012-05-10 15:22:29 +00:00
|
|
|
Sequence *seq = (Sequence *)(ptr->data);
|
2011-06-02 08:45:28 +00:00
|
|
|
CLAMP(value, 0.0f, 1.0f);
|
|
|
|
|
seq->blend_opacity = value * 100.0f;
|
2009-12-21 16:57:39 +00:00
|
|
|
}
|
|
|
|
|
|
2010-07-06 16:44:05 +00:00
|
|
|
static int colbalance_seq_cmp_cb(Sequence *seq, void *arg_pt)
|
|
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData *data = arg_pt;
|
2010-07-06 16:44:05 +00:00
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
if (seq->modifiers.first) {
|
|
|
|
|
SequenceModifierData *smd = seq->modifiers.first;
|
|
|
|
|
|
|
|
|
|
for (smd = seq->modifiers.first; smd; smd = smd->next) {
|
|
|
|
|
if (smd->type == seqModifierType_ColorBalance) {
|
|
|
|
|
ColorBalanceModifierData *cbmd = (ColorBalanceModifierData *) smd;
|
|
|
|
|
|
|
|
|
|
if (&cbmd->color_balance == data->data) {
|
|
|
|
|
data->seq = seq;
|
2012-08-23 13:32:54 +00:00
|
|
|
data->smd = smd;
|
2012-08-19 15:41:56 +00:00
|
|
|
return -1; /* done so bail out */
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2010-07-06 16:44:05 +00:00
|
|
|
return 1;
|
|
|
|
|
}
|
2012-08-08 16:46:40 +00:00
|
|
|
|
2015-05-08 07:25:39 +10:00
|
|
|
static Sequence *sequence_get_by_colorbalance(Editing *ed, StripColorBalance *cb, SequenceModifierData **r_smd)
|
2010-07-06 16:44:05 +00:00
|
|
|
{
|
2012-08-08 16:46:40 +00:00
|
|
|
SequenceSearchData data;
|
2010-07-06 16:44:05 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
data.seq = NULL;
|
2012-08-23 13:32:54 +00:00
|
|
|
data.smd = NULL;
|
2012-08-08 16:46:40 +00:00
|
|
|
data.data = cb;
|
2010-07-06 16:44:05 +00:00
|
|
|
|
|
|
|
|
/* irritating we need to search for our sequence! */
|
2012-08-08 11:15:40 +00:00
|
|
|
BKE_sequencer_base_recursive_apply(&ed->seqbase, colbalance_seq_cmp_cb, &data);
|
2012-08-08 16:46:40 +00:00
|
|
|
|
2015-05-08 07:25:39 +10:00
|
|
|
*r_smd = data.smd;
|
2012-08-23 13:32:54 +00:00
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
return data.seq;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = ptr->id.data;
|
2012-08-23 13:32:54 +00:00
|
|
|
SequenceModifierData *smd;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-23 13:32:54 +00:00
|
|
|
Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd);
|
2010-07-06 16:44:05 +00:00
|
|
|
|
2012-08-23 13:32:54 +00:00
|
|
|
if (seq && seq->name + 2) {
|
2013-04-23 20:10:22 +00:00
|
|
|
char name_esc[(sizeof(seq->name) - 2) * 2];
|
|
|
|
|
|
|
|
|
|
BLI_strescape(name_esc, seq->name + 2, sizeof(name_esc));
|
|
|
|
|
|
2012-08-23 13:32:54 +00:00
|
|
|
if (!smd) {
|
|
|
|
|
/* path to old filter color balance */
|
2013-04-23 20:10:22 +00:00
|
|
|
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].color_balance", name_esc);
|
2012-08-23 13:32:54 +00:00
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
/* path to modifier */
|
2013-04-23 20:10:22 +00:00
|
|
|
char name_esc_smd[sizeof(smd->name) * 2];
|
|
|
|
|
|
|
|
|
|
BLI_strescape(name_esc_smd, smd->name, sizeof(name_esc_smd));
|
|
|
|
|
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"].color_balance",
|
|
|
|
|
name_esc, name_esc_smd);
|
2012-08-23 13:32:54 +00:00
|
|
|
}
|
|
|
|
|
}
|
2010-07-06 16:44:05 +00:00
|
|
|
else
|
|
|
|
|
return BLI_strdup("");
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_SequenceColorBalance_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
2012-08-08 16:46:40 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-23 13:32:54 +00:00
|
|
|
SequenceModifierData *smd;
|
|
|
|
|
Sequence *seq = sequence_get_by_colorbalance(ed, ptr->data, &smd);
|
2012-08-08 16:46:40 +00:00
|
|
|
|
2012-08-23 13:32:54 +00:00
|
|
|
if (smd == NULL)
|
2012-08-19 15:41:56 +00:00
|
|
|
BKE_sequence_invalidate_cache(scene, seq);
|
|
|
|
|
else
|
|
|
|
|
BKE_sequence_invalidate_cache_for_modifier(scene, seq);
|
2012-08-08 16:46:40 +00:00
|
|
|
}
|
|
|
|
|
|
2010-07-08 10:03:29 +00:00
|
|
|
static void rna_SequenceEditor_overlay_lock_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2010-07-08 10:03:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ed == NULL)
|
2010-07-08 10:03:29 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
/* convert from abs to relative and back */
|
2012-03-05 23:30:41 +00:00
|
|
|
if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) == 0 && value) {
|
|
|
|
|
ed->over_cfra = scene->r.cfra + ed->over_ofs;
|
2010-07-08 10:03:29 +00:00
|
|
|
ed->over_flag |= SEQ_EDIT_OVERLAY_ABS;
|
|
|
|
|
}
|
2012-03-05 23:30:41 +00:00
|
|
|
else if ((ed->over_flag & SEQ_EDIT_OVERLAY_ABS) && !value) {
|
|
|
|
|
ed->over_ofs = ed->over_cfra - scene->r.cfra;
|
2010-07-08 10:03:29 +00:00
|
|
|
ed->over_flag &= ~SEQ_EDIT_OVERLAY_ABS;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_SequenceEditor_overlay_frame_get(PointerRNA *ptr)
|
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2010-07-08 10:03:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ed == NULL)
|
2010-07-08 10:03:29 +00:00
|
|
|
return scene->r.cfra;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
|
2010-07-08 10:03:29 +00:00
|
|
|
return ed->over_cfra - scene->r.cfra;
|
|
|
|
|
else
|
|
|
|
|
return ed->over_ofs;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SequenceEditor_overlay_frame_set(PointerRNA *ptr, int value)
|
|
|
|
|
{
|
2012-03-05 23:30:41 +00:00
|
|
|
Scene *scene = (Scene *)ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2010-07-08 10:03:29 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ed == NULL)
|
2010-07-08 10:03:29 +00:00
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
if (ed->over_flag & SEQ_EDIT_OVERLAY_ABS)
|
|
|
|
|
ed->over_cfra = (scene->r.cfra + value);
|
2010-07-08 10:03:29 +00:00
|
|
|
else
|
2012-03-05 23:30:41 +00:00
|
|
|
ed->over_ofs = value;
|
2010-07-08 10:03:29 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static int modifier_seq_cmp_cb(Sequence *seq, void *arg_pt)
|
|
|
|
|
{
|
|
|
|
|
SequenceSearchData *data = arg_pt;
|
|
|
|
|
|
|
|
|
|
if (BLI_findindex(&seq->modifiers, data->data) != -1) {
|
|
|
|
|
data->seq = seq;
|
|
|
|
|
return -1; /* done so bail out */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static Sequence *sequence_get_by_modifier(Editing *ed, SequenceModifierData *smd)
|
|
|
|
|
{
|
|
|
|
|
SequenceSearchData data;
|
|
|
|
|
|
|
|
|
|
data.seq = NULL;
|
|
|
|
|
data.data = smd;
|
|
|
|
|
|
|
|
|
|
/* irritating we need to search for our sequence! */
|
|
|
|
|
BKE_sequencer_base_recursive_apply(&ed->seqbase, modifier_seq_cmp_cb, &data);
|
|
|
|
|
|
|
|
|
|
return data.seq;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
SequenceModifierData *smd = (SequenceModifierData *) ptr->data;
|
|
|
|
|
|
|
|
|
|
switch (smd->type) {
|
|
|
|
|
case seqModifierType_ColorBalance:
|
|
|
|
|
return &RNA_ColorBalanceModifier;
|
|
|
|
|
case seqModifierType_Curves:
|
|
|
|
|
return &RNA_CurvesModifier;
|
|
|
|
|
case seqModifierType_HueCorrect:
|
|
|
|
|
return &RNA_HueCorrectModifier;
|
2012-08-24 09:07:04 +00:00
|
|
|
case seqModifierType_BrightContrast:
|
|
|
|
|
return &RNA_BrightContrastModifier;
|
2015-12-28 11:55:14 +01:00
|
|
|
case seqModifierType_WhiteBalance:
|
|
|
|
|
return &RNA_WhiteBalanceModifier;
|
2012-08-19 15:41:56 +00:00
|
|
|
default:
|
|
|
|
|
return &RNA_SequenceModifier;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static char *rna_SequenceModifier_path(PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-19 15:41:56 +00:00
|
|
|
SequenceModifierData *smd = ptr->data;
|
|
|
|
|
Sequence *seq = sequence_get_by_modifier(ed, smd);
|
|
|
|
|
|
2013-04-23 20:10:22 +00:00
|
|
|
if (seq && seq->name + 2) {
|
|
|
|
|
char name_esc[(sizeof(seq->name) - 2) * 2];
|
|
|
|
|
char name_esc_smd[sizeof(smd->name) * 2];
|
|
|
|
|
|
|
|
|
|
BLI_strescape(name_esc, seq->name + 2, sizeof(name_esc));
|
|
|
|
|
BLI_strescape(name_esc_smd, smd->name, sizeof(name_esc_smd));
|
|
|
|
|
return BLI_sprintfN("sequence_editor.sequences_all[\"%s\"].modifiers[\"%s\"]",
|
|
|
|
|
name_esc, name_esc_smd);
|
|
|
|
|
}
|
|
|
|
|
else {
|
2012-08-19 15:41:56 +00:00
|
|
|
return BLI_strdup("");
|
2013-04-23 20:10:22 +00:00
|
|
|
}
|
2012-08-19 15:41:56 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SequenceModifier_name_set(PointerRNA *ptr, const char *value)
|
|
|
|
|
{
|
|
|
|
|
SequenceModifierData *smd = ptr->data;
|
|
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-19 15:41:56 +00:00
|
|
|
Sequence *seq = sequence_get_by_modifier(ed, smd);
|
|
|
|
|
AnimData *adt;
|
|
|
|
|
char oldname[sizeof(smd->name)];
|
|
|
|
|
|
|
|
|
|
/* make a copy of the old name first */
|
|
|
|
|
BLI_strncpy(oldname, smd->name, sizeof(smd->name));
|
|
|
|
|
|
|
|
|
|
/* copy the new name into the name slot */
|
|
|
|
|
BLI_strncpy_utf8(smd->name, value, sizeof(smd->name));
|
|
|
|
|
|
|
|
|
|
/* make sure the name is truly unique */
|
|
|
|
|
BKE_sequence_modifier_unique_name(seq, smd);
|
|
|
|
|
|
|
|
|
|
/* fix all the animation data which may link to this */
|
|
|
|
|
adt = BKE_animdata_from_id(&scene->id);
|
|
|
|
|
if (adt) {
|
|
|
|
|
char path[1024];
|
|
|
|
|
|
2012-08-23 13:32:54 +00:00
|
|
|
BLI_snprintf(path, sizeof(path), "sequence_editor.sequences_all[\"%s\"].modifiers", seq->name + 2);
|
|
|
|
|
BKE_animdata_fix_paths_rename(&scene->id, adt, NULL, path, oldname, smd->name, 0, 0, 1);
|
2012-08-19 15:41:56 +00:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_SequenceModifier_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
|
|
|
|
|
{
|
|
|
|
|
/* strip from other scenes could be modified, so using active scene is not reliable */
|
|
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-19 15:41:56 +00:00
|
|
|
Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
|
|
|
|
|
|
|
|
|
|
BKE_sequence_invalidate_cache_for_modifier(scene, seq);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static int rna_SequenceModifier_otherSequence_poll(PointerRNA *ptr, PointerRNA value)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = (Scene *) ptr->id.data;
|
2014-03-20 15:45:20 +06:00
|
|
|
Editing *ed = BKE_sequencer_editing_get(scene, false);
|
2012-08-19 15:41:56 +00:00
|
|
|
Sequence *seq = sequence_get_by_modifier(ed, ptr->data);
|
|
|
|
|
Sequence *cur = (Sequence *) value.data;
|
|
|
|
|
|
|
|
|
|
if (seq == cur)
|
2014-04-01 11:34:00 +11:00
|
|
|
return false;
|
2012-08-19 15:41:56 +00:00
|
|
|
|
2014-04-01 11:34:00 +11:00
|
|
|
return true;
|
2012-08-19 15:41:56 +00:00
|
|
|
}
|
2011-06-09 08:58:27 +00:00
|
|
|
|
2012-08-20 10:15:32 +00:00
|
|
|
static SequenceModifierData *rna_Sequence_modifier_new(Sequence *seq, bContext *C, ReportList *reports, const char *name, int type)
|
|
|
|
|
{
|
|
|
|
|
if (!BKE_sequence_supports_modifiers(seq)) {
|
|
|
|
|
BKE_report(reports, RPT_ERROR, "Sequence type does not support modifiers");
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
SequenceModifierData *smd;
|
|
|
|
|
|
2015-12-28 11:55:14 +01:00
|
|
|
smd = BKE_sequence_modifier_new(seq, name, type, scene);
|
2012-08-20 10:15:32 +00:00
|
|
|
|
|
|
|
|
BKE_sequence_invalidate_cache_for_modifier(scene, seq);
|
|
|
|
|
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
|
|
|
|
|
|
|
|
|
|
return smd;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-11-02 09:41:26 +00:00
|
|
|
static void rna_Sequence_modifier_remove(Sequence *seq, bContext *C, ReportList *reports, PointerRNA *smd_ptr)
|
2012-08-20 10:15:32 +00:00
|
|
|
{
|
2012-11-02 09:41:26 +00:00
|
|
|
SequenceModifierData *smd = smd_ptr->data;
|
2012-08-20 10:15:32 +00:00
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
|
2014-03-20 15:45:20 +06:00
|
|
|
if (BKE_sequence_modifier_remove(seq, smd) == false) {
|
2012-08-20 10:15:32 +00:00
|
|
|
BKE_report(reports, RPT_ERROR, "Modifier was not found in the stack");
|
2012-11-02 09:41:26 +00:00
|
|
|
return;
|
2012-08-20 10:15:32 +00:00
|
|
|
}
|
2012-11-02 09:41:26 +00:00
|
|
|
|
|
|
|
|
RNA_POINTER_INVALIDATE(smd_ptr);
|
|
|
|
|
BKE_sequence_invalidate_cache_for_modifier(scene, seq);
|
|
|
|
|
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
|
2012-08-20 10:15:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_Sequence_modifier_clear(Sequence *seq, bContext *C)
|
|
|
|
|
{
|
|
|
|
|
Scene *scene = CTX_data_scene(C);
|
|
|
|
|
|
|
|
|
|
BKE_sequence_modifier_clear(seq);
|
|
|
|
|
|
|
|
|
|
BKE_sequence_invalidate_cache_for_modifier(scene, seq);
|
|
|
|
|
|
|
|
|
|
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, NULL);
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
#else
|
|
|
|
|
|
|
|
|
|
static void rna_def_strip_element(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "SequenceElement", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Sequence Element", "Sequence strip data for a single frame");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "StripElem");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "filename", PROP_STRING, PROP_FILENAME);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "name");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Filename", "");
|
2013-08-29 04:08:44 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceElement_update");
|
2010-11-28 18:23:21 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "orig_width", PROP_INT, PROP_NONE);
|
2010-11-28 18:23:21 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "orig_width");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Orig Width", "Original image width");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "orig_height", PROP_INT, PROP_NONE);
|
2010-11-28 18:23:21 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "orig_height");
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Orig Height", "Original image height");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_strip_crop(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "SequenceCrop", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Sequence Crop", "Cropping parameters for a sequence strip");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "StripCrop");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "max_y", PROP_INT, PROP_UNSIGNED);
|
2010-08-21 04:51:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "top");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Top", "");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "min_y", PROP_INT, PROP_UNSIGNED);
|
2010-08-21 04:51:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "bottom");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Bottom", "");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "min_x", PROP_INT, PROP_UNSIGNED);
|
2010-08-21 04:51:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "left");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Left", "");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "max_x", PROP_INT, PROP_UNSIGNED);
|
2010-08-21 04:51:00 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "right");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Right", "");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 4096, 1, -1);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceCrop_update");
|
2010-07-23 17:48:16 +00:00
|
|
|
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_SequenceCrop_path");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_strip_transform(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "SequenceTransform", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Sequence Transform", "Transform parameters for a sequence strip");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "StripTransform");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "offset_x", PROP_INT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "xofs");
|
2010-03-21 14:46:43 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Offset X", "");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, -4096, 4096, 1, -1);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "offset_y", PROP_INT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "yofs");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Offset Y", "");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, -4096, 4096, 1, -1);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceTransform_update");
|
2010-07-23 17:48:16 +00:00
|
|
|
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_SequenceTransform_path");
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_strip_proxy(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static const EnumPropertyItem seq_tc_items[] = {
|
2011-09-29 14:41:11 +00:00
|
|
|
{SEQ_PROXY_TC_NONE, "NONE", 0, "No TC in use", ""},
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
{SEQ_PROXY_TC_RECORD_RUN, "RECORD_RUN", 0, "Record Run",
|
2011-09-29 14:41:11 +00:00
|
|
|
"Use images in the order as they are recorded"},
|
|
|
|
|
{SEQ_PROXY_TC_FREE_RUN, "FREE_RUN", 0, "Free Run",
|
|
|
|
|
"Use global timestamp written by recording device"},
|
|
|
|
|
{SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN, "FREE_RUN_REC_DATE", 0, "Free Run (rec date)",
|
|
|
|
|
"Interpolate a global timestamp using the "
|
|
|
|
|
"record date and time written by recording device"},
|
2012-03-18 11:43:22 +00:00
|
|
|
{SEQ_PROXY_TC_RECORD_RUN_NO_GAPS, "RECORD_RUN_NO_GAPS", 0, "Record Run No Gaps",
|
|
|
|
|
"Like record run, but ignore timecode, "
|
2011-12-15 12:18:09 +00:00
|
|
|
"changes in framerate or dropouts"},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "SequenceProxy", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Sequence Proxy", "Proxy parameters for a sequence strip");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "StripProxy");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "dir");
|
2010-04-11 19:26:46 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Directory", "Location to store the proxy files");
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
|
2009-06-09 05:39:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
|
2010-04-11 19:26:46 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Path", "Location of custom proxy file");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_Sequence_proxy_filepath_get", "rna_Sequence_proxy_filepath_length",
|
|
|
|
|
"rna_Sequence_proxy_filepath_set");
|
2010-04-11 19:26:46 +00:00
|
|
|
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceProxy_update");
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2015-01-28 17:30:15 +05:00
|
|
|
prop = RNA_def_property(srna, "use_overwrite", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "build_flags", SEQ_PROXY_SKIP_EXISTING);
|
2015-02-03 20:25:14 +01:00
|
|
|
RNA_def_property_ui_text(prop, "Overwrite", "Overwrite existing proxy files when building");
|
2015-01-28 17:30:15 +05:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "build_25", PROP_BOOLEAN, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_25);
|
|
|
|
|
RNA_def_property_ui_text(prop, "25%", "Build 25% proxy resolution");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "build_50", PROP_BOOLEAN, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_50);
|
|
|
|
|
RNA_def_property_ui_text(prop, "50%", "Build 50% proxy resolution");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "build_75", PROP_BOOLEAN, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_75);
|
|
|
|
|
RNA_def_property_ui_text(prop, "75%", "Build 75% proxy resolution");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "build_100", PROP_BOOLEAN, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "build_size_flags", SEQ_PROXY_IMAGE_SIZE_100);
|
|
|
|
|
RNA_def_property_ui_text(prop, "100%", "Build 100% proxy resolution");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "build_record_run", PROP_BOOLEAN, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_RECORD_RUN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Rec Run", "Build record run time code index");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "build_free_run", PROP_BOOLEAN, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_FREE_RUN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Free Run", "Build free run time code index");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "build_free_run_rec_date", PROP_BOOLEAN, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "build_tc_flags", SEQ_PROXY_TC_INTERP_REC_DATE_FREE_RUN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Free Run (Rec Date)", "Build free run time code index using Record Date/Time");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "quality", PROP_INT, PROP_UNSIGNED);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "quality");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Quality", "JPEG Quality of proxies to build");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 1, 100, 1, -1);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "timecode", PROP_ENUM, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "tc");
|
|
|
|
|
RNA_def_property_enum_items(prop, seq_tc_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Timecode", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_tcindex_update");
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2015-03-24 12:24:30 +01:00
|
|
|
prop = RNA_def_property(srna, "use_proxy_custom_directory", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "storage", SEQ_STORAGE_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, "use_proxy_custom_file", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "storage", SEQ_STORAGE_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");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_def_color_balance(BlenderRNA *brna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
srna = RNA_def_struct(brna, "SequenceColorBalanceData", NULL);
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Sequence Color Balance Data", "Color balance parameters for a sequence strip and it's modifiers");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "StripColorBalance");
|
|
|
|
|
|
2014-03-18 01:08:24 +02:00
|
|
|
prop = RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR_GAMMA);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows)");
|
2010-07-05 21:43:46 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
|
2012-08-13 09:47:45 +00:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
|
2012-08-19 15:41:56 +00:00
|
|
|
|
2014-03-18 01:08:24 +02:00
|
|
|
prop = RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR_GAMMA);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones)");
|
2010-07-05 21:43:46 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
|
2012-08-13 09:47:45 +00:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
|
2012-08-19 15:41:56 +00:00
|
|
|
|
2014-03-18 01:08:24 +02:00
|
|
|
prop = RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR_GAMMA);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights)");
|
2010-07-05 21:43:46 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 2, 0.1, 3);
|
2012-08-13 09:47:45 +00:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
|
2012-08-19 15:41:56 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_gain", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAIN);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Inverse Gain", "");
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_gamma", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAMMA);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Inverse Gamma", "");
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "invert_lift", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_LIFT);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Inverse Lift", "");
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceColorBalance_update");
|
2010-07-06 16:44:05 +00:00
|
|
|
|
2012-05-10 15:22:29 +00:00
|
|
|
/* not yet used */
|
|
|
|
|
#if 0
|
2012-05-12 11:01:29 +00:00
|
|
|
prop = RNA_def_property(srna, "exposure", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Exposure", "");
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
|
2012-08-19 15:41:56 +00:00
|
|
|
|
2012-05-12 11:01:29 +00:00
|
|
|
prop = RNA_def_property(srna, "saturation", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2009-12-08 12:59:21 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Saturation", "");
|
2012-08-08 16:46:40 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_ColorBabalnce_update");
|
2012-05-10 15:22:29 +00:00
|
|
|
#endif
|
2012-08-23 13:32:54 +00:00
|
|
|
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_SequenceColorBalance_path");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_def_strip_color_balance(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "SequenceColorBalance", "SequenceColorBalanceData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Sequence Color Balance", "Color balance parameters for a sequence strip");
|
|
|
|
|
RNA_def_struct_sdna(srna, "StripColorBalance");
|
|
|
|
|
}
|
|
|
|
|
|
2013-09-11 21:27:14 +00:00
|
|
|
static EnumPropertyItem blend_mode_items[] = {
|
2012-05-10 15:10:51 +00:00
|
|
|
{SEQ_BLEND_REPLACE, "REPLACE", 0, "Replace", ""},
|
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", ""},
|
2012-05-10 15:10:51 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_def_sequence_modifiers(BlenderRNA *brna, PropertyRNA *cprop)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
|
2012-08-20 10:15:32 +00:00
|
|
|
FunctionRNA *func;
|
|
|
|
|
PropertyRNA *parm;
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
RNA_def_property_srna(cprop, "SequenceModifiers");
|
|
|
|
|
srna = RNA_def_struct(brna, "SequenceModifiers", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Strip Modifiers", "Collection of strip modifiers");
|
|
|
|
|
|
2012-08-20 10:15:32 +00:00
|
|
|
/* add modifier */
|
|
|
|
|
func = RNA_def_function(srna, "new", "rna_Sequence_modifier_new");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
|
|
|
|
|
RNA_def_function_ui_description(func, "Add a new modifier");
|
|
|
|
|
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the modifier");
|
|
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
|
|
|
|
/* modifier to add */
|
2015-11-23 13:49:52 +11:00
|
|
|
parm = RNA_def_enum(func, "type", rna_enum_sequence_modifier_type_items, seqModifierType_ColorBalance, "", "Modifier type to add");
|
2012-08-20 10:15:32 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
|
|
|
|
/* return type */
|
|
|
|
|
parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Newly created modifier");
|
|
|
|
|
RNA_def_function_return(func, parm);
|
|
|
|
|
|
|
|
|
|
/* remove modifier */
|
|
|
|
|
func = RNA_def_function(srna, "remove", "rna_Sequence_modifier_remove");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_CONTEXT | FUNC_USE_REPORTS);
|
|
|
|
|
RNA_def_function_ui_description(func, "Remove an existing modifier from the sequence");
|
|
|
|
|
/* modifier to remove */
|
|
|
|
|
parm = RNA_def_pointer(func, "modifier", "SequenceModifier", "", "Modifier to remove");
|
2012-11-02 09:41:26 +00:00
|
|
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
|
|
|
|
|
RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
|
2012-08-20 10:15:32 +00:00
|
|
|
|
|
|
|
|
/* clear all modifiers */
|
|
|
|
|
func = RNA_def_function(srna, "clear", "rna_Sequence_modifier_clear");
|
|
|
|
|
RNA_def_function_flag(func, FUNC_USE_CONTEXT);
|
|
|
|
|
RNA_def_function_ui_description(func, "Remove all modifiers from the sequence");
|
2012-08-19 15:41:56 +00:00
|
|
|
}
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
static void rna_def_sequence(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static const EnumPropertyItem seq_type_items[] = {
|
2012-06-07 15:49:02 +00:00
|
|
|
{SEQ_TYPE_IMAGE, "IMAGE", 0, "Image", ""},
|
|
|
|
|
{SEQ_TYPE_META, "META", 0, "Meta", ""},
|
|
|
|
|
{SEQ_TYPE_SCENE, "SCENE", 0, "Scene", ""},
|
|
|
|
|
{SEQ_TYPE_MOVIE, "MOVIE", 0, "Movie", ""},
|
|
|
|
|
{SEQ_TYPE_MOVIECLIP, "MOVIECLIP", 0, "Clip", ""},
|
2012-06-07 18:24:36 +00:00
|
|
|
{SEQ_TYPE_MASK, "MASK", 0, "Mask", ""},
|
2012-06-07 15:49:02 +00:00
|
|
|
{SEQ_TYPE_SOUND_RAM, "SOUND", 0, "Sound", ""},
|
|
|
|
|
{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", ""},
|
2012-05-10 15:22:29 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "Sequence", NULL);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Sequence", "Sequence strip in the sequence editor");
|
2009-01-01 15:52:51 +00:00
|
|
|
RNA_def_struct_refine_func(srna, "rna_Sequence_refine");
|
2009-09-04 22:50:15 +00:00
|
|
|
RNA_def_struct_path_func(srna, "rna_Sequence_path");
|
2015-04-02 21:05:12 +11:00
|
|
|
RNA_def_struct_idprops_func(srna, "rna_Sequence_idprops");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_Sequence_name_get", "rna_Sequence_name_length", "rna_Sequence_name_set");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_string_maxlength(prop, sizeof(((Sequence *)NULL)->name) - 2);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Name", "");
|
|
|
|
|
RNA_def_struct_name_property(srna, prop);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
2009-03-23 13:24:48 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_enum_items(prop, seq_type_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Type", "");
|
2015-08-16 17:32:01 +10:00
|
|
|
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SEQUENCE);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
/* flags */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "select", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SELECT);
|
2010-07-15 16:56:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Select", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "select_left_handle", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LEFTSEL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Left Handle Selected", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "select_right_handle", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_RIGHTSEL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Right Handle Selected", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER | NA_SELECTED, NULL);
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MUTE);
|
2014-01-30 16:24:51 +11:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, true);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Mute", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_mute_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "lock", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_LOCK);
|
2014-01-30 16:24:51 +11:00
|
|
|
RNA_def_property_ui_icon(prop, ICON_UNLOCKED, true);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Lock", "Lock strip so that it can't be transformed");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
|
2008-12-15 10:48:04 +00:00
|
|
|
|
|
|
|
|
/* strip positioning */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_final_duration", PROP_INT, PROP_TIME);
|
2009-06-10 19:57:06 +00:00
|
|
|
RNA_def_property_range(prop, 1, MAXFRAME);
|
2010-02-07 23:41:17 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2011-11-16 20:03:54 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Length", "The length of the contents of this strip after the handles are applied");
|
2012-04-29 15:47:02 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_Sequence_frame_length_get", "rna_Sequence_frame_length_set", NULL);
|
2011-11-16 20:03:54 +00:00
|
|
|
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2010-06-22 13:45:21 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_duration", PROP_INT, PROP_TIME);
|
2010-06-22 13:45:21 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "len");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE | PROP_ANIMATABLE);
|
2010-06-22 13:45:21 +00:00
|
|
|
RNA_def_property_range(prop, 1, MAXFRAME);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Length",
|
|
|
|
|
"The length of the contents of this strip before the handles are applied");
|
2009-08-18 12:10:12 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_start", PROP_INT, PROP_TIME);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "start");
|
2010-02-07 23:41:17 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Start Frame", "");
|
2012-04-29 15:47:02 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_set", NULL); /* overlap tests and calc_seq_disp */
|
2011-11-16 20:03:54 +00:00
|
|
|
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_final_start", PROP_INT, PROP_TIME);
|
2009-12-15 11:27:46 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "startdisp");
|
2010-02-07 23:41:17 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
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");
|
2012-05-10 15:22:29 +00:00
|
|
|
/* overlap tests and calc_seq_disp */
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_start_frame_final_set", NULL);
|
2011-11-16 20:03:54 +00:00
|
|
|
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-12-15 11:27:46 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_final_end", PROP_INT, PROP_TIME);
|
2009-12-15 11:27:46 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "enddisp");
|
2010-02-07 23:41:17 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "End Frame",
|
|
|
|
|
"End frame displayed in the sequence editor after offsets are applied");
|
2012-05-10 15:22:29 +00:00
|
|
|
/* overlap tests and calc_seq_disp */
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_end_frame_final_set", NULL);
|
2011-11-16 20:03:54 +00:00
|
|
|
RNA_def_property_editable_func(prop, "rna_Sequence_frame_editable");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-12-15 11:27:46 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_offset_start", PROP_INT, PROP_TIME);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "startofs");
|
2013-01-02 16:15:45 +00:00
|
|
|
// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Start Offset", "");
|
2014-06-25 16:45:03 +10:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Sequence_frame_offset_range");
|
2013-03-25 17:22:00 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_offset_end", PROP_INT, PROP_TIME);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "endofs");
|
2013-01-02 16:15:45 +00:00
|
|
|
// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
|
2010-07-13 08:20:34 +00:00
|
|
|
RNA_def_property_ui_text(prop, "End Offset", "");
|
2014-06-25 16:45:03 +10:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Sequence_frame_offset_range");
|
2013-03-25 17:22:00 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_still_start", PROP_INT, PROP_TIME);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "startstill");
|
2013-01-02 16:15:45 +00:00
|
|
|
// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_range(prop, 0, MAXFRAME);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Start Still", "");
|
2013-05-02 08:25:22 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "frame_still_end", PROP_INT, PROP_TIME);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "endstill");
|
2013-01-02 16:15:45 +00:00
|
|
|
// RNA_def_property_clear_flag(prop, PROP_EDITABLE); /* overlap tests */
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_range(prop, 0, MAXFRAME);
|
|
|
|
|
RNA_def_property_ui_text(prop, "End Still", "");
|
2013-05-02 08:25:22 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_frame_change_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "channel", PROP_INT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "machine");
|
2015-02-12 02:36:33 +11:00
|
|
|
RNA_def_property_range(prop, 1, MAXSEQ);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Channel", "Y position of the sequence strip");
|
2012-04-29 15:47:02 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_channel_set", NULL); /* overlap test */
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +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
|
|
|
prop = RNA_def_property(srna, "use_linear_modifiers", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_LINEAR_MODIFIERS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Linear Modifiers", "Calculate modifiers in linear space instead of sequencer's space");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
/* blending */
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "blend_type", PROP_ENUM, PROP_NONE);
|
2010-08-20 06:09:58 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "blend_mode");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_enum_items(prop, blend_mode_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Blend Mode", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "blend_alpha", PROP_FLOAT, PROP_FACTOR);
|
2009-12-21 16:57:39 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Blend Opacity", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
/* stupid 0-100 -> 0-1 */
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_float_funcs(prop, "rna_Sequence_opacity_get", "rna_Sequence_opacity_set", NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-06-10 06:02:08 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "effect_fader", PROP_FLOAT, PROP_NONE);
|
2009-11-22 20:22:35 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2012-08-08 16:46:45 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 1.0f, 0.1, 3);
|
2009-11-22 20:22:35 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "effect_fader");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Effect fader position", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-11-14 14:58:19 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_default_fade", PROP_BOOLEAN, PROP_NONE);
|
2009-11-29 18:14:16 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_EFFECT_DEFAULT_FADE);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Default Fade",
|
|
|
|
|
"Fade effect using the built-in default (usually make transition as long as "
|
|
|
|
|
"effect strip)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-11-29 18:14:16 +00:00
|
|
|
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "speed_factor", PROP_FLOAT, PROP_NONE);
|
2009-11-22 20:22:35 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "speed_fader");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Speed factor",
|
|
|
|
|
"Multiply the current speed of the sequence with this number or remap current frame "
|
|
|
|
|
"to this frame");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-11-14 14:58:19 +00:00
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
/* modifiers */
|
|
|
|
|
prop = RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "SequenceModifier");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Modifiers", "Modifiers affecting this strip");
|
|
|
|
|
rna_def_sequence_modifiers(brna, prop);
|
|
|
|
|
|
2010-06-21 22:05:34 +00:00
|
|
|
RNA_api_sequence_strip(srna);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2009-09-14 16:52:06 +00:00
|
|
|
static void rna_def_editor(BlenderRNA *brna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
2015-03-26 17:54:16 +01:00
|
|
|
|
|
|
|
|
static const EnumPropertyItem editing_storage_items[] = {
|
|
|
|
|
{0, "PER_STRIP", 0, "Per Strip", "Store proxies using per strip settings"},
|
|
|
|
|
{SEQ_EDIT_PROXY_DIR_STORAGE, "PROJECT", 0, "Project", "Store proxies using project directory"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "SequenceEditor", NULL);
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_struct_ui_text(srna, "Sequence Editor", "Sequence editing data for a Scene data-block");
|
2009-06-07 13:09:18 +00:00
|
|
|
RNA_def_struct_ui_icon(srna, ICON_SEQUENCE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Editing");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Sequence");
|
2014-04-28 16:37:30 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Sequences", "Top-level strips only");
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_api_sequences(brna, prop);
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sequences_all", PROP_COLLECTION, PROP_NONE);
|
2009-12-09 16:00:53 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Sequence");
|
2014-04-28 16:37:30 +02:00
|
|
|
RNA_def_property_ui_text(prop, "All Sequences", "All strips, recursively including those inside metastrips");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_sequences_all_begin",
|
|
|
|
|
"rna_SequenceEditor_sequences_all_next", NULL, NULL, NULL, NULL, NULL, NULL);
|
2009-12-09 16:00:53 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "meta_stack", PROP_COLLECTION, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "metastack", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Sequence");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Meta Stack", "Meta strip stack, last is currently edited meta strip");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_collection_funcs(prop, NULL, NULL, NULL, "rna_SequenceEditor_meta_stack_get",
|
|
|
|
|
NULL, NULL, NULL, NULL);
|
2009-06-06 11:34:18 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "active_strip", PROP_POINTER, PROP_NONE);
|
2009-06-06 11:34:18 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "act_seq");
|
2010-05-02 17:36:38 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Active Strip", "Sequencer's active strip");
|
2010-05-02 17:36:38 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "show_overlay", PROP_BOOLEAN, PROP_NONE);
|
2010-07-08 10:03:29 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "over_flag", SEQ_EDIT_OVERLAY_SHOW);
|
2011-04-11 01:18:25 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Draw Axes", "Partial overlay on top of the sequencer");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
|
2010-07-08 10:03:29 +00:00
|
|
|
|
2013-04-23 07:06:29 +00:00
|
|
|
prop = RNA_def_property(srna, "use_overlay_lock", PROP_BOOLEAN, PROP_NONE);
|
2010-07-08 10:03:29 +00:00
|
|
|
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");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
|
2010-07-08 10:03:29 +00:00
|
|
|
|
|
|
|
|
/* access to fixed and relative frame */
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "overlay_frame", PROP_INT, PROP_NONE);
|
2010-07-08 10:03:29 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Overlay Offset", "");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_int_funcs(prop, "rna_SequenceEditor_overlay_frame_get",
|
|
|
|
|
"rna_SequenceEditor_overlay_frame_set", NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL);
|
2015-03-26 17:54:16 +01:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "proxy_storage", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_items(prop, editing_storage_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proxy Storage", "How to store proxies for this project");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "proxy_dir", PROP_STRING, PROP_DIRPATH);
|
|
|
|
|
RNA_def_property_string_sdna(prop, NULL, "proxy_dir");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proxy Directory", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, "rna_SequenceEditor_update_cache");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_filter_video(StructRNA *srna)
|
|
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-12-31 13:52:13 +00:00
|
|
|
static const EnumPropertyItem alpha_mode_items[] = {
|
|
|
|
|
{SEQ_ALPHA_STRAIGHT, "STRAIGHT", 0, "Straight", "RGB channels in transparent pixels are unaffected by the alpha channel"},
|
|
|
|
|
{SEQ_ALPHA_PREMUL, "PREMUL", 0, "Premultiplied", "RGB channels in transparent pixels are multiplied by the alpha channel"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_deinterlace", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FILTERY);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "De-Interlace", "For video movies to remove fields");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update_reopen_files");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-12-31 13:52:13 +00:00
|
|
|
prop = RNA_def_property(srna, "alpha_mode", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_items(prop, alpha_mode_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Alpha Mode", "Representation of alpha information in the RGBA pixels");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_flip_x", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPX);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Flip X", "Flip on the X axis");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_flip_y", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_FLIPY);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Flip Y", "Flip on the Y axis");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_float", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_MAKE_FLOAT);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Convert Float", "Convert input to float data");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_reverse_frames", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_REVERSE_FRAMES);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Flip Time", "Reverse frame order");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "mul");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 20.0f);
|
2012-08-13 09:47:45 +00:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Multiply Colors", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "color_saturation", PROP_FLOAT, PROP_UNSIGNED);
|
2010-07-13 09:28:01 +00:00
|
|
|
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);
|
2012-08-13 09:47:45 +00:00
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
2010-07-13 09:28:01 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Saturation", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2010-07-13 09:28:01 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "strobe", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_range(prop, 1.0f, 30.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Strobe", "Only display every nth frame");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_translation", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_TRANSFORM);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Translation", "Translate image before processing");
|
2009-12-08 12:59:21 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_translation_set");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-11-29 18:14:16 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "transform", PROP_POINTER, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "strip->transform");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Transform", "");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_crop", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_CROP);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Crop", "Crop image before processing");
|
2009-12-08 12:59:21 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_crop_set");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "crop", PROP_POINTER, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "strip->crop");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Crop", "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_proxy(StructRNA *srna)
|
|
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_proxy", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_PROXY);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use Proxy / Timecode", "Use a preview proxy and/or timecode index for this strip");
|
2009-12-08 12:59:21 +00:00
|
|
|
RNA_def_property_boolean_funcs(prop, NULL, "rna_Sequence_use_proxy_set");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "strip->proxy");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Proxy", "");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_input(StructRNA *srna)
|
|
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "animation_offset_start", PROP_INT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "anim_startofs");
|
2010-04-18 18:30:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-03-05 23:30:41 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_startofs_final_set", NULL); /* overlap tests */
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Animation Start Offset", "Animation start offset (trim start)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2013-03-25 17:22:00 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "animation_offset_end", PROP_INT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "anim_endofs");
|
2010-04-18 18:30:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE);
|
2012-03-05 23:30:41 +00:00
|
|
|
RNA_def_property_int_funcs(prop, NULL, "rna_Sequence_anim_endofs_final_set", NULL); /* overlap tests */
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Animation End Offset", "Animation end offset (trim end)");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-09-04 13:48:24 +00:00
|
|
|
static void rna_def_effect_inputs(StructRNA *srna, int count)
|
2012-05-10 15:10:51 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "input_count", PROP_INT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_int_funcs(prop, "rna_Sequence_input_count_get", NULL, NULL);
|
|
|
|
|
|
|
|
|
|
if (count >= 1) {
|
|
|
|
|
prop = RNA_def_property(srna, "input_1", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "seq1");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Input 1", "First input for the effect strip");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (count >= 2) {
|
|
|
|
|
prop = RNA_def_property(srna, "input_2", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "seq2");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Input 2", "Second input for the effect strip");
|
|
|
|
|
}
|
|
|
|
|
|
2012-10-04 13:26:15 +00:00
|
|
|
#if 0
|
2012-05-29 10:31:42 +00:00
|
|
|
if (count == 3) { // not used by any effects (perhaps one day plugins?)
|
2012-05-10 15:10:51 +00:00
|
|
|
prop = RNA_def_property(srna, "input_3", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "seq3");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_NULL);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Input 3", "Third input for the effect strip");
|
|
|
|
|
}
|
2012-10-04 13:26:15 +00:00
|
|
|
#endif
|
2012-05-10 15:10:51 +00:00
|
|
|
}
|
|
|
|
|
|
2012-11-05 14:44:29 +00:00
|
|
|
static void rna_def_color_management(StructRNA *srna)
|
|
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "colorspace_settings", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "strip->colorspace_settings");
|
2012-12-24 15:51:27 +00:00
|
|
|
RNA_def_property_struct_type(prop, "ColorManagedInputColorspaceSettings");
|
2012-11-05 14:44:29 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Color Space Settings", "Input color space settings");
|
|
|
|
|
}
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
static void rna_def_image(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "ImageSequence", "Sequence");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Image Sequence", "Sequence strip to load one or more images");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "directory", PROP_STRING, PROP_DIRPATH);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_string_sdna(prop, NULL, "strip->dir");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Directory", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
|
2011-05-26 09:20:30 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_struct_type(prop, "SequenceElement");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Elements", "");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next",
|
|
|
|
|
"rna_iterator_array_end", "rna_iterator_array_get",
|
|
|
|
|
"rna_SequenceEditor_elements_length", NULL, NULL, NULL);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_api_sequence_elements(brna, prop);
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
/* multiview */
|
|
|
|
|
prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_VIEWS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_views_format_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "views_format");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_views_format_items);
|
2015-04-06 10:40:12 -03:00
|
|
|
RNA_def_property_ui_text(prop, "Views Format", "Mode to load image views");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Stereo3dFormat");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3d");
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
rna_def_filter_video(srna);
|
|
|
|
|
rna_def_proxy(srna);
|
|
|
|
|
rna_def_input(srna);
|
2012-11-05 14:44:29 +00:00
|
|
|
rna_def_color_management(srna);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_meta(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "MetaSequence", "Sequence");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Meta Sequence", "Sequence strip to group other strips as a single sequence strip");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "sequences", PROP_COLLECTION, PROP_NONE);
|
|
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "seqbase", NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Sequence");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Sequences", "");
|
|
|
|
|
|
|
|
|
|
rna_def_filter_video(srna);
|
|
|
|
|
rna_def_proxy(srna);
|
|
|
|
|
rna_def_input(srna);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_scene(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "SceneSequence", "Sequence");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Scene Sequence", "Sequence strip to used the rendered image of a scene");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "scene", PROP_POINTER, PROP_NONE);
|
2009-11-22 21:16:04 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Scene", "Scene that this sequence uses");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2010-03-09 13:52:52 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "scene_camera", PROP_POINTER, PROP_NONE);
|
2010-03-09 13:52:52 +00:00
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
2010-08-03 06:51:36 +00:00
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_Camera_object_poll");
|
2010-03-09 13:52:52 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Camera Override", "Override the scenes active camera");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2014-12-10 15:26:41 +01:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_sequence", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SCENE_STRIPS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Sequence", "Use scenes sequence strips directly, instead of rendering");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
2014-12-05 16:39:49 +13:00
|
|
|
prop = RNA_def_property(srna, "use_grease_pencil", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_SCENE_NO_GPENCIL);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Grease Pencil", "Show Grease Pencil strokes in OpenGL previews");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2010-03-08 21:33:51 +00:00
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
rna_def_filter_video(srna);
|
|
|
|
|
rna_def_proxy(srna);
|
|
|
|
|
rna_def_input(srna);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_movie(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "MovieSequence", "Sequence");
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Movie Sequence", "Sequence strip to load a video");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "mpeg_preseek", PROP_INT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "anim_preseek");
|
|
|
|
|
RNA_def_property_range(prop, 0, 50);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "MPEG Preseek", "For MPEG movies, preseek this many frames");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "stream_index", PROP_INT, PROP_NONE);
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "streamindex");
|
|
|
|
|
RNA_def_property_range(prop, 0, 20);
|
2012-05-20 00:34:54 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Stream Index",
|
2012-03-18 09:27:36 +00:00
|
|
|
"For files with several movie streams, use the stream with the given index");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update_reopen_files");
|
== Sequencer ==
This patch adds:
* support for proxy building again (missing feature from Blender 2.49)
additionally to the way, Blender 2.49 worked, you can select several
strips at once and make Blender build proxies in the background (using
the job system)
Also a new thing: movie proxies are now build into AVI files, and
the proxy system is moved into ImBuf-library, so that other parts
of blender can also benefit from it.
* Timecode support: to fix seeking issues with files, that have
a) varying frame rates
b) very large GOP lengths
c) are broken inbetween
d) use different time code tracks
the proxy builder can now also build timecode indices, which are
used (optionally) for seeking.
For the first time, it is possible, to do frame exact seeking on
all file types.
* Support for different video-streams in one video file (can be
selected in sequencer, other parts of blender can also use it,
but UI has to be added accordingly)
* IMPORTANT: this patch *requires* ffmpeg 0.7 or newer, since
older versions don't support the pkt_pts field, that is essential
for building timecode indices.
Windows and Mac libs are already updated, Linux-users have to build
their own ffmpeg verions until distros keep up.
2011-08-28 14:46:03 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "elements", PROP_COLLECTION, PROP_NONE);
|
2011-05-26 09:20:30 +00:00
|
|
|
RNA_def_property_collection_sdna(prop, NULL, "strip->stripdata", NULL);
|
2010-11-28 18:23:21 +00:00
|
|
|
RNA_def_property_struct_type(prop, "SequenceElement");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Elements", "");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_collection_funcs(prop, "rna_SequenceEditor_elements_begin", "rna_iterator_array_next",
|
|
|
|
|
"rna_iterator_array_end", "rna_iterator_array_get",
|
|
|
|
|
"rna_SequenceEditor_elements_length", NULL, NULL, NULL);
|
2010-11-28 18:23:21 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
|
2010-02-28 11:17:55 +00:00
|
|
|
RNA_def_property_ui_text(prop, "File", "");
|
|
|
|
|
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
|
2012-05-10 15:22:29 +00:00
|
|
|
"rna_Sequence_filepath_set");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2015-04-06 10:40:12 -03:00
|
|
|
/* multiview */
|
|
|
|
|
prop = RNA_def_property(srna, "use_multiview", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_USE_VIEWS);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Use Multi-View", "Use Multiple Views (when available)");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_views_format_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "views_format", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "views_format");
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_views_format_items);
|
2015-04-06 10:40:12 -03:00
|
|
|
RNA_def_property_ui_text(prop, "Views Format", "Mode to load movie views");
|
|
|
|
|
RNA_def_property_update(prop, NC_IMAGE | ND_DISPLAY, "rna_Sequence_views_format_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "stereo_3d_format", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "stereo3d_format");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_NEVER_NULL);
|
|
|
|
|
RNA_def_property_struct_type(prop, "Stereo3dFormat");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stereo 3D Format", "Settings for stereo 3d");
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
rna_def_filter_video(srna);
|
|
|
|
|
rna_def_proxy(srna);
|
|
|
|
|
rna_def_input(srna);
|
2012-11-05 14:44:29 +00:00
|
|
|
rna_def_color_management(srna);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-03-21 18:02:29 +00:00
|
|
|
static void rna_def_movieclip(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "MovieClipSequence", "Sequence");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "MovieClip Sequence", "Sequence strip to load a video from the clip editor");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
2012-06-07 18:24:36 +00:00
|
|
|
/* TODO - add clip property? */
|
|
|
|
|
|
2012-03-21 18:02:29 +00:00
|
|
|
prop = RNA_def_property(srna, "undistort", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "clip_flag", SEQ_MOVIECLIP_RENDER_UNDISTORTED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Undistort Clip", "Use the undistorted version of the clip");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2012-03-21 18:02:29 +00:00
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "stabilize2d", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "clip_flag", SEQ_MOVIECLIP_RENDER_STABILIZED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Stabilize 2D Clip", "Use the 2D stabilized version of the clip");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2012-03-21 18:02:29 +00:00
|
|
|
|
|
|
|
|
rna_def_filter_video(srna);
|
|
|
|
|
rna_def_input(srna);
|
|
|
|
|
}
|
|
|
|
|
|
2012-06-07 18:24:36 +00:00
|
|
|
static void rna_def_mask(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "MaskSequence", "Sequence");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "Mask Sequence", "Sequence strip to load a video from a mask");
|
|
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "mask", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mask", "Mask that this sequence uses");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
|
|
|
|
rna_def_filter_video(srna);
|
|
|
|
|
rna_def_input(srna);
|
|
|
|
|
}
|
2012-03-21 18:02:29 +00:00
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
static void rna_def_sound(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "SoundSequence", "Sequence");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Sound Sequence",
|
|
|
|
|
"Sequence strip defining a sound to be played over a period of time");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "sound", PROP_POINTER, PROP_NONE);
|
2009-08-17 18:07:40 +00:00
|
|
|
RNA_def_property_struct_type(prop, "Sound");
|
2015-10-24 02:44:43 +11:00
|
|
|
RNA_def_property_ui_text(prop, "Sound", "Sound data-block used by this sequence");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "volume", PROP_FLOAT, PROP_NONE);
|
2010-02-07 23:41:17 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "volume");
|
2010-05-30 21:17:59 +00:00
|
|
|
RNA_def_property_range(prop, 0.0f, 100.0f);
|
2010-02-07 23:41:17 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Volume", "Playback volume of the sound");
|
2015-08-16 17:32:01 +10:00
|
|
|
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_volume_set", NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2010-02-07 23:41:17 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "pitch", PROP_FLOAT, PROP_NONE);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "pitch");
|
|
|
|
|
RNA_def_property_range(prop, 0.1f, 10.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Pitch", "Playback pitch of the sound");
|
2015-08-16 17:32:01 +10:00
|
|
|
RNA_def_property_translation_context(prop, BLT_I18NCONTEXT_ID_SOUND);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pitch_set", NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2010-05-30 21:17:59 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "pan", PROP_FLOAT, PROP_NONE);
|
3D Audio GSoC:
Implemented basic audio animation.
* AnimatableProperty: Propper cache writing and spline interpolation for reading (the solution for stair steps in audio animation)
* Animatable properties so far are: volume, pitch, panning
* Users note: Changing the pitch of a sound results in wrong seeking, due to the resulting playback length difference.
* Users note: Panning only works for mono sources, values are in the range [-2..2], this basically controls the angle of the sound, 0 is front, -1 left, 1 right and 2 and -2 are back. Typical stereo panning only supports [-1..1].
* Disabled animation of audio related ffmpeg output parameters.
* Scene Audio Panel: 3D Listener settings also for Renderer, new Volume property (animatable!), Update/Bake buttons for animation problems, moved sampling rate and channel count here
2011-07-28 13:58:59 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "pan");
|
|
|
|
|
RNA_def_property_range(prop, -2.0f, 2.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Pan", "Playback panning of the sound (only for Mono sources)");
|
|
|
|
|
RNA_def_property_float_funcs(prop, NULL, "rna_Sequence_pan_set", NULL);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2010-05-30 21:17:59 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "filepath", PROP_STRING, PROP_FILEPATH);
|
2010-02-28 11:17:55 +00:00
|
|
|
RNA_def_property_ui_text(prop, "File", "");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_string_funcs(prop, "rna_Sequence_filepath_get", "rna_Sequence_filepath_length",
|
2012-05-10 15:22:29 +00:00
|
|
|
"rna_Sequence_filepath_set");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-05-10 15:32:01 +00:00
|
|
|
prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
|
2012-05-10 15:10:51 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
|
2009-11-19 03:21:37 +00:00
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
rna_def_input(srna);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_effect(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
|
2008-12-19 04:06:24 +00:00
|
|
|
srna = RNA_def_struct(brna, "EffectSequence", "Sequence");
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_struct_ui_text(srna, "Effect Sequence",
|
|
|
|
|
"Sequence strip applying an effect on the images created by other strips");
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
2010-04-18 13:05:17 +00:00
|
|
|
rna_def_filter_video(srna);
|
2008-12-15 10:48:04 +00:00
|
|
|
rna_def_proxy(srna);
|
|
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
static void rna_def_multicam(StructRNA *srna)
|
== Sequencer ==
This adds MULTICAM-editing support for blender. (Well, the beginning of.)
There is now a new effect track, named MULTICAM, which just selects
one of the lower tracks.
Doesn't sound that exciting, but if you combine this with A/B-Trim (moving
split points of two directly connected tracks around, while magically
resizing both strips, something to be added), you just do:
* add several tracks for your camera angles
* (optionally) sync those tracks
* add one multicam track on top
Use that multicam-track to edit your movie. (Either using fcurves on the
multicam source selector or using knife-tool and A/B-Trim.)
Compare that to:
* add several tracks
* add cross fades between them
* do some python scripting to add several fcurves to make that beast
somewhat work.
* cry out loud, using it, if you have to move cut points around
Alternatively, even harder:
* just edit the old way and put strip after strip
You might think, that this isn't really helpfull for animators, but
consider using scene-strips (in OpenGL-mode) for input, that are set for
different camera angles and can now be intercut a lot more easily...
Also: small fix on the way: the speed effect can now be used in cascade.
(Don't know, if anyone used it that way, but now it works.)
2010-04-25 12:53:39 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "multicam_source", PROP_INT, PROP_UNSIGNED);
|
== Sequencer ==
This adds MULTICAM-editing support for blender. (Well, the beginning of.)
There is now a new effect track, named MULTICAM, which just selects
one of the lower tracks.
Doesn't sound that exciting, but if you combine this with A/B-Trim (moving
split points of two directly connected tracks around, while magically
resizing both strips, something to be added), you just do:
* add several tracks for your camera angles
* (optionally) sync those tracks
* add one multicam track on top
Use that multicam-track to edit your movie. (Either using fcurves on the
multicam source selector or using knife-tool and A/B-Trim.)
Compare that to:
* add several tracks
* add cross fades between them
* do some python scripting to add several fcurves to make that beast
somewhat work.
* cry out loud, using it, if you have to move cut points around
Alternatively, even harder:
* just edit the old way and put strip after strip
You might think, that this isn't really helpfull for animators, but
consider using scene-strips (in OpenGL-mode) for input, that are set for
different camera angles and can now be intercut a lot more easily...
Also: small fix on the way: the speed effect can now be used in cascade.
(Don't know, if anyone used it that way, but now it works.)
2010-04-25 12:53:39 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "multicam_source");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_range(prop, 0, MAXSEQ - 1);
|
== Sequencer ==
This adds MULTICAM-editing support for blender. (Well, the beginning of.)
There is now a new effect track, named MULTICAM, which just selects
one of the lower tracks.
Doesn't sound that exciting, but if you combine this with A/B-Trim (moving
split points of two directly connected tracks around, while magically
resizing both strips, something to be added), you just do:
* add several tracks for your camera angles
* (optionally) sync those tracks
* add one multicam track on top
Use that multicam-track to edit your movie. (Either using fcurves on the
multicam source selector or using knife-tool and A/B-Trim.)
Compare that to:
* add several tracks
* add cross fades between them
* do some python scripting to add several fcurves to make that beast
somewhat work.
* cry out loud, using it, if you have to move cut points around
Alternatively, even harder:
* just edit the old way and put strip after strip
You might think, that this isn't really helpfull for animators, but
consider using scene-strips (in OpenGL-mode) for input, that are set for
different camera angles and can now be intercut a lot more easily...
Also: small fix on the way: the speed effect can now be used in cascade.
(Don't know, if anyone used it that way, but now it works.)
2010-04-25 12:53:39 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Multicam Source Channel", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
== Sequencer ==
This adds MULTICAM-editing support for blender. (Well, the beginning of.)
There is now a new effect track, named MULTICAM, which just selects
one of the lower tracks.
Doesn't sound that exciting, but if you combine this with A/B-Trim (moving
split points of two directly connected tracks around, while magically
resizing both strips, something to be added), you just do:
* add several tracks for your camera angles
* (optionally) sync those tracks
* add one multicam track on top
Use that multicam-track to edit your movie. (Either using fcurves on the
multicam source selector or using knife-tool and A/B-Trim.)
Compare that to:
* add several tracks
* add cross fades between them
* do some python scripting to add several fcurves to make that beast
somewhat work.
* cry out loud, using it, if you have to move cut points around
Alternatively, even harder:
* just edit the old way and put strip after strip
You might think, that this isn't really helpfull for animators, but
consider using scene-strips (in OpenGL-mode) for input, that are set for
different camera angles and can now be intercut a lot more easily...
Also: small fix on the way: the speed effect can now be used in cascade.
(Don't know, if anyone used it that way, but now it works.)
2010-04-25 12:53:39 +00:00
|
|
|
|
2011-05-16 17:14:47 +00:00
|
|
|
rna_def_input(srna);
|
|
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
static void rna_def_wipe(StructRNA *srna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static const EnumPropertyItem wipe_type_items[] = {
|
2012-03-18 09:27:36 +00:00
|
|
|
{0, "SINGLE", 0, "Single", ""},
|
|
|
|
|
{1, "DOUBLE", 0, "Double", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
/* not used yet {2, "BOX", 0, "Box", ""}, */
|
|
|
|
|
/* not used yet {3, "CROSS", 0, "Cross", ""}, */
|
2012-03-18 09:27:36 +00:00
|
|
|
{4, "IRIS", 0, "Iris", ""},
|
|
|
|
|
{5, "CLOCK", 0, "Clock", ""},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
2008-12-15 10:48:04 +00:00
|
|
|
};
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static const EnumPropertyItem wipe_direction_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, "OUT", 0, "Out", ""},
|
|
|
|
|
{1, "IN", 0, "In", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2008-12-15 10:48:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
RNA_def_struct_sdna_from(srna, "WipeVars", "effectdata");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "blur_width", PROP_FLOAT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "edgeWidth");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2012-03-18 09:27:36 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Blur Width",
|
|
|
|
|
"Width of the blur edge, in percentage relative to the image size");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2011-06-09 08:58:27 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "angle", PROP_FLOAT, PROP_ANGLE);
|
Cleanup: Internal degrees removal.
This patch changes most of the reamining degrees usage in internal code into radians.
I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them.
WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly
in previous versions (a few angle properties would use radians values as degrees...).
Details:
- Data:
-- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such
(using getter/setter functions), still using radians internally.
-- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev.
- Modifiers:
-- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done.
- Postprocessing:
-- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done.
- BGE:
-- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type,
it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence
can be either distance or angle values, depending on the mode. Will leave this to BGE team.
-- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself,
as it seems this is the expected value here...).
-- bRadarSensor.angle: Done.
Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt
Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt
Thanks to all!
Differential Revision: http://developer.blender.org/D59
2013-12-03 20:09:25 +01:00
|
|
|
RNA_def_property_range(prop, DEG2RADF(-90.0f), DEG2RADF(90.0f));
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Angle", "Edge angle");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
Cleanup: Internal degrees removal.
This patch changes most of the reamining degrees usage in internal code into radians.
I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them.
WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly
in previous versions (a few angle properties would use radians values as degrees...).
Details:
- Data:
-- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such
(using getter/setter functions), still using radians internally.
-- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev.
- Modifiers:
-- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done.
- Postprocessing:
-- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done.
- BGE:
-- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type,
it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence
can be either distance or angle values, depending on the mode. Will leave this to BGE team.
-- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself,
as it seems this is the expected value here...).
-- bRadarSensor.angle: Done.
Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt
Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt
Thanks to all!
Differential Revision: http://developer.blender.org/D59
2013-12-03 20:09:25 +01:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "direction", PROP_ENUM, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "forward");
|
|
|
|
|
RNA_def_property_enum_items(prop, wipe_direction_items);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Direction", "Wipe direction");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "transition_type", PROP_ENUM, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "wipetype");
|
|
|
|
|
RNA_def_property_enum_items(prop, wipe_type_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Transition Type", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
static void rna_def_glow(StructRNA *srna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna_from(srna, "GlowVars", "effectdata");
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "threshold", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "fMini");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Threshold", "Minimum intensity to trigger a glow");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "clamp", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "fClamp");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 1.0f);
|
2011-12-04 17:36:13 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Clamp", "Brightness limit of intensity");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "boost_factor", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "fBoost");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 10.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Boost Factor", "Brightness multiplier");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "blur_radius", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "dDist");
|
|
|
|
|
RNA_def_property_range(prop, 0.5f, 20.0f);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Blur Distance", "Radius of glow effect");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "quality", PROP_INT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_int_sdna(prop, NULL, "dQuality");
|
|
|
|
|
RNA_def_property_range(prop, 1, 5);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Quality", "Accuracy of the blur effect");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_only_boost", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "bNoComp", 0);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Only Boost", "Show the glow buffer only");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
static void rna_def_transform(StructRNA *srna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static const EnumPropertyItem interpolation_items[] = {
|
2010-02-11 01:11:52 +00:00
|
|
|
{0, "NONE", 0, "None", "No interpolation"},
|
|
|
|
|
{1, "BILINEAR", 0, "Bilinear", "Bilinear interpolation"},
|
|
|
|
|
{2, "BICUBIC", 0, "Bicubic", "Bicubic interpolation"},
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
2008-12-15 10:48:04 +00:00
|
|
|
};
|
|
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
static const EnumPropertyItem translation_unit_items[] = {
|
2009-06-16 00:52:21 +00:00
|
|
|
{0, "PIXELS", 0, "Pixels", ""},
|
|
|
|
|
{1, "PERCENT", 0, "Percent", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
2008-12-15 10:48:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
RNA_def_struct_sdna_from(srna, "TransformVars", "effectdata");
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "scale_start_x", PROP_FLOAT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ScalexIni");
|
2009-12-11 22:51:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Scale X", "");
|
2013-01-22 11:23:05 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 10, 3, 6);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "scale_start_y", PROP_FLOAT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "ScaleyIni");
|
2009-12-11 22:51:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Scale Y", "");
|
2013-01-22 11:23:05 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0, 10, 3, 6);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-08-18 12:10:12 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_uniform_scale", PROP_BOOLEAN, PROP_NONE);
|
2009-12-09 20:03:08 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "uniform_scale", 0);
|
2010-02-10 21:15:44 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Uniform Scale", "Scale uniformly, preserving aspect ratio");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "translate_start_x", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "xIni");
|
2009-12-11 22:51:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Translate X", "");
|
2014-02-17 14:26:43 +11:00
|
|
|
RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2009-08-18 12:10:12 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "translate_start_y", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "yIni");
|
2009-12-11 22:51:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Translate Y", "");
|
2014-02-17 14:26:43 +11:00
|
|
|
RNA_def_property_ui_range(prop, -4000.0f, 4000.0f, 3, 6);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "rotation_start", PROP_FLOAT, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "rotIni");
|
2009-12-10 11:56:31 +00:00
|
|
|
RNA_def_property_range(prop, -360.0f, 360.0f);
|
2009-12-11 22:51:53 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Rotation", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "translation_unit", PROP_ENUM, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "percent");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_enum_items(prop, translation_unit_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Translation Unit", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "interpolation", PROP_ENUM, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_enum_items(prop, interpolation_items);
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* not meant to be animated */
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Interpolation", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
static void rna_def_solid_color(StructRNA *srna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
2009-12-10 14:47:07 +00:00
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_struct_sdna_from(srna, "SolidColorVars", "effectdata");
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2013-02-04 12:14:59 +00:00
|
|
|
prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "col");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Color", "");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
static void rna_def_speed_control(StructRNA *srna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
RNA_def_struct_sdna_from(srna, "SpeedControlVars", "effectdata");
|
2012-05-10 15:10:51 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "multiply_speed", PROP_FLOAT, PROP_UNSIGNED);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "globalSpeed");
|
2010-02-02 00:02:55 +00:00
|
|
|
RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); /* seq->facf0 is used to animate this */
|
2010-09-29 13:38:43 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Multiply Speed", "Multiply the resulting speed after the speed factor");
|
2013-04-08 18:55:08 +00:00
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 100.0f, 1, -1);
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "use_as_speed", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_INTEGRATE);
|
2010-09-29 13:38:43 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Use as speed", "Interpret the value as speed instead of a frame number");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
|
2012-03-05 23:30:41 +00:00
|
|
|
prop = RNA_def_property(srna, "scale_to_length", PROP_BOOLEAN, PROP_NONE);
|
2008-12-15 10:48:04 +00:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flags", SEQ_SPEED_COMPRESS_IPO_Y);
|
2010-09-29 13:38:43 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Scale to length", "Scale values from 0.0 to 1.0 to target sequence length");
|
2012-05-10 15:22:29 +00:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2014-07-19 22:16:10 +06:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_gaussian_blur(StructRNA *srna)
|
|
|
|
|
{
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
RNA_def_struct_sdna_from(srna, "GaussianBlurVars", "effectdata");
|
|
|
|
|
prop = RNA_def_property(srna, "size_x", PROP_FLOAT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Size X", "Size of the blur along X axis");
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "size_y", PROP_FLOAT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Size Y", "Size of the blur along Y axis");
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, FLT_MAX, 1, -1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
2015-07-01 20:29:18 +02:00
|
|
|
static void rna_def_text(StructRNA *srna)
|
|
|
|
|
{
|
2015-09-18 20:29:35 +10:00
|
|
|
static EnumPropertyItem text_align_x_items[] = {
|
|
|
|
|
{SEQ_TEXT_ALIGN_X_LEFT, "LEFT", 0, "Left", ""},
|
|
|
|
|
{SEQ_TEXT_ALIGN_X_CENTER, "CENTER", 0, "Center", ""},
|
|
|
|
|
{SEQ_TEXT_ALIGN_X_RIGHT, "RIGHT", 0, "Right", ""},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
static EnumPropertyItem text_align_y_items[] = {
|
|
|
|
|
{SEQ_TEXT_ALIGN_Y_TOP, "TOP", 0, "Top", ""},
|
|
|
|
|
{SEQ_TEXT_ALIGN_Y_CENTER, "CENTER", 0, "Center", ""},
|
|
|
|
|
{SEQ_TEXT_ALIGN_Y_BOTTOM, "BOTTOM", 0, "Bottom", ""},
|
2015-07-11 02:17:06 +10:00
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
2015-07-01 20:29:18 +02:00
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
RNA_def_struct_sdna_from(srna, "TextVars", "effectdata");
|
|
|
|
|
|
2015-07-11 02:17:06 +10:00
|
|
|
prop = RNA_def_property(srna, "font_size", PROP_INT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_int_sdna(prop, NULL, "text_size");
|
2015-07-01 20:29:18 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Size", "Size of the text");
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0f, 1000, 1, -1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
2015-09-22 00:15:37 +10:00
|
|
|
prop = RNA_def_property(srna, "location", PROP_FLOAT, PROP_XYZ);
|
2015-07-11 02:17:06 +10:00
|
|
|
RNA_def_property_float_sdna(prop, NULL, "loc");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Location", "Location of the text");
|
|
|
|
|
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
|
2015-07-01 20:29:18 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
2015-09-18 20:29:35 +10:00
|
|
|
prop = RNA_def_property(srna, "wrap_width", PROP_FLOAT, PROP_NONE);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "wrap_width");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Wrap Width", "Word wrap width as factor, zero disables");
|
|
|
|
|
RNA_def_property_range(prop, 0, FLT_MAX);
|
|
|
|
|
RNA_def_property_ui_range(prop, 0.0, 1.0, 1, -1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "align_x", PROP_ENUM, PROP_NONE);
|
2015-07-11 02:17:06 +10:00
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "align");
|
2015-09-18 20:29:35 +10:00
|
|
|
RNA_def_property_enum_items(prop, text_align_x_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Align X", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "align_y", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "align_y");
|
|
|
|
|
RNA_def_property_enum_items(prop, text_align_y_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Align Y", "");
|
2015-07-01 20:29:18 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "text", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Text", "Text that will be displayed");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "use_shadow", PROP_BOOLEAN, PROP_NONE);
|
2015-07-11 02:17:06 +10:00
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_TEXT_SHADOW);
|
2015-07-14 21:41:24 +02:00
|
|
|
RNA_def_property_ui_text(prop, "Shadow", "Draw text with shadow");
|
2015-07-01 20:29:18 +02:00
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_update");
|
|
|
|
|
}
|
|
|
|
|
|
2012-05-10 15:10:51 +00:00
|
|
|
static EffectInfo def_effects[] = {
|
2012-09-04 13:48:24 +00:00
|
|
|
{"AddSequence", "Add Sequence", "Add Sequence", NULL, 2},
|
2012-05-10 15:10:51 +00:00
|
|
|
{"AdjustmentSequence", "Adjustment Layer Sequence",
|
2012-09-04 13:48:24 +00:00
|
|
|
"Sequence strip to perform filter adjustments to layers below", rna_def_input, 0},
|
|
|
|
|
{"AlphaOverSequence", "Alpha Over Sequence", "Alpha Over Sequence", NULL, 2},
|
|
|
|
|
{"AlphaUnderSequence", "Alpha Under Sequence", "Alpha Under Sequence", NULL, 2},
|
2012-05-10 15:10:51 +00:00
|
|
|
{"ColorSequence", "Color Sequence",
|
2012-09-04 13:48:24 +00:00
|
|
|
"Sequence strip creating an image filled with a single color", rna_def_solid_color, 0},
|
|
|
|
|
{"CrossSequence", "Cross Sequence", "Cross Sequence", NULL, 2},
|
|
|
|
|
{"GammaCrossSequence", "Gamma Cross Sequence", "Gamma Cross Sequence", NULL, 2},
|
|
|
|
|
{"GlowSequence", "Glow Sequence", "Sequence strip creating a glow effect", rna_def_glow, 1},
|
2012-08-11 14:38:02 +00:00
|
|
|
{"MulticamSequence", "Multicam Select Sequence", "Sequence strip to perform multicam editing",
|
2012-09-04 13:48:24 +00:00
|
|
|
rna_def_multicam, 0},
|
|
|
|
|
{"MultiplySequence", "Multiply Sequence", "Multiply Sequence", NULL, 2},
|
|
|
|
|
{"OverDropSequence", "Over Drop Sequence", "Over Drop Sequence", NULL, 2},
|
2012-05-10 15:10:51 +00:00
|
|
|
{"SpeedControlSequence", "SpeedControl Sequence",
|
2012-09-04 13:48:24 +00:00
|
|
|
"Sequence strip to control the speed of other strips", rna_def_speed_control, 1},
|
|
|
|
|
{"SubtractSequence", "Subtract Sequence", "Subtract Sequence", NULL, 2},
|
2012-05-10 15:10:51 +00:00
|
|
|
{"TransformSequence", "Transform Sequence",
|
2012-09-04 13:48:24 +00:00
|
|
|
"Sequence strip applying affine transformations to other strips", rna_def_transform, 1},
|
2012-08-11 14:38:02 +00:00
|
|
|
{"WipeSequence", "Wipe Sequence", "Sequence strip creating a wipe transition",
|
2012-09-04 13:48:24 +00:00
|
|
|
rna_def_wipe, 1},
|
2014-07-19 22:16:10 +06:00
|
|
|
{"GaussianBlurSequence", "Gaussian Blur Sequence", "Sequence strip creating a gaussian blur",
|
|
|
|
|
rna_def_gaussian_blur, 1},
|
2015-07-01 20:29:18 +02:00
|
|
|
{"TextSequence", "Text Sequence", "Sequence strip creating text",
|
|
|
|
|
rna_def_text, 0},
|
2012-09-04 13:48:24 +00:00
|
|
|
{"", "", "", NULL, 0}
|
2012-05-10 15:10:51 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
static void rna_def_effects(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
EffectInfo *effect;
|
|
|
|
|
|
|
|
|
|
for (effect = def_effects; effect->struct_name[0] != '\0'; effect++) {
|
|
|
|
|
srna = RNA_def_struct(brna, effect->struct_name, "EffectSequence");
|
|
|
|
|
RNA_def_struct_ui_text(srna, effect->ui_name, effect->ui_desc);
|
|
|
|
|
RNA_def_struct_sdna(srna, "Sequence");
|
|
|
|
|
|
2012-09-04 13:48:24 +00:00
|
|
|
rna_def_effect_inputs(srna, effect->inputs);
|
2012-05-10 15:10:51 +00:00
|
|
|
|
|
|
|
|
if (effect->func)
|
|
|
|
|
effect->func(srna);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_def_modifier(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
static const EnumPropertyItem mask_input_type_items[] = {
|
|
|
|
|
{SEQUENCE_MASK_INPUT_STRIP, "STRIP", 0, "Strip", "Use sequencer strip as mask input"},
|
|
|
|
|
{SEQUENCE_MASK_INPUT_ID, "ID", 0, "Mask", "Use mask ID as mask input"},
|
|
|
|
|
{0, NULL, 0, NULL, NULL}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "SequenceModifier", NULL);
|
|
|
|
|
RNA_def_struct_sdna(srna, "SequenceModifierData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "SequenceModifier", "Modifier for sequence strip");
|
|
|
|
|
RNA_def_struct_refine_func(srna, "rna_SequenceModifier_refine");
|
|
|
|
|
RNA_def_struct_path_func(srna, "rna_SequenceModifier_path");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
|
|
|
|
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_SequenceModifier_name_set");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Name", "");
|
|
|
|
|
RNA_def_struct_name_property(srna, prop);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
2015-11-23 13:49:52 +11:00
|
|
|
RNA_def_property_enum_items(prop, rna_enum_sequence_modifier_type_items);
|
2012-08-19 15:41:56 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Type", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "mute", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQUENCE_MODIFIER_MUTE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mute", "Mute this modifier");
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_RESTRICT_VIEW_OFF, 1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "show_expanded", PROP_BOOLEAN, PROP_NONE);
|
|
|
|
|
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQUENCE_MODIFIER_EXPANDED);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Expanded", "Mute expanded settings for the modifier");
|
|
|
|
|
RNA_def_property_ui_icon(prop, ICON_TRIA_RIGHT, 1);
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "input_mask_type", PROP_ENUM, PROP_NONE);
|
|
|
|
|
RNA_def_property_enum_sdna(prop, NULL, "mask_input_type");
|
|
|
|
|
RNA_def_property_enum_items(prop, mask_input_type_items);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mask Input Type", "Type of input data used for mask");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "input_mask_strip", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "mask_sequence");
|
|
|
|
|
RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_SequenceModifier_otherSequence_poll");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mask Strip", "Strip used as mask input for the modifier");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "input_mask_id", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "mask_id");
|
|
|
|
|
RNA_def_property_flag(prop, PROP_EDITABLE);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Mask", "Mask ID used as mask input for the modifier");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_colorbalance_modifier(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "ColorBalanceModifier", "SequenceModifier");
|
|
|
|
|
RNA_def_struct_sdna(srna, "ColorBalanceModifierData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "ColorBalanceModifier", "Color balance modifier for sequence strip");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "color_balance", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_struct_type(prop, "SequenceColorBalanceData");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "color_multiply", PROP_FLOAT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "color_multiply");
|
|
|
|
|
RNA_def_property_range(prop, 0.0f, 20.0f);
|
|
|
|
|
RNA_def_property_float_default(prop, 1.0f);
|
|
|
|
|
RNA_def_property_ui_text(prop, "Multiply Colors", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
}
|
|
|
|
|
|
2015-12-28 11:55:14 +01:00
|
|
|
static void rna_def_whitebalance_modifier(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "WhiteBalanceModifier", "SequenceModifier");
|
|
|
|
|
RNA_def_struct_sdna(srna, "WhiteBalanceModifierData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "WhiteBalanceModifier", "White balance modifier for sequence strip");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "white_value", PROP_FLOAT, PROP_COLOR_GAMMA);
|
|
|
|
|
RNA_def_property_range(prop, 0.0, 1.0);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "white_value");
|
|
|
|
|
RNA_def_property_ui_text(prop, "White value", "This color defines white in the strip");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_def_curves_modifier(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "CurvesModifier", "SequenceModifier");
|
|
|
|
|
RNA_def_struct_sdna(srna, "CurvesModifierData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "CurvesModifier", "RGB curves modifier for sequence strip");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
|
|
|
|
|
RNA_def_property_struct_type(prop, "CurveMapping");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Curve Mapping", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static void rna_def_hue_modifier(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "HueCorrectModifier", "SequenceModifier");
|
|
|
|
|
RNA_def_struct_sdna(srna, "HueCorrectModifierData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "HueCorrectModifier", "Hue correction modifier for sequence strip");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "curve_mapping", PROP_POINTER, PROP_NONE);
|
|
|
|
|
RNA_def_property_pointer_sdna(prop, NULL, "curve_mapping");
|
|
|
|
|
RNA_def_property_struct_type(prop, "CurveMapping");
|
|
|
|
|
RNA_def_property_ui_text(prop, "Curve Mapping", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-24 09:07:04 +00:00
|
|
|
static void rna_def_brightcontrast_modifier(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
StructRNA *srna;
|
|
|
|
|
PropertyRNA *prop;
|
|
|
|
|
|
|
|
|
|
srna = RNA_def_struct(brna, "BrightContrastModifier", "SequenceModifier");
|
|
|
|
|
RNA_def_struct_sdna(srna, "BrightContrastModifierData");
|
|
|
|
|
RNA_def_struct_ui_text(srna, "BrightContrastModifier", "Bright/contrast modifier data for sequence strip");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "bright", PROP_FLOAT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "bright");
|
2012-08-24 09:44:46 +00:00
|
|
|
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
2012-08-24 09:07:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Bright", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
|
|
|
|
|
prop = RNA_def_property(srna, "contrast", PROP_FLOAT, PROP_UNSIGNED);
|
|
|
|
|
RNA_def_property_float_sdna(prop, NULL, "contrast");
|
2012-08-24 09:44:46 +00:00
|
|
|
RNA_def_property_range(prop, -FLT_MAX, FLT_MAX);
|
2012-08-24 09:07:04 +00:00
|
|
|
RNA_def_property_ui_text(prop, "Contrast", "");
|
|
|
|
|
RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_SequenceModifier_update");
|
|
|
|
|
}
|
|
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
static void rna_def_modifiers(BlenderRNA *brna)
|
|
|
|
|
{
|
|
|
|
|
rna_def_modifier(brna);
|
2012-08-24 09:07:04 +00:00
|
|
|
|
2012-08-19 15:41:56 +00:00
|
|
|
rna_def_colorbalance_modifier(brna);
|
|
|
|
|
rna_def_curves_modifier(brna);
|
|
|
|
|
rna_def_hue_modifier(brna);
|
2012-08-24 09:07:04 +00:00
|
|
|
rna_def_brightcontrast_modifier(brna);
|
2015-12-28 11:55:14 +01:00
|
|
|
rna_def_whitebalance_modifier(brna);
|
2012-08-19 15:41:56 +00:00
|
|
|
}
|
|
|
|
|
|
2009-12-13 15:48:57 +00:00
|
|
|
void RNA_def_sequencer(BlenderRNA *brna)
|
2008-12-15 10:48:04 +00:00
|
|
|
{
|
2012-08-19 15:41:56 +00:00
|
|
|
rna_def_color_balance(brna);
|
|
|
|
|
|
2008-12-15 10:48:04 +00:00
|
|
|
rna_def_strip_element(brna);
|
|
|
|
|
rna_def_strip_proxy(brna);
|
|
|
|
|
rna_def_strip_color_balance(brna);
|
|
|
|
|
rna_def_strip_crop(brna);
|
|
|
|
|
rna_def_strip_transform(brna);
|
|
|
|
|
|
|
|
|
|
rna_def_sequence(brna);
|
|
|
|
|
rna_def_editor(brna);
|
|
|
|
|
|
|
|
|
|
rna_def_image(brna);
|
|
|
|
|
rna_def_meta(brna);
|
|
|
|
|
rna_def_scene(brna);
|
|
|
|
|
rna_def_movie(brna);
|
2012-03-21 18:02:29 +00:00
|
|
|
rna_def_movieclip(brna);
|
2012-06-07 18:24:36 +00:00
|
|
|
rna_def_mask(brna);
|
2008-12-15 10:48:04 +00:00
|
|
|
rna_def_sound(brna);
|
|
|
|
|
rna_def_effect(brna);
|
2012-05-10 15:10:51 +00:00
|
|
|
rna_def_effects(brna);
|
2012-08-19 15:41:56 +00:00
|
|
|
rna_def_modifiers(brna);
|
2008-12-15 10:48:04 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#endif
|