2011-02-23 10:52:22 +00:00
/*
2008-12-15 10:48:04 +00:00
* $ Id $
*
* * * * * * 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>
2009-12-08 13:57:51 +00:00
# include "RNA_access.h"
2008-12-15 10:48:04 +00:00
# include "RNA_define.h"
# include "rna_internal.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"
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"
2009-07-08 17:41:45 +00:00
# include "WM_types.h"
2010-05-30 21:17:59 +00:00
# include "BLI_math.h"
2008-12-15 10:48:04 +00:00
2009-07-08 17:41:45 +00:00
# ifdef RNA_RUNTIME
2009-06-16 00:52:21 +00:00
2009-12-09 16:00:53 +00:00
/* build a temp referene 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
{
for ( ; seq ; seq = seq - > next ) {
seq - > tmp = seq_par ;
if ( seq - > type = = SEQ_META ) {
meta_tmp_ref ( seq , seq - > seqbase . first ) ;
}
}
}
static void rna_SequenceEditor_sequences_all_begin ( CollectionPropertyIterator * iter , PointerRNA * ptr )
{
2009-12-15 11:27:46 +00:00
Scene * scene = ( Scene * ) ptr - > id . data ;
Editing * ed = seq_give_editing ( 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 ) ;
}
static void rna_SequenceEditor_sequences_all_next ( CollectionPropertyIterator * iter )
{
ListBaseIterator * internal = iter - > internal ;
Sequence * seq = ( Sequence * ) internal - > link ;
if ( seq - > seqbase . first )
internal - > link = ( Link * ) seq - > seqbase . first ;
else if ( seq - > next )
internal - > link = ( Link * ) seq - > next ;
else {
internal - > link = NULL ;
do {
seq = seq - > tmp ; // XXX - seq's dont reference their parents!
if ( seq & & seq - > next ) {
internal - > link = ( Link * ) seq - > next ;
break ;
}
} while ( seq ) ;
}
iter - > valid = ( internal - > link ! = NULL ) ;
}
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 )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
/* Hack? copied from sequencer.c::reload_sequence_new_file() */
size_t olen = MEM_allocN_len ( seq - > strip - > stripdata ) / sizeof ( struct StripElem ) ;
/* 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 )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
rna_iterator_array_begin ( iter , ( void * ) seq - > strip - > stripdata , sizeof ( StripElem ) , rna_SequenceEditor_elements_length ( ptr ) , 0 , NULL ) ;
}
2009-12-15 11:27:46 +00:00
static void rna_Sequence_frame_change_update ( Scene * scene , Sequence * seq )
2009-06-10 19:57:06 +00:00
{
2009-12-15 11:27:46 +00:00
Editing * ed = seq_give_editing ( scene , FALSE ) ;
2009-12-16 16:35:31 +00:00
ListBase * seqbase = seq_seqbase ( & ed - > seqbase , seq ) ;
2010-02-07 23:41:17 +00:00
calc_sequence_disp ( scene , seq ) ;
2009-12-15 11:27:46 +00:00
2009-12-16 16:35:31 +00:00
if ( seq_test_overlap ( seqbase , seq ) ) {
2009-12-21 16:57:39 +00:00
shuffle_seq ( seqbase , seq , scene ) ; // XXX - BROKEN!, uses context seqbasep
2009-06-10 19:57:06 +00:00
}
2009-12-15 11:27:46 +00:00
sort_seq ( scene ) ;
}
static void rna_Sequence_start_frame_set ( PointerRNA * ptr , int value )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
Scene * scene = ( Scene * ) ptr - > id . data ;
2010-11-04 17:02:32 +00:00
seq_translate ( scene , seq , value - seq - > start ) ;
2009-12-15 11:27:46 +00:00
rna_Sequence_frame_change_update ( scene , seq ) ;
}
static void rna_Sequence_start_frame_final_set ( PointerRNA * ptr , int value )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
Scene * scene = ( Scene * ) ptr - > id . data ;
seq_tx_set_final_left ( seq , value ) ;
seq_single_fix ( seq ) ;
rna_Sequence_frame_change_update ( scene , seq ) ;
}
static void rna_Sequence_end_frame_final_set ( PointerRNA * ptr , int value )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
Scene * scene = ( Scene * ) ptr - > id . data ;
seq_tx_set_final_right ( seq , value ) ;
seq_single_fix ( seq ) ;
rna_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 )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
Scene * scene = ( Scene * ) ptr - > id . data ;
seq - > anim_startofs = MIN2 ( value , seq - > len + seq - > anim_startofs ) ;
2010-10-16 08:03:28 +00:00
reload_sequence_new_file ( scene , seq , FALSE ) ;
2010-04-18 18:30:55 +00:00
rna_Sequence_frame_change_update ( scene , seq ) ;
}
static void rna_Sequence_anim_endofs_final_set ( PointerRNA * ptr , int value )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
Scene * scene = ( Scene * ) ptr - > id . data ;
seq - > anim_endofs = MIN2 ( value , seq - > len + seq - > anim_endofs ) ;
2010-10-16 08:03:28 +00:00
reload_sequence_new_file ( scene , seq , FALSE ) ;
2010-04-18 18:30:55 +00:00
rna_Sequence_frame_change_update ( scene , seq ) ;
}
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
{
Sequence * seq = ( Sequence * ) ptr - > data ;
2009-12-15 11:27:46 +00:00
Scene * scene = ( Scene * ) ptr - > id . data ;
2009-06-10 19:57:06 +00:00
seq_tx_set_final_right ( seq , seq - > start + value ) ;
2009-12-15 11:27:46 +00:00
rna_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
{
Sequence * seq = ( Sequence * ) ptr - > data ;
2009-10-19 10:07:19 +00:00
return seq_tx_get_final_right ( seq , 0 ) - seq_tx_get_final_left ( seq , 0 ) ;
2009-06-10 19:57:06 +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
{
Sequence * seq = ( Sequence * ) ptr - > data ;
2009-12-15 11:27:46 +00:00
Scene * scene = ( Scene * ) ptr - > id . data ;
Editing * ed = seq_give_editing ( scene , FALSE ) ;
2009-12-16 16:35:31 +00:00
ListBase * seqbase = seq_seqbase ( & ed - > seqbase , seq ) ;
2009-06-10 19:57:06 +00:00
seq - > machine = value ;
2009-12-16 16:35:31 +00:00
if ( seq_test_overlap ( seqbase , seq ) ) {
2009-12-21 16:57:39 +00:00
shuffle_seq ( seqbase , seq , scene ) ; // XXX - BROKEN!, uses context seqbasep
2009-06-10 19:57:06 +00:00
}
2009-12-15 11:27:46 +00:00
sort_seq ( scene ) ;
2009-06-10 19:57:06 +00:00
}
2009-06-11 11:54:56 +00:00
/* properties that need to allocate structs */
2009-12-08 12:59:21 +00:00
static void rna_Sequence_use_color_balance_set ( PointerRNA * ptr , int value )
2009-06-10 22:03:50 +00:00
{
Sequence * seq = ( Sequence * ) ptr - > data ;
int c ;
if ( value ) {
seq - > flag | = SEQ_USE_COLOR_BALANCE ;
if ( seq - > strip - > color_balance = = NULL ) {
seq - > strip - > color_balance = MEM_callocN ( sizeof ( struct StripColorBalance ) , " StripColorBalance " ) ;
for ( c = 0 ; c < 3 ; c + + ) {
seq - > strip - > color_balance - > lift [ c ] = 1.0f ;
seq - > strip - > color_balance - > gamma [ c ] = 1.0f ;
seq - > strip - > color_balance - > gain [ c ] = 1.0f ;
}
}
} else {
seq - > flag ^ = SEQ_USE_COLOR_BALANCE ;
}
}
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
{
Sequence * seq = ( Sequence * ) ptr - > data ;
if ( value ) {
seq - > flag | = SEQ_USE_PROXY ;
if ( seq - > strip - > proxy = = NULL ) {
seq - > strip - > proxy = MEM_callocN ( sizeof ( struct StripProxy ) , " StripProxy " ) ;
== 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 - > strip - > proxy - > quality = 90 ;
seq - > strip - > proxy - > build_tc_flags = SEQ_PROXY_TC_ALL ;
seq - > strip - > proxy - > build_size_flags
= SEQ_PROXY_IMAGE_SIZE_25 ;
2009-06-10 22:03:50 +00:00
}
} else {
seq - > flag ^ = SEQ_USE_PROXY ;
}
}
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
{
Sequence * seq = ( Sequence * ) ptr - > data ;
if ( value ) {
seq - > flag | = SEQ_USE_TRANSFORM ;
if ( seq - > strip - > transform = = NULL ) {
seq - > strip - > transform = MEM_callocN ( sizeof ( struct StripTransform ) , " StripTransform " ) ;
}
} else {
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
{
Sequence * seq = ( Sequence * ) ptr - > data ;
if ( value ) {
seq - > flag | = SEQ_USE_CROP ;
if ( seq - > strip - > crop = = NULL ) {
seq - > strip - > crop = MEM_callocN ( sizeof ( struct StripCrop ) , " StripCrop " ) ;
}
} else {
seq - > flag ^ = SEQ_USE_CROP ;
}
}
2010-07-23 17:48:16 +00:00
static int transform_seq_cmp_cb ( Sequence * seq , void * arg_pt )
{
struct { Sequence * seq ; void * transform ; } * data = arg_pt ;
if ( seq - > strip & & seq - > strip - > transform = = data - > transform ) {
data - > seq = seq ;
return - 1 ; /* done so bail out */
}
return 1 ;
}
static char * rna_SequenceTransform_path ( PointerRNA * ptr )
{
Scene * scene = ptr - > id . data ;
Editing * ed = seq_give_editing ( scene , FALSE ) ;
Sequence * seq ;
struct { Sequence * seq ; void * transform ; } data ;
data . seq = NULL ;
data . transform = ptr - > data ;
/* irritating we need to search for our sequence! */
seqbase_recursive_apply ( & ed - > seqbase , transform_seq_cmp_cb , & data ) ;
seq = data . seq ;
if ( seq & & seq - > name + 2 )
return BLI_sprintfN ( " sequence_editor.sequences_all[ \" %s \" ].transform " , seq - > name + 2 ) ;
else
return BLI_strdup ( " " ) ;
}
static int crop_seq_cmp_cb ( Sequence * seq , void * arg_pt )
{
struct { Sequence * seq ; void * crop ; } * data = arg_pt ;
if ( seq - > strip & & seq - > strip - > crop = = data - > crop ) {
data - > seq = seq ;
return - 1 ; /* done so bail out */
}
return 1 ;
}
static char * rna_SequenceCrop_path ( PointerRNA * ptr )
{
Scene * scene = ptr - > id . data ;
Editing * ed = seq_give_editing ( scene , FALSE ) ;
Sequence * seq ;
struct { Sequence * seq ; void * crop ; } data ;
data . seq = NULL ;
data . crop = ptr - > data ;
/* irritating we need to search for our sequence! */
seqbase_recursive_apply ( & ed - > seqbase , crop_seq_cmp_cb , & data ) ;
seq = data . seq ;
if ( seq & & seq - > name + 2 )
return BLI_sprintfN ( " sequence_editor.sequences_all[ \" %s \" ].crop " , seq - > name + 2 ) ;
else
return BLI_strdup ( " " ) ;
}
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 )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
BLI_strncpy ( value , seq - > name + 2 , sizeof ( seq - > name ) - 2 ) ;
}
static int rna_Sequence_name_length ( PointerRNA * ptr )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
return strlen ( seq - > name + 2 ) ;
}
static void rna_Sequence_name_set ( PointerRNA * ptr , const char * value )
{
2009-12-15 11:27:46 +00:00
Scene * scene = ( Scene * ) ptr - > id . data ;
2008-12-15 10:48:04 +00:00
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 */
BLI_strncpy ( oldname , seq - > name + 2 , sizeof ( seq - > name ) - 2 ) ;
/* copy the new name into the name slot */
2011-09-15 12:26:48 +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 */
2010-02-16 17:58:50 +00:00
seqbase_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
/* dont rename everywhere because these are per scene */
/* BKE_all_animdata_fix_paths_rename("sequence_editor.sequences_all", oldname, seq->name+2); */
adt = BKE_animdata_from_id ( & scene - > id ) ;
if ( adt )
BKE_animdata_fix_paths_rename ( & scene - > id , adt , " sequence_editor.sequences_all " , oldname , seq - > name + 2 , 0 , 0 , 1 ) ;
2008-12-15 10:48:04 +00:00
}
static StructRNA * rna_Sequence_refine ( struct PointerRNA * ptr )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
switch ( seq - > type ) {
case SEQ_IMAGE :
return & RNA_ImageSequence ;
case SEQ_META :
return & RNA_MetaSequence ;
case SEQ_SCENE :
return & RNA_SceneSequence ;
case SEQ_MOVIE :
return & RNA_MovieSequence ;
2009-08-09 21:16:39 +00:00
case SEQ_SOUND :
2008-12-15 10:48:04 +00:00
return & RNA_SoundSequence ;
case SEQ_CROSS :
case SEQ_ADD :
case SEQ_SUB :
case SEQ_ALPHAOVER :
case SEQ_ALPHAUNDER :
case SEQ_GAMCROSS :
case SEQ_MUL :
case SEQ_OVERDROP :
return & RNA_EffectSequence ;
2010-07-04 08:49:54 +00:00
case SEQ_MULTICAM :
return & RNA_MulticamSequence ;
2011-05-16 17:14:47 +00:00
case SEQ_ADJUSTMENT :
return & RNA_AdjustmentSequence ;
2008-12-15 10:48:04 +00:00
case SEQ_PLUGIN :
return & RNA_PluginSequence ;
case SEQ_WIPE :
return & RNA_WipeSequence ;
case SEQ_GLOW :
return & RNA_GlowSequence ;
case SEQ_TRANSFORM :
return & RNA_TransformSequence ;
case SEQ_COLOR :
return & RNA_ColorSequence ;
case SEQ_SPEED :
return & RNA_SpeedControlSequence ;
default :
return & RNA_Sequence ;
}
}
2009-09-04 22:50:15 +00:00
static char * rna_Sequence_path ( PointerRNA * ptr )
{
Sequence * seq = ( Sequence * ) ptr - > data ;
/* sequencer data comes from scene...
* TODO : would be nice to make SequenceEditor data a datablock of its own ( for shorter paths )
*/
2009-09-27 09:38:13 +00:00
if ( seq - > name + 2 )
2009-12-09 16:00:53 +00:00
return BLI_sprintfN ( " sequence_editor.sequences_all[ \" %s \" ] " , seq - > name + 2 ) ;
2009-11-19 04:50:00 +00:00
else
return BLI_strdup ( " " ) ;
2009-09-04 22:50:15 +00:00
}
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
{
ListBaseIterator * internal = iter - > internal ;
MetaStack * ms = ( MetaStack * ) internal - > link ;
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
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
char dir [ FILE_MAX ] , name [ FILE_MAX ] ;
2010-06-10 15:41:01 +00:00
if ( seq - > type = = SEQ_SOUND & & seq - > sound ) {
/* 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 ) ;
2011-10-13 22:19:29 +00:00
sound_load ( G . main , seq - > sound ) ;
sound_update_scene_sound ( seq - > scene_sound , seq - > sound ) ;
2010-06-10 15:41:01 +00:00
}
2010-03-08 20:08:04 +00:00
BLI_split_dirfile ( value , dir , name ) ;
2009-09-21 13:23:47 +00:00
BLI_strncpy ( seq - > strip - > dir , dir , sizeof ( seq - > strip - > dir ) ) ;
BLI_strncpy ( seq - > strip - > stripdata - > name , name , sizeof ( seq - > strip - > stripdata - > name ) ) ;
}
2010-02-28 11:17:55 +00:00
static void rna_Sequence_filepath_get ( PointerRNA * ptr , char * value )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
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 )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
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 )
{
StripProxy * proxy = ( StripProxy * ) ( ptr - > data ) ;
char dir [ FILE_MAX ] , name [ FILE_MAX ] ;
BLI_split_dirfile ( value , dir , name ) ;
BLI_strncpy ( proxy - > dir , dir , sizeof ( proxy - > dir ) ) ;
BLI_strncpy ( proxy - > file , name , sizeof ( proxy - > file ) ) ;
}
static void rna_Sequence_proxy_filepath_get ( PointerRNA * ptr , char * value )
{
StripProxy * proxy = ( StripProxy * ) ( ptr - > data ) ;
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 )
{
StripProxy * proxy = ( StripProxy * ) ( ptr - > data ) ;
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 )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
seq - > volume = value ;
if ( seq - > scene_sound )
sound_set_scene_sound_volume ( seq - > scene_sound , value , ( seq - > flag & SEQ_AUDIO_VOLUME_ANIMATED ) ! = 0 ) ;
}
static void rna_Sequence_pitch_set ( PointerRNA * ptr , float value )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
seq - > pitch = value ;
if ( seq - > scene_sound )
sound_set_scene_sound_pitch ( seq - > scene_sound , value , ( seq - > flag & SEQ_AUDIO_PITCH_ANIMATED ) ! = 0 ) ;
}
static void rna_Sequence_pan_set ( PointerRNA * ptr , float value )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
seq - > pan = value ;
if ( seq - > scene_sound )
sound_set_scene_sound_pan ( seq - > scene_sound , value , ( seq - > flag & SEQ_AUDIO_PAN_ANIMATED ) ! = 0 ) ;
}
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 )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
return get_sequence_effect_num_inputs ( seq - > type ) ;
}
2010-03-14 21:25:01 +00:00
/*static void rna_SoundSequence_filename_set(PointerRNA *ptr, const char *value)
2009-09-21 13:23:47 +00:00
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
char dir [ FILE_MAX ] , name [ FILE_MAX ] ;
2010-03-08 20:08:04 +00:00
BLI_split_dirfile ( value , dir , name ) ;
2009-09-21 13:23:47 +00:00
BLI_strncpy ( seq - > strip - > dir , dir , sizeof ( seq - > strip - > dir ) ) ;
BLI_strncpy ( seq - > strip - > stripdata - > name , name , sizeof ( seq - > strip - > stripdata - > name ) ) ;
}
static void rna_SequenceElement_filename_set ( PointerRNA * ptr , const char * value )
{
StripElem * elem = ( StripElem * ) ( ptr - > data ) ;
char name [ FILE_MAX ] ;
2010-03-08 20:08:04 +00:00
BLI_split_dirfile ( value , NULL , name ) ;
2009-09-21 13:23:47 +00:00
BLI_strncpy ( elem - > name , name , sizeof ( elem - > name ) ) ;
2010-03-14 21:25:01 +00:00
} */
2009-09-21 13:23:47 +00:00
2011-05-31 02:14:25 +00:00
static void rna_Sequence_update ( Main * UNUSED ( bmain ) , Scene * scene , PointerRNA * ptr )
2009-12-08 12:59:21 +00:00
{
Editing * ed = seq_give_editing ( scene , FALSE ) ;
2011-09-28 08:56:40 +00:00
if ( ed )
free_imbuf_seq ( scene , & ed - > seqbase , FALSE , TRUE ) ;
2009-12-08 12:59:21 +00:00
}
2011-05-31 02:14:25 +00:00
static void rna_Sequence_update_reopen_files ( Main * UNUSED ( bmain ) , Scene * scene , PointerRNA * ptr )
2010-07-22 08:57:23 +00:00
{
Editing * ed = seq_give_editing ( scene , FALSE ) ;
free_imbuf_seq ( scene , & ed - > seqbase , FALSE , FALSE ) ;
if ( RNA_struct_is_a ( ptr - > type , & RNA_SoundSequence ) )
2011-07-26 13:56:31 +00:00
seq_update_sound_bounds ( scene , ptr - > data ) ;
2010-07-22 08:57:23 +00:00
}
2009-12-08 17:23:48 +00:00
static void rna_Sequence_mute_update ( Main * bmain , Scene * scene , PointerRNA * ptr )
2009-12-08 12:59:21 +00:00
{
2009-12-08 13:57:51 +00:00
Editing * ed = seq_give_editing ( scene , FALSE ) ;
2011-08-07 11:54:58 +00:00
seq_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
}
2010-05-08 16:36:28 +00:00
static void rna_Sequence_filepath_update ( Main * bmain , Scene * scene , PointerRNA * ptr )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
2010-10-16 08:03:28 +00:00
reload_sequence_new_file ( scene , seq , TRUE ) ;
2010-05-08 16:36:28 +00:00
calc_sequence ( scene , seq ) ;
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 )
{
struct { Sequence * seq ; void * seq_proxy ; } * data = arg_pt ;
if ( seq - > strip & & seq - > strip - > proxy = = data - > seq_proxy ) {
data - > seq = seq ;
return - 1 ; /* done so bail out */
}
return 1 ;
}
static void rna_Sequence_tcindex_update ( Main * bmain , Scene * scene , PointerRNA * ptr )
{
Editing * ed = seq_give_editing ( scene , FALSE ) ;
Sequence * seq ;
struct { Sequence * seq ; void * seq_proxy ; } data ;
data . seq = NULL ;
data . seq_proxy = ptr - > data ;
seqbase_recursive_apply ( & ed - > seqbase , seqproxy_seq_cmp_cb , & data ) ;
seq = data . seq ;
reload_sequence_new_file ( scene , seq , FALSE ) ;
rna_Sequence_frame_change_update ( 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 )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
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 )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
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 )
{
struct { Sequence * seq ; void * color_balance ; } * data = arg_pt ;
if ( seq - > strip & & seq - > strip - > color_balance = = data - > color_balance ) {
data - > seq = seq ;
return - 1 ; /* done so bail out */
}
return 1 ;
}
static char * rna_SequenceColorBalance_path ( PointerRNA * ptr )
{
Scene * scene = ptr - > id . data ;
Editing * ed = seq_give_editing ( scene , FALSE ) ;
Sequence * seq ;
struct { Sequence * seq ; void * color_balance ; } data ;
data . seq = NULL ;
data . color_balance = ptr - > data ;
/* irritating we need to search for our sequence! */
seqbase_recursive_apply ( & ed - > seqbase , colbalance_seq_cmp_cb , & data ) ;
seq = data . seq ;
if ( seq & & seq - > name + 2 )
return BLI_sprintfN ( " sequence_editor.sequences_all[ \" %s \" ].color_balance " , seq - > name + 2 ) ;
else
return BLI_strdup ( " " ) ;
}
2010-07-08 10:03:29 +00:00
static void rna_SequenceEditor_overlay_lock_set ( PointerRNA * ptr , int value )
{
Scene * scene = ptr - > id . data ;
Editing * ed = seq_give_editing ( scene , FALSE ) ;
if ( ed = = NULL )
return ;
/* convert from abs to relative and back */
if ( ( ed - > over_flag & SEQ_EDIT_OVERLAY_ABS ) = = 0 & & value ) {
ed - > over_cfra = scene - > r . cfra + ed - > over_ofs ;
ed - > over_flag | = SEQ_EDIT_OVERLAY_ABS ;
}
else if ( ( ed - > over_flag & SEQ_EDIT_OVERLAY_ABS ) & & ! value ) {
ed - > over_ofs = ed - > over_cfra - scene - > r . cfra ;
ed - > over_flag & = ~ SEQ_EDIT_OVERLAY_ABS ;
}
}
static int rna_SequenceEditor_overlay_frame_get ( PointerRNA * ptr )
{
Scene * scene = ( Scene * ) ptr - > id . data ;
Editing * ed = seq_give_editing ( scene , FALSE ) ;
if ( ed = = NULL )
return scene - > r . cfra ;
if ( ed - > over_flag & SEQ_EDIT_OVERLAY_ABS )
return ed - > over_cfra - scene - > r . cfra ;
else
return ed - > over_ofs ;
}
static void rna_SequenceEditor_overlay_frame_set ( PointerRNA * ptr , int value )
{
Scene * scene = ( Scene * ) ptr - > id . data ;
Editing * ed = seq_give_editing ( scene , FALSE ) ;
if ( ed = = NULL )
return ;
if ( ed - > over_flag & SEQ_EDIT_OVERLAY_ABS )
ed - > over_cfra = ( scene - > r . cfra + value ) ;
else
ed - > over_ofs = value ;
}
2011-06-09 08:58:27 +00:00
static void rna_WipeSequence_angle_set ( PointerRNA * ptr , float value )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
value = RAD2DEGF ( value ) ;
CLAMP ( value , - 90.0f , 90.0f ) ;
( ( WipeVars * ) seq - > effectdata ) - > angle = value ;
}
static float rna_WipeSequence_angle_get ( PointerRNA * ptr )
{
Sequence * seq = ( Sequence * ) ( ptr - > data ) ;
return DEG2RADF ( ( ( WipeVars * ) seq - > effectdata ) - > angle ) ;
}
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 " ) ;
2010-02-28 11:17:55 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-11-28 18:23:21 +00:00
prop = RNA_def_property ( srna , " orig_width " , PROP_INT , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " orig_height " , PROP_INT , PROP_NONE ) ;
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 " ) ;
2010-08-21 04:51:00 +00:00
prop = RNA_def_property ( srna , " max_y " , PROP_INT , PROP_UNSIGNED ) ;
RNA_def_property_int_sdna ( prop , NULL , " top " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_text ( prop , " Top " , " " ) ;
RNA_def_property_ui_range ( prop , 0 , 4096 , 1 , 0 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-10-06 10:00:15 +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 " , " " ) ;
RNA_def_property_ui_range ( prop , 0 , 4096 , 1 , 0 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-10-06 10:00:15 +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 " , " " ) ;
RNA_def_property_ui_range ( prop , 0 , 4096 , 1 , 0 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-21 04:51:00 +00:00
prop = RNA_def_property ( srna , " max_x " , PROP_INT , PROP_UNSIGNED ) ;
RNA_def_property_int_sdna ( prop , NULL , " right " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_text ( prop , " Right " , " " ) ;
RNA_def_property_ui_range ( prop , 0 , 4096 , 1 , 0 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_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 " ) ;
prop = RNA_def_property ( srna , " offset_x " , PROP_INT , PROP_NONE ) ;
RNA_def_property_int_sdna ( prop , NULL , " xofs " ) ;
2010-03-21 14:46:43 +00:00
RNA_def_property_ui_text ( prop , " Offset X " , " " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_range ( prop , - 4096 , 4096 , 1 , 0 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " offset_y " , PROP_INT , PROP_NONE ) ;
RNA_def_property_int_sdna ( prop , NULL , " yofs " ) ;
RNA_def_property_ui_text ( prop , " Offset Y " , " " ) ;
RNA_def_property_ui_range ( prop , - 4096 , 4096 , 1 , 0 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_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
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 " } ,
== 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
{ 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 " ) ;
prop = RNA_def_property ( srna , " directory " , PROP_STRING , PROP_DIRPATH ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-06-09 05:39:01 +00:00
2010-04-11 19:26:46 +00:00
prop = RNA_def_property ( srna , " filepath " , PROP_STRING , PROP_FILEPATH ) ;
RNA_def_property_ui_text ( prop , " Path " , " Location of custom proxy file " ) ;
RNA_def_property_string_funcs ( prop , " rna_Sequence_proxy_filepath_get " , " rna_Sequence_proxy_filepath_length " , " rna_Sequence_proxy_filepath_set " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_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
prop = RNA_def_property ( srna , " build_25 " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " build_50 " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " build_75 " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " build_100 " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " build_record_run " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " build_free_run " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " build_free_run_rec_date " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
prop = RNA_def_property ( srna , " quality " , PROP_INT , PROP_UNSIGNED ) ;
RNA_def_property_int_sdna ( prop , NULL , " quality " ) ;
RNA_def_property_ui_text ( prop , " Quality " , " JPEG Quality of proxies to build " ) ;
RNA_def_property_ui_range ( prop , 1 , 100 , 1 , 0 ) ;
prop = RNA_def_property ( srna , " timecode " , PROP_ENUM , PROP_NONE ) ;
RNA_def_property_enum_sdna ( prop , NULL , " tc " ) ;
RNA_def_property_enum_items ( prop , seq_tc_items ) ;
RNA_def_property_ui_text ( prop , " Timecode " , " " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_tcindex_update " ) ;
2008-12-15 10:48:04 +00:00
}
static void rna_def_strip_color_balance ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " SequenceColorBalance " , NULL ) ;
2010-02-10 21:15:44 +00:00
RNA_def_struct_ui_text ( srna , " Sequence Color Balance " , " Color balance parameters for a sequence strip " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_struct_sdna ( srna , " StripColorBalance " ) ;
prop = RNA_def_property ( srna , " lift " , PROP_FLOAT , PROP_COLOR ) ;
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 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " gamma " , PROP_FLOAT , PROP_COLOR ) ;
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 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " gain " , PROP_FLOAT , PROP_COLOR ) ;
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 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-07-06 16:44:05 +00:00
RNA_def_struct_path_func ( srna , " rna_SequenceColorBalance_path " ) ;
2008-12-15 10:48:04 +00:00
/* not yet used
prop = RNA_def_property ( srna , " exposure " , PROP_FLOAT , PROP_NONE ) ;
RNA_def_property_range ( prop , 0.0f , 1.0f ) ;
RNA_def_property_ui_text ( prop , " Exposure " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " saturation " , PROP_FLOAT , PROP_NONE ) ;
RNA_def_property_range ( prop , 0.0f , 1.0f ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_ui_text ( prop , " Saturation " , " " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ; */
2008-12-15 10:48:04 +00:00
}
static void rna_def_sequence ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
static const EnumPropertyItem seq_type_items [ ] = {
2009-06-16 00:52:21 +00:00
{ SEQ_IMAGE , " IMAGE " , 0 , " Image " , " " } ,
{ SEQ_META , " META " , 0 , " Meta " , " " } ,
{ SEQ_SCENE , " SCENE " , 0 , " Scene " , " " } ,
{ SEQ_MOVIE , " MOVIE " , 0 , " Movie " , " " } ,
2009-08-27 19:10:53 +00:00
{ SEQ_SOUND , " SOUND " , 0 , " Sound " , " " } ,
2009-06-16 00:52:21 +00:00
{ SEQ_CROSS , " CROSS " , 0 , " Cross " , " " } ,
{ SEQ_ADD , " ADD " , 0 , " Add " , " " } ,
{ SEQ_SUB , " SUBTRACT " , 0 , " Subtract " , " " } ,
{ SEQ_ALPHAOVER , " ALPHA_OVER " , 0 , " Alpha Over " , " " } ,
{ SEQ_ALPHAUNDER , " ALPHA_UNDER " , 0 , " Alpha Under " , " " } ,
{ SEQ_GAMCROSS , " GAMMA_CROSS " , 0 , " Gamma Cross " , " " } ,
{ SEQ_MUL , " MULTIPLY " , 0 , " Multiply " , " " } ,
{ SEQ_OVERDROP , " OVER_DROP " , 0 , " Over Drop " , " " } ,
{ SEQ_PLUGIN , " PLUGIN " , 0 , " plugin " , " " } ,
{ SEQ_WIPE , " WIPE " , 0 , " Wipe " , " " } ,
{ SEQ_GLOW , " GLOW " , 0 , " Glow " , " " } ,
{ SEQ_TRANSFORM , " TRANSFORM " , 0 , " Transform " , " " } ,
{ SEQ_COLOR , " COLOR " , 0 , " Color " , " " } ,
{ SEQ_SPEED , " SPEED " , 0 , " Speed " , " " } ,
== 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
{ SEQ_MULTICAM , " MULTICAM " , 0 , " Multicam Selector " , " " } ,
2011-05-16 17:14:47 +00:00
{ SEQ_ADJUSTMENT , " ADJUSTMENT " , 0 , " Adjustment Layer " , " " } ,
2009-06-16 00:52:21 +00:00
{ 0 , NULL , 0 , NULL , NULL } } ;
2008-12-15 10:48:04 +00:00
static const EnumPropertyItem blend_mode_items [ ] = {
2009-06-16 00:52:21 +00:00
{ SEQ_BLEND_REPLACE , " REPLACE " , 0 , " Replace " , " " } ,
{ SEQ_CROSS , " CROSS " , 0 , " Cross " , " " } ,
{ SEQ_ADD , " ADD " , 0 , " Add " , " " } ,
{ SEQ_SUB , " SUBTRACT " , 0 , " Subtract " , " " } ,
{ SEQ_ALPHAOVER , " ALPHA_OVER " , 0 , " Alpha Over " , " " } ,
{ SEQ_ALPHAUNDER , " ALPHA_UNDER " , 0 , " Alpha Under " , " " } ,
{ SEQ_GAMCROSS , " GAMMA_CROSS " , 0 , " Gamma Cross " , " " } ,
{ SEQ_MUL , " MULTIPLY " , 0 , " Multiply " , " " } ,
{ SEQ_OVERDROP , " OVER_DROP " , 0 , " Over Drop " , " " } ,
{ 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 " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " name " , PROP_STRING , PROP_NONE ) ;
RNA_def_property_string_funcs ( prop , " rna_Sequence_name_get " , " rna_Sequence_name_length " , " rna_Sequence_name_set " ) ;
RNA_def_property_string_maxlength ( prop , sizeof ( ( ( Sequence * ) NULL ) - > name ) - 2 ) ;
RNA_def_property_ui_text ( prop , " Name " , " " ) ;
RNA_def_struct_name_property ( srna , prop ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , NULL ) ;
2008-12-15 10:48:04 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2009-02-02 11:51:10 +00:00
//prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
2010-05-04 05:15:53 +00:00
//RNA_def_property_ui_text(prop, "IPO Curves", "IPO curves used by this sequence");
2008-12-15 10:48:04 +00:00
/* flags */
2010-07-15 16:56:04 +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 " , " " ) ;
2010-06-18 04:39:32 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER | NA_SELECTED , NULL ) ;
2008-12-15 10:48:04 +00:00
2010-07-15 16:56:04 +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 " , " " ) ;
2010-06-18 04:39:32 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER | NA_SELECTED , NULL ) ;
2008-12-15 10:48:04 +00:00
2010-07-15 16:56:04 +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 " , " " ) ;
2010-06-18 04:39:32 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER | NA_SELECTED , NULL ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " mute " , PROP_BOOLEAN , PROP_NONE ) ;
RNA_def_property_boolean_sdna ( prop , NULL , " flag " , SEQ_MUTE ) ;
RNA_def_property_ui_text ( prop , " Mute " , " " ) ;
2009-12-08 13:57:51 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_mute_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " lock " , PROP_BOOLEAN , PROP_NONE ) ;
RNA_def_property_boolean_sdna ( prop , NULL , " flag " , SEQ_LOCK ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Lock " , " Lock strip so that it can't be transformed " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , NULL ) ;
2008-12-15 10:48:04 +00:00
2011-08-09 14:10:32 +00:00
prop = RNA_def_property ( srna , " waveform " , PROP_BOOLEAN , PROP_NONE ) ;
RNA_def_property_boolean_sdna ( prop , NULL , " flag " , SEQ_AUDIO_DRAW_WAVEFORM ) ;
2011-09-19 13:23:58 +00:00
RNA_def_property_ui_text ( prop , " Draw Waveform " , " Whether to draw the sound's waveform " ) ;
2011-08-09 14:10:32 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , NULL ) ;
2008-12-15 10:48:04 +00:00
/* strip positioning */
2010-08-20 06:09:58 +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 ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_text ( prop , " Length " , " The length of the contents of this strip before the handles are applied " ) ;
2010-06-22 13:45:21 +00:00
RNA_def_property_int_funcs ( prop , " rna_Sequence_frame_length_get " , " rna_Sequence_frame_length_set " , NULL ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-06-22 13:45:21 +00:00
2010-08-18 08:26:18 +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 " ) ;
RNA_def_property_clear_flag ( prop , PROP_EDITABLE | PROP_ANIMATABLE ) ;
RNA_def_property_range ( prop , 1 , MAXFRAME ) ;
RNA_def_property_ui_text ( prop , " Length " , " The length of the contents of this strip before the handles are applied " ) ;
2009-08-18 12:10:12 +00:00
2010-04-01 21:44:56 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_int_funcs ( prop , NULL , " rna_Sequence_start_frame_set " , NULL ) ; // overlap tests and calc_seq_disp
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-04-01 21:44:56 +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 ) ;
2010-05-04 05:15:53 +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 " ) ;
2009-12-15 11:27:46 +00:00
RNA_def_property_int_funcs ( prop , NULL , " rna_Sequence_start_frame_final_set " , NULL ) ; // overlap tests and calc_seq_disp
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-04-01 21:44:56 +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 ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " End Frame " , " End frame displayed in the sequence editor after offsets are applied " ) ;
2009-12-15 11:27:46 +00:00
RNA_def_property_int_funcs ( prop , NULL , " rna_Sequence_end_frame_final_set " , NULL ) ; // overlap tests and calc_seq_disp
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-04-01 21:44:56 +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 " ) ;
2009-03-23 13:24:48 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-04-01 21:44:56 +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 " ) ;
2009-03-23 13:24:48 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-04-01 21:44:56 +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 " ) ;
2009-03-23 13:24:48 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-04-01 21:44:56 +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 " ) ;
2009-03-23 13:24:48 +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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " channel " , PROP_INT , PROP_UNSIGNED ) ;
RNA_def_property_int_sdna ( prop , NULL , " machine " ) ;
2009-09-22 09:12:39 +00:00
RNA_def_property_range ( prop , 0 , MAXSEQ - 1 ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Channel " , " Y position of the sequence strip " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_int_funcs ( prop , NULL , " rna_Sequence_channel_set " , NULL ) ; // overlap test
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
/* blending */
2010-08-20 06:09:58 +00:00
prop = RNA_def_property ( srna , " blend_type " , PROP_ENUM , PROP_NONE ) ;
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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " , " " ) ;
2009-12-21 16:57:39 +00:00
RNA_def_property_float_funcs ( prop , " rna_Sequence_opacity_get " , " rna_Sequence_opacity_set " , NULL ) ; // stupid 0-100 -> 0-1
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-06-10 06:02:08 +00:00
2009-11-22 20:22:35 +00:00
prop = RNA_def_property ( srna , " effect_fader " , PROP_FLOAT , PROP_NONE ) ;
RNA_def_property_range ( prop , 0.0f , 1.0f ) ;
RNA_def_property_float_sdna ( prop , NULL , " effect_fader " ) ;
RNA_def_property_ui_text ( prop , " Effect fader position " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-11-14 14:58:19 +00:00
2010-08-20 06:09:58 +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 ) ;
2010-05-04 05:15:53 +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) " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-11-29 18:14:16 +00:00
2010-09-29 13:38:43 +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 " ) ;
2010-09-29 13:38:43 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-11-14 14:58:19 +00:00
2010-10-30 12:04:00 +00:00
/* effect strip inputs */
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 ) ;
prop = RNA_def_property ( srna , " input_1 " , PROP_POINTER , PROP_NONE ) ;
RNA_def_property_pointer_sdna ( prop , NULL , " seq1 " ) ;
RNA_def_property_ui_text ( prop , " Input 1 " , " First input for the effect strip " ) ;
prop = RNA_def_property ( srna , " input_2 " , PROP_POINTER , PROP_NONE ) ;
RNA_def_property_pointer_sdna ( prop , NULL , " seq2 " ) ;
RNA_def_property_ui_text ( prop , " Input 2 " , " Second input for the effect strip " ) ;
prop = RNA_def_property ( srna , " input_3 " , PROP_POINTER , PROP_NONE ) ;
RNA_def_property_pointer_sdna ( prop , NULL , " seq1 " ) ;
RNA_def_property_ui_text ( prop , " Input 3 " , " Third input for the effect strip " ) ;
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 ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " SequenceEditor " , NULL ) ;
2010-02-10 21:15:44 +00:00
RNA_def_struct_ui_text ( srna , " Sequence Editor " , " Sequence editing data for a Scene datablock " ) ;
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 " ) ;
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 " , " " ) ;
2009-12-09 16:00:53 +00:00
prop = RNA_def_property ( srna , " sequences_all " , 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 " , " " ) ;
2011-10-01 15:40:32 +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
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " meta_stack " , PROP_COLLECTION , PROP_NONE ) ;
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 " ) ;
2011-10-01 15:40:32 +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
prop = RNA_def_property ( srna , " active_strip " , PROP_POINTER , PROP_NONE ) ;
RNA_def_property_pointer_sdna ( prop , NULL , " act_seq " ) ;
2010-05-02 17:36:38 +00:00
RNA_def_property_flag ( prop , PROP_EDITABLE ) ;
2010-07-08 10:03:29 +00:00
prop = RNA_def_property ( srna , " show_overlay " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
2010-07-08 10:03:29 +00:00
RNA_def_property_update ( prop , NC_SPACE | ND_SPACE_SEQUENCER , NULL ) ;
prop = RNA_def_property ( srna , " overlay_lock " , PROP_BOOLEAN , PROP_NONE ) ;
RNA_def_property_boolean_sdna ( prop , NULL , " over_flag " , SEQ_EDIT_OVERLAY_ABS ) ;
RNA_def_property_ui_text ( prop , " Overlay Lock " , " " ) ;
RNA_def_property_boolean_funcs ( prop , NULL , " rna_SequenceEditor_overlay_lock_set " ) ;
RNA_def_property_update ( prop , NC_SPACE | ND_SPACE_SEQUENCER , NULL ) ;
/* access to fixed and relative frame */
prop = RNA_def_property ( srna , " overlay_frame " , PROP_INT , PROP_NONE ) ;
RNA_def_property_ui_text ( prop , " Overlay Offset " , " " ) ;
RNA_def_property_int_funcs ( prop , " rna_SequenceEditor_overlay_frame_get " , " rna_SequenceEditor_overlay_frame_set " , NULL ) ;
RNA_def_property_update ( prop , NC_SPACE | ND_SPACE_SEQUENCER , NULL ) ;
2009-06-06 11:34:18 +00:00
RNA_def_property_ui_text ( prop , " Active Strip " , " Sequencers active strip " ) ;
2008-12-15 10:48:04 +00:00
}
static void rna_def_filter_video ( StructRNA * srna )
{
PropertyRNA * prop ;
2010-08-20 06:09:58 +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 " ) ;
2010-07-22 08:57:23 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update_reopen_files " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +00:00
prop = RNA_def_property ( srna , " use_premultiply " , PROP_BOOLEAN , PROP_NONE ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_boolean_sdna ( prop , NULL , " flag " , SEQ_MAKE_PREMUL ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Premultiply " , " Convert RGB from key alpha to premultiplied alpha " ) ;
2009-07-08 17:41:45 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , NULL ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 ) ;
RNA_def_property_ui_text ( prop , " Multiply Colors " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-07-13 09:28:01 +00:00
prop = RNA_def_property ( srna , " color_saturation " , PROP_FLOAT , PROP_UNSIGNED ) ;
RNA_def_property_float_sdna ( prop , NULL , " sat " ) ;
RNA_def_property_range ( prop , 0.0f , 20.0f ) ;
RNA_def_property_ui_range ( prop , 0.0f , 2.0f , 3 , 3 ) ;
RNA_def_property_ui_text ( prop , " Saturation " , " " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " strobe " , PROP_FLOAT , PROP_NONE ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " use_color_balance " , PROP_BOOLEAN , PROP_NONE ) ;
RNA_def_property_boolean_sdna ( prop , NULL , " flag " , SEQ_USE_COLOR_BALANCE ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Use Color Balance " , " (3-Way color correction) on input " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_boolean_funcs ( prop , NULL , " rna_Sequence_use_color_balance_set " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " color_balance " , PROP_POINTER , PROP_NONE ) ;
RNA_def_property_pointer_sdna ( prop , NULL , " strip->color_balance " ) ;
RNA_def_property_ui_text ( prop , " Color Balance " , " " ) ;
prop = RNA_def_property ( srna , " use_translation " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-11-29 18:14:16 +00:00
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " transform " , PROP_POINTER , PROP_NONE ) ;
RNA_def_property_pointer_sdna ( prop , NULL , " strip->transform " ) ;
RNA_def_property_ui_text ( prop , " Transform " , " " ) ;
prop = RNA_def_property ( srna , " use_crop " , PROP_BOOLEAN , PROP_NONE ) ;
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 " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " crop " , PROP_POINTER , PROP_NONE ) ;
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 ;
prop = RNA_def_property ( srna , " use_proxy " , PROP_BOOLEAN , PROP_NONE ) ;
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
prop = RNA_def_property ( srna , " proxy " , PROP_POINTER , PROP_NONE ) ;
RNA_def_property_pointer_sdna ( prop , NULL , " strip->proxy " ) ;
RNA_def_property_ui_text ( prop , " Proxy " , " " ) ;
2010-08-20 06:09:58 +00:00
prop = RNA_def_property ( srna , " use_proxy_custom_directory " , PROP_BOOLEAN , PROP_NONE ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_boolean_sdna ( prop , NULL , " flag " , SEQ_USE_PROXY_CUSTOM_DIR ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Proxy Custom Directory " , " Use a custom directory to store data " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-04-11 19:26:46 +00:00
2010-08-20 06:09:58 +00:00
prop = RNA_def_property ( srna , " use_proxy_custom_file " , PROP_BOOLEAN , PROP_NONE ) ;
2010-04-11 19:26:46 +00:00
RNA_def_property_boolean_sdna ( prop , NULL , " flag " , SEQ_USE_PROXY_CUSTOM_FILE ) ;
RNA_def_property_ui_text ( prop , " Proxy Custom File " , " Use a custom file to read proxy data from " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
}
static void rna_def_input ( StructRNA * srna )
{
PropertyRNA * prop ;
2010-08-20 06:09:58 +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 ) ;
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) " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 ) ;
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) " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
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 " ) ;
prop = RNA_def_property ( srna , " directory " , PROP_STRING , PROP_DIRPATH ) ;
RNA_def_property_string_sdna ( prop , NULL , " strip->dir " ) ;
RNA_def_property_ui_text ( prop , " Directory " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +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 " , " " ) ;
2011-10-01 15:40:32 +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 ) ;
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_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 " ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-03-09 13:52:52 +00:00
prop = RNA_def_property ( srna , " scene_camera " , PROP_POINTER , PROP_NONE ) ;
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 " ) ;
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 " ) ;
prop = RNA_def_property ( srna , " mpeg_preseek " , PROP_INT , PROP_NONE ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2011-09-25 02:49:46 +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 ) ;
RNA_def_property_ui_text ( prop , " Streamindex " , " For files with several movie streams, use the stream with the given index " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update_reopen_files " ) ;
2010-11-28 18:23:21 +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 " , " " ) ;
2011-10-01 15:40:32 +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
2010-02-28 11:17:55 +00:00
prop = RNA_def_property ( srna , " filepath " , PROP_STRING , PROP_FILEPATH ) ;
RNA_def_property_ui_text ( prop , " File " , " " ) ;
RNA_def_property_string_funcs ( prop , " rna_Sequence_filepath_get " , " rna_Sequence_filepath_length " ,
" rna_Sequence_filepath_set " ) ;
2010-05-08 16:36:28 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_filepath_update " ) ;
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_sound ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " SoundSequence " , " Sequence " ) ;
2010-02-10 21:15:44 +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 " ) ;
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 " ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Sound " , " Sound datablock used by this sequence " ) ;
2009-12-08 13:57:51 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-02-07 23:41:17 +00:00
prop = RNA_def_property ( srna , " volume " , PROP_FLOAT , PROP_NONE ) ;
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 " ) ;
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 ) ;
2010-02-07 23:41:17 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
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
prop = RNA_def_property ( srna , " pitch " , PROP_FLOAT , PROP_NONE ) ;
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 " ) ;
RNA_def_property_float_funcs ( prop , NULL , " rna_Sequence_pitch_set " , NULL ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-05-30 21:17:59 +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
prop = RNA_def_property ( srna , " pan " , PROP_FLOAT , PROP_NONE ) ;
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 ) ;
2010-05-30 21:17:59 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2010-02-28 11:17:55 +00:00
prop = RNA_def_property ( srna , " filepath " , PROP_STRING , PROP_FILEPATH ) ;
RNA_def_property_ui_text ( prop , " File " , " " ) ;
RNA_def_property_string_funcs ( prop , " rna_Sequence_filepath_get " , " rna_Sequence_filepath_length " ,
" rna_Sequence_filepath_set " ) ;
2010-07-18 14:46:52 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_filepath_update " ) ;
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 " ) ;
2010-02-10 21:15:44 +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 ) ;
}
== 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
static void rna_def_multicam ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
srna = RNA_def_struct ( brna , " MulticamSequence " , " Sequence " ) ;
RNA_def_struct_ui_text ( srna , " Multicam Select Sequence " , " Sequence strip to perform multicam editing: select channel from below " ) ;
RNA_def_struct_sdna ( srna , " Sequence " ) ;
prop = RNA_def_property ( srna , " multicam_source " , PROP_INT , PROP_UNSIGNED ) ;
RNA_def_property_int_sdna ( prop , NULL , " multicam_source " ) ;
RNA_def_property_range ( prop , 0 , MAXSEQ - 1 ) ;
RNA_def_property_ui_text ( prop , " Multicam Source Channel " , " " ) ;
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
rna_def_filter_video ( srna ) ;
rna_def_proxy ( srna ) ;
rna_def_input ( srna ) ;
}
2011-05-16 17:14:47 +00:00
static void rna_def_adjustment ( BlenderRNA * brna )
{
StructRNA * srna ;
2011-05-16 18:04:19 +00:00
// PropertyRNA *prop;
2011-05-16 17:14:47 +00:00
srna = RNA_def_struct ( brna , " AdjustmentSequence " , " Sequence " ) ;
RNA_def_struct_ui_text ( srna , " Adjustment Layer Sequence " , " Sequence strip to perform filter adjustments to layers below " ) ;
RNA_def_struct_sdna ( srna , " Sequence " ) ;
rna_def_filter_video ( srna ) ;
rna_def_proxy ( srna ) ;
rna_def_input ( srna ) ;
}
2008-12-15 10:48:04 +00:00
static void rna_def_plugin ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " PluginSequence " , " EffectSequence " ) ;
2010-02-10 21:15:44 +00:00
RNA_def_struct_ui_text ( srna , " Plugin Sequence " , " Sequence strip applying an effect, loaded from an external plugin " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_struct_sdna_from ( srna , " PluginSeq " , " plugin " ) ;
2010-08-28 12:34:22 +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 " ) ;
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_ui_text ( prop , " Filename " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
/* plugin properties need custom wrapping code like ID properties */
}
static void rna_def_wipe ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
static const EnumPropertyItem wipe_type_items [ ] = {
2009-06-16 00:52:21 +00:00
{ 0 , " SINGLE " , 0 , " Single " , " " } ,
{ 1 , " DOUBLE " , 0 , " Double " , " " } ,
/* not used yet {2, "BOX", 0, "Box", ""}, */
/* not used yet {3, "CROSS", 0, "Cross", ""}, */
{ 4 , " IRIS " , 0 , " Iris " , " " } ,
{ 5 , " CLOCK " , 0 , " Clock " , " " } ,
{ 0 , NULL , 0 , NULL , NULL }
2008-12-15 10:48:04 +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
} ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " WipeSequence " , " EffectSequence " ) ;
2010-02-10 21:15:44 +00:00
RNA_def_struct_ui_text ( srna , " Wipe Sequence " , " Sequence strip creating a wipe transition " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_struct_sdna_from ( srna , " WipeVars " , " effectdata " ) ;
prop = RNA_def_property ( srna , " blur_width " , PROP_FLOAT , PROP_UNSIGNED ) ;
RNA_def_property_float_sdna ( prop , NULL , " edgeWidth " ) ;
RNA_def_property_range ( prop , 0.0f , 1.0f ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Blur Width " , " Width of the blur edge, in percentage relative to the image size " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2011-06-09 08:58:27 +00:00
# if 1 /* expose as radians */
prop = RNA_def_property ( srna , " angle " , PROP_FLOAT , PROP_ANGLE ) ;
RNA_def_property_float_funcs ( prop , " rna_WipeSequence_angle_get " , " rna_WipeSequence_angle_set " , NULL ) ;
2011-08-19 16:21:29 +00:00
RNA_def_property_range ( prop , DEG2RAD ( - 90.0 ) , DEG2RAD ( 90.0 ) ) ;
2011-06-09 08:58:27 +00:00
# else
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " angle " , PROP_FLOAT , PROP_NONE ) ;
RNA_def_property_float_sdna ( prop , NULL , " angle " ) ;
RNA_def_property_range ( prop , - 90.0f , 90.0f ) ;
2011-06-09 08:58:27 +00:00
# endif
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Angle " , " Edge angle " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " direction " , PROP_ENUM , PROP_NONE ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " transition_type " , PROP_ENUM , PROP_NONE ) ;
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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
}
static void rna_def_glow ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " GlowSequence " , " EffectSequence " ) ;
2010-02-10 21:15:44 +00:00
RNA_def_struct_ui_text ( srna , " Glow Sequence " , " Sequence strip creating a glow effect " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_struct_sdna_from ( srna , " GlowVars " , " effectdata " ) ;
prop = RNA_def_property ( srna , " threshold " , PROP_FLOAT , PROP_NONE ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " clamp " , PROP_FLOAT , PROP_NONE ) ;
RNA_def_property_float_sdna ( prop , NULL , " fClamp " ) ;
RNA_def_property_range ( prop , 0.0f , 1.0f ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Clamp " , " rightness limit of intensity " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " boost_factor " , PROP_FLOAT , PROP_NONE ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " quality " , PROP_INT , PROP_NONE ) ;
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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
}
static void rna_def_transform ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
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
} ;
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
} ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " TransformSequence " , " EffectSequence " ) ;
2010-02-10 21:15:44 +00:00
RNA_def_struct_ui_text ( srna , " Transform Sequence " , " Sequence strip applying affine transformations to other strips " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_struct_sdna_from ( srna , " TransformVars " , " effectdata " ) ;
prop = RNA_def_property ( srna , " scale_start_x " , PROP_FLOAT , PROP_UNSIGNED ) ;
RNA_def_property_float_sdna ( prop , NULL , " ScalexIni " ) ;
2009-12-11 22:51:53 +00:00
RNA_def_property_ui_text ( prop , " Scale X " , " " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_range ( prop , 0 , 10 , 3 , 10 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " scale_start_y " , PROP_FLOAT , PROP_UNSIGNED ) ;
RNA_def_property_float_sdna ( prop , NULL , " ScaleyIni " ) ;
2009-12-11 22:51:53 +00:00
RNA_def_property_ui_text ( prop , " Scale Y " , " " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_range ( prop , 0 , 10 , 3 , 10 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-08-18 12:10:12 +00:00
2010-08-20 06:09:58 +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 " ) ;
2009-12-09 20:03:08 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " translate_start_x " , PROP_FLOAT , PROP_NONE ) ;
RNA_def_property_float_sdna ( prop , NULL , " xIni " ) ;
2009-12-11 22:51:53 +00:00
RNA_def_property_ui_text ( prop , " Translate X " , " " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_range ( prop , - 500.0f , 500.0f , 3 , 10 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2009-08-18 12:10:12 +00:00
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " translate_start_y " , PROP_FLOAT , PROP_NONE ) ;
RNA_def_property_float_sdna ( prop , NULL , " yIni " ) ;
2009-12-11 22:51:53 +00:00
RNA_def_property_ui_text ( prop , " Translate Y " , " " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_range ( prop , - 500.0f , 500.0f , 3 , 10 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " rotation_start " , PROP_FLOAT , PROP_NONE ) ;
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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " translation_unit " , PROP_ENUM , PROP_NONE ) ;
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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
prop = RNA_def_property ( srna , " interpolation " , PROP_ENUM , PROP_NONE ) ;
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 " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
}
static void rna_def_solid_color ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
2009-12-10 14:47:07 +00:00
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " ColorSequence " , " EffectSequence " ) ;
2010-07-06 16:44:05 +00:00
RNA_def_struct_ui_text ( srna , " Color Sequence " , " Sequence strip creating an image filled with a single g " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_struct_sdna_from ( srna , " SolidColorVars " , " effectdata " ) ;
prop = RNA_def_property ( srna , " color " , PROP_FLOAT , PROP_COLOR ) ;
RNA_def_property_float_sdna ( prop , NULL , " col " ) ;
RNA_def_property_ui_text ( prop , " Color " , " " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
}
static void rna_def_speed_control ( BlenderRNA * brna )
{
StructRNA * srna ;
PropertyRNA * prop ;
2008-12-19 04:06:24 +00:00
srna = RNA_def_struct ( brna , " SpeedControlSequence " , " EffectSequence " ) ;
2010-02-10 21:15:44 +00:00
RNA_def_struct_ui_text ( srna , " SpeedControl Sequence " , " Sequence strip to control the speed of other strips " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_struct_sdna_from ( srna , " SpeedControlVars " , " effectdata " ) ;
2010-09-29 13:38:43 +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 " ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_ui_range ( prop , 0.0f , 100.0f , 1 , 0 ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-09-29 13:38:43 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-08-20 06:09:58 +00:00
prop = RNA_def_property ( srna , " use_frame_blend " , PROP_BOOLEAN , PROP_NONE ) ;
2008-12-15 10:48:04 +00:00
RNA_def_property_boolean_sdna ( prop , NULL , " flags " , SEQ_SPEED_BLEND ) ;
2010-02-10 21:15:44 +00:00
RNA_def_property_ui_text ( prop , " Frame Blending " , " Blend two frames into the target for a smoother result " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
2010-09-29 13:38:43 +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 " ) ;
2009-12-08 12:59:21 +00:00
RNA_def_property_update ( prop , NC_SCENE | ND_SEQUENCER , " rna_Sequence_update " ) ;
2008-12-15 10:48:04 +00:00
}
2009-12-13 15:48:57 +00:00
void RNA_def_sequencer ( BlenderRNA * 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 ) ;
rna_def_sound ( brna ) ;
rna_def_effect ( brna ) ;
== 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_multicam ( brna ) ;
2011-05-16 17:14:47 +00:00
rna_def_adjustment ( brna ) ;
2008-12-15 10:48:04 +00:00
rna_def_plugin ( brna ) ;
rna_def_wipe ( brna ) ;
rna_def_glow ( brna ) ;
rna_def_transform ( brna ) ;
rna_def_solid_color ( brna ) ;
rna_def_speed_control ( brna ) ;
}
# endif