Index: sceneSequence.c =================================================================== --- sceneSequence.c (revision 16603) +++ sceneSequence.c (working copy) @@ -33,14 +33,14 @@ #include "DNA_scene_types.h" /* for Base */ #include "BKE_mesh.h" -#include "BKE_image.h" // RFS: openanim +#include "BKE_image.h" /* openanim */ #include "BKE_library.h" #include "BKE_global.h" #include "BKE_main.h" #include "BKE_scene.h" #include "BIF_editseq.h" /* get_last_seq */ -#include "BIF_editsound.h" // RFS: sound_open_hdaudio +#include "BIF_editsound.h" /* sound_open_hdaudio */ #include "BLI_blenlib.h" #include "BSE_sequence.h" #include "Ipo.h" @@ -50,8 +50,8 @@ #include "Sound.h" #include "gen_utils.h" -#include "IMB_imbuf_types.h" // RFS: IB_rect -#include "IMB_imbuf.h" // RFS: IMB_anim_get_duration +#include "IMB_imbuf_types.h" /* IB_rect */ +#include "IMB_imbuf.h" /* IMB_anim_get_duration */ enum seq_consts { EXPP_SEQ_ATTR_TYPE = 0, @@ -205,9 +205,6 @@ "movie/audio hd data needs to be a tuple of a string and a list of images - (filename, dir, fullpath, type)" ); } - // RFS - Attempting to support Movie and Audio (HD) strips -#define RFS -#ifdef RFS // Movie strips if( strcmp( type, "movie" ) == 0 ) { @@ -279,7 +276,6 @@ /* name movie in first strip */ strncpy(se->name, filename, FILE_MAXFILE-1); // ???? } -#endif } else if (BPy_Sound_Check(py_data)) { /* RAM sound */ @@ -319,7 +315,12 @@ strip->len= seq->len; strip->us= 1; } else { - // RFS: REMOVED MOVIE FROM HERE + /* Unknown strip */ + BLI_remlink(seqbase, seq); + MEM_freeN(seq); + + return EXPP_ReturnPyObjError( PyExc_ValueError, + "unrecognized strip type" ); } strncpy(seq->name+2, "Untitled", 21); intern_pos_update(seq); @@ -584,6 +585,10 @@ return Sequence_CreatePyObject(seq, NULL, self->scene); } +static PyObject *SceneSeq_getCurrentFrame( BPy_SceneSeq * self ) +{ + return PyInt_FromLong( CFRA ); +} /* * this should accept a Py_None argument and just delete the Ipo link @@ -755,7 +760,7 @@ return EXPP_ReturnIntError( PyExc_TypeError, "expected an int value" ); if ( !seq_can_blend(seq) ) - return EXPP_ReturnIntError( PyExc_AttributeError, "this sequence type dosnt support blending" ); + return EXPP_ReturnIntError( PyExc_AttributeError, "this sequence type does not support blending" ); if (numberSEQ_EFFECT_MAX) return EXPP_ReturnIntError( PyExc_TypeError, "expected an int value" ); @@ -1086,6 +1091,10 @@ (getter)SceneSeq_getMetaStrip, (setter)NULL, "The currently active metastrip the user is editing", NULL}, + {"currentframe", + (getter)SceneSeq_getCurrentFrame, (setter)NULL, /* add SceneSeq_setCurrentFrame? */ + "The current frame", + NULL}, {NULL,NULL,NULL,NULL,NULL} /* Sentinel */ };