forked from bartvdbraak/blender
style cleanup: sequencer and scene rna
This commit is contained in:
parent
efde4dbba8
commit
ffe7d668ff
@ -41,8 +41,7 @@ struct ListBase;
|
|||||||
struct Main;
|
struct Main;
|
||||||
struct Sequence;
|
struct Sequence;
|
||||||
|
|
||||||
typedef struct SoundWaveform
|
typedef struct SoundWaveform {
|
||||||
{
|
|
||||||
int length;
|
int length;
|
||||||
float *data;
|
float *data;
|
||||||
} SoundWaveform;
|
} SoundWaveform;
|
||||||
@ -58,29 +57,29 @@ void sound_exit(void);
|
|||||||
void sound_force_device(int device);
|
void sound_force_device(int device);
|
||||||
int sound_define_from_str(const char *str);
|
int sound_define_from_str(const char *str);
|
||||||
|
|
||||||
struct bSound* sound_new_file(struct Main *main, const char *filename);
|
struct bSound *sound_new_file(struct Main *main, const char *filename);
|
||||||
|
|
||||||
// XXX unused currently
|
// XXX unused currently
|
||||||
#if 0
|
#if 0
|
||||||
struct bSound* sound_new_buffer(struct Main *bmain, struct bSound *source);
|
struct bSound *sound_new_buffer(struct Main *bmain, struct bSound *source);
|
||||||
|
|
||||||
struct bSound* sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end);
|
struct bSound *sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void sound_delete(struct Main *bmain, struct bSound* sound);
|
void sound_delete(struct Main *bmain, struct bSound *sound);
|
||||||
|
|
||||||
void sound_cache(struct bSound* sound);
|
void sound_cache(struct bSound *sound);
|
||||||
|
|
||||||
void sound_cache_notifying(struct Main* main, struct bSound* sound);
|
void sound_cache_notifying(struct Main *main, struct bSound *sound);
|
||||||
|
|
||||||
void sound_delete_cache(struct bSound* sound);
|
void sound_delete_cache(struct bSound *sound);
|
||||||
|
|
||||||
void sound_load(struct Main *main, struct bSound* sound);
|
void sound_load(struct Main *main, struct bSound *sound);
|
||||||
|
|
||||||
void BKE_sound_free(struct bSound* sound);
|
void BKE_sound_free(struct bSound *sound);
|
||||||
|
|
||||||
#ifdef __AUD_C_API_H__
|
#ifdef __AUD_C_API_H__
|
||||||
AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume);
|
AUD_Device *sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void sound_create_scene(struct Scene *scene);
|
void sound_create_scene(struct Scene *scene);
|
||||||
@ -93,32 +92,32 @@ void sound_update_fps(struct Scene *scene);
|
|||||||
|
|
||||||
void sound_update_scene_listener(struct Scene *scene);
|
void sound_update_scene_listener(struct Scene *scene);
|
||||||
|
|
||||||
void* sound_scene_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int startframe, int endframe, int frameskip);
|
void *sound_scene_add_scene_sound(struct Scene *scene, struct Sequence *sequence, int startframe, int endframe, int frameskip);
|
||||||
void* sound_scene_add_scene_sound_defaults(struct Scene *scene, struct Sequence* sequence);
|
void *sound_scene_add_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence);
|
||||||
|
|
||||||
void* sound_add_scene_sound(struct Scene *scene, struct Sequence* sequence, int startframe, int endframe, int frameskip);
|
void *sound_add_scene_sound(struct Scene *scene, struct Sequence *sequence, int startframe, int endframe, int frameskip);
|
||||||
void* sound_add_scene_sound_defaults(struct Scene *scene, struct Sequence* sequence);
|
void *sound_add_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence);
|
||||||
|
|
||||||
void sound_remove_scene_sound(struct Scene *scene, void* handle);
|
void sound_remove_scene_sound(struct Scene *scene, void *handle);
|
||||||
|
|
||||||
void sound_mute_scene_sound(void* handle, char mute);
|
void sound_mute_scene_sound(void *handle, char mute);
|
||||||
|
|
||||||
void sound_move_scene_sound(struct Scene *scene, void* handle, int startframe, int endframe, int frameskip);
|
void sound_move_scene_sound(struct Scene *scene, void *handle, int startframe, int endframe, int frameskip);
|
||||||
void sound_move_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence);
|
void sound_move_scene_sound_defaults(struct Scene *scene, struct Sequence *sequence);
|
||||||
|
|
||||||
void sound_update_scene_sound(void* handle, struct bSound* sound);
|
void sound_update_scene_sound(void *handle, struct bSound *sound);
|
||||||
|
|
||||||
void sound_set_cfra(int cfra);
|
void sound_set_cfra(int cfra);
|
||||||
|
|
||||||
void sound_set_scene_volume(struct Scene *scene, float volume);
|
void sound_set_scene_volume(struct Scene *scene, float volume);
|
||||||
|
|
||||||
void sound_set_scene_sound_volume(void* handle, float volume, char animated);
|
void sound_set_scene_sound_volume(void *handle, float volume, char animated);
|
||||||
|
|
||||||
void sound_set_scene_sound_pitch(void* handle, float pitch, char animated);
|
void sound_set_scene_sound_pitch(void *handle, float pitch, char animated);
|
||||||
|
|
||||||
void sound_set_scene_sound_pan(void* handle, float pan, char animated);
|
void sound_set_scene_sound_pan(void *handle, float pan, char animated);
|
||||||
|
|
||||||
void sound_update_sequencer(struct Main* main, struct bSound* sound);
|
void sound_update_sequencer(struct Main *main, struct bSound *sound);
|
||||||
|
|
||||||
void sound_play_scene(struct Scene *scene);
|
void sound_play_scene(struct Scene *scene);
|
||||||
|
|
||||||
@ -130,13 +129,13 @@ float sound_sync_scene(struct Scene *scene);
|
|||||||
|
|
||||||
int sound_scene_playing(struct Scene *scene);
|
int sound_scene_playing(struct Scene *scene);
|
||||||
|
|
||||||
void sound_free_waveform(struct bSound* sound);
|
void sound_free_waveform(struct bSound *sound);
|
||||||
|
|
||||||
void sound_read_waveform(struct bSound* sound);
|
void sound_read_waveform(struct bSound *sound);
|
||||||
|
|
||||||
void sound_update_scene(struct Scene* scene);
|
void sound_update_scene(struct Scene *scene);
|
||||||
|
|
||||||
void *sound_get_factory(void* sound);
|
void *sound_get_factory(void *sound);
|
||||||
|
|
||||||
float sound_get_length(struct bSound *sound);
|
float sound_get_length(struct bSound *sound);
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ static const int NAN_INT = 0x7FC00000;
|
|||||||
static int sound_cfra;
|
static int sound_cfra;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct bSound *sound_new_file(struct Main *bmain, const char *filename)
|
bSound *sound_new_file(struct Main *bmain, const char *filename)
|
||||||
{
|
{
|
||||||
bSound *sound = NULL;
|
bSound *sound = NULL;
|
||||||
|
|
||||||
@ -103,7 +103,7 @@ struct bSound *sound_new_file(struct Main *bmain, const char *filename)
|
|||||||
return sound;
|
return sound;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BKE_sound_free(struct bSound *sound)
|
void BKE_sound_free(bSound *sound)
|
||||||
{
|
{
|
||||||
if (sound->packedfile) {
|
if (sound->packedfile) {
|
||||||
freePackedFile(sound->packedfile);
|
freePackedFile(sound->packedfile);
|
||||||
@ -223,7 +223,7 @@ void sound_exit(void)
|
|||||||
|
|
||||||
// XXX unused currently
|
// XXX unused currently
|
||||||
#if 0
|
#if 0
|
||||||
struct bSound *sound_new_buffer(struct Main *bmain, struct bSound *source)
|
bSound *sound_new_buffer(struct Main *bmain, bSound *source)
|
||||||
{
|
{
|
||||||
bSound *sound = NULL;
|
bSound *sound = NULL;
|
||||||
|
|
||||||
@ -247,7 +247,7 @@ struct bSound *sound_new_buffer(struct Main *bmain, struct bSound *source)
|
|||||||
return sound;
|
return sound;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bSound *sound_new_limiter(struct Main *bmain, struct bSound *source, float start, float end)
|
bSound *sound_new_limiter(struct Main *bmain, bSound *source, float start, float end)
|
||||||
{
|
{
|
||||||
bSound *sound = NULL;
|
bSound *sound = NULL;
|
||||||
|
|
||||||
@ -274,7 +274,7 @@ struct bSound *sound_new_limiter(struct Main *bmain, struct bSound *source, floa
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void sound_delete(struct Main *bmain, struct bSound *sound)
|
void sound_delete(struct Main *bmain, bSound *sound)
|
||||||
{
|
{
|
||||||
if (sound) {
|
if (sound) {
|
||||||
BKE_sound_free(sound);
|
BKE_sound_free(sound);
|
||||||
@ -283,7 +283,7 @@ void sound_delete(struct Main *bmain, struct bSound *sound)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_cache(struct bSound *sound)
|
void sound_cache(bSound *sound)
|
||||||
{
|
{
|
||||||
sound->flags |= SOUND_FLAGS_CACHING;
|
sound->flags |= SOUND_FLAGS_CACHING;
|
||||||
if (sound->cache)
|
if (sound->cache)
|
||||||
@ -296,13 +296,13 @@ void sound_cache(struct bSound *sound)
|
|||||||
sound->playback_handle = sound->handle;
|
sound->playback_handle = sound->handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_cache_notifying(struct Main *main, struct bSound *sound)
|
void sound_cache_notifying(struct Main *main, bSound *sound)
|
||||||
{
|
{
|
||||||
sound_cache(sound);
|
sound_cache(sound);
|
||||||
sound_update_sequencer(main, sound);
|
sound_update_sequencer(main, sound);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_delete_cache(struct bSound *sound)
|
void sound_delete_cache(bSound *sound)
|
||||||
{
|
{
|
||||||
sound->flags &= ~SOUND_FLAGS_CACHING;
|
sound->flags &= ~SOUND_FLAGS_CACHING;
|
||||||
if (sound->cache) {
|
if (sound->cache) {
|
||||||
@ -312,7 +312,7 @@ void sound_delete_cache(struct bSound *sound)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_load(struct Main *bmain, struct bSound *sound)
|
void sound_load(struct Main *bmain, bSound *sound)
|
||||||
{
|
{
|
||||||
if (sound) {
|
if (sound) {
|
||||||
if (sound->cache) {
|
if (sound->cache) {
|
||||||
@ -363,7 +363,7 @@ void sound_load(struct Main *bmain, struct bSound *sound)
|
|||||||
if (sound->child_sound && sound->child_sound->handle)
|
if (sound->child_sound && sound->child_sound->handle)
|
||||||
sound->handle = AUD_limitSound(sound->child_sound, sound->start, sound->end);
|
sound->handle = AUD_limitSound(sound->child_sound, sound->start, sound->end);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (sound->flags & SOUND_FLAGS_MONO) {
|
if (sound->flags & SOUND_FLAGS_MONO) {
|
||||||
void *handle = AUD_monoSound(sound->handle);
|
void *handle = AUD_monoSound(sound->handle);
|
||||||
@ -488,7 +488,7 @@ void sound_move_scene_sound_defaults(struct Scene *scene, struct Sequence *seque
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_update_scene_sound(void *handle, struct bSound *sound)
|
void sound_update_scene_sound(void *handle, bSound *sound)
|
||||||
{
|
{
|
||||||
AUD_updateSequenceSound(handle, sound->playback_handle);
|
AUD_updateSequenceSound(handle, sound->playback_handle);
|
||||||
}
|
}
|
||||||
@ -518,7 +518,7 @@ void sound_set_scene_sound_pan(void *handle, float pan, char animated)
|
|||||||
AUD_setSequenceAnimData(handle, AUD_AP_PANNING, sound_cfra, &pan, animated);
|
AUD_setSequenceAnimData(handle, AUD_AP_PANNING, sound_cfra, &pan, animated);
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_update_sequencer(struct Main *main, struct bSound *sound)
|
void sound_update_sequencer(struct Main *main, bSound *sound)
|
||||||
{
|
{
|
||||||
struct Scene *scene;
|
struct Scene *scene;
|
||||||
|
|
||||||
@ -649,7 +649,7 @@ int sound_scene_playing(struct Scene *scene)
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_free_waveform(struct bSound *sound)
|
void sound_free_waveform(bSound *sound)
|
||||||
{
|
{
|
||||||
if (sound->waveform) {
|
if (sound->waveform) {
|
||||||
MEM_freeN(((SoundWaveform *)sound->waveform)->data);
|
MEM_freeN(((SoundWaveform *)sound->waveform)->data);
|
||||||
@ -659,7 +659,7 @@ void sound_free_waveform(struct bSound *sound)
|
|||||||
sound->waveform = NULL;
|
sound->waveform = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void sound_read_waveform(struct bSound *sound)
|
void sound_read_waveform(bSound *sound)
|
||||||
{
|
{
|
||||||
AUD_SoundInfo info;
|
AUD_SoundInfo info;
|
||||||
|
|
||||||
@ -753,11 +753,11 @@ void sound_update_scene(struct Scene *scene)
|
|||||||
|
|
||||||
void *sound_get_factory(void *sound)
|
void *sound_get_factory(void *sound)
|
||||||
{
|
{
|
||||||
return ((struct bSound *) sound)->playback_handle;
|
return ((bSound *) sound)->playback_handle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* stupid wrapper because AUD_C-API.h includes Python.h which makesrna doesn't like */
|
/* stupid wrapper because AUD_C-API.h includes Python.h which makesrna doesn't like */
|
||||||
float sound_get_length(struct bSound* sound)
|
float sound_get_length(bSound *sound)
|
||||||
{
|
{
|
||||||
AUD_SoundInfo info = AUD_getInfo(sound->playback_handle);
|
AUD_SoundInfo info = AUD_getInfo(sound->playback_handle);
|
||||||
|
|
||||||
|
@ -204,7 +204,7 @@ void rna_PropertyGroup_unregister(struct Main *bmain, struct StructRNA *type);
|
|||||||
struct StructRNA *rna_PropertyGroup_register(struct Main *bmain, struct ReportList *reports, void *data,
|
struct StructRNA *rna_PropertyGroup_register(struct Main *bmain, struct ReportList *reports, void *data,
|
||||||
const char *identifier, StructValidateFunc validate,
|
const char *identifier, StructValidateFunc validate,
|
||||||
StructCallbackFunc call, StructFreeFunc free);
|
StructCallbackFunc call, StructFreeFunc free);
|
||||||
struct StructRNA* rna_PropertyGroup_refine(struct PointerRNA *ptr);
|
struct StructRNA *rna_PropertyGroup_refine(struct PointerRNA *ptr);
|
||||||
|
|
||||||
void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index);
|
void rna_object_vgroup_name_index_get(struct PointerRNA *ptr, char *value, int index);
|
||||||
int rna_object_vgroup_name_index_length(struct PointerRNA *ptr, int index);
|
int rna_object_vgroup_name_index_length(struct PointerRNA *ptr, int index);
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -120,7 +120,7 @@ static Sequence *rna_Sequences_new_clip(Editing *ed, Main *bmain, bContext *C, R
|
|||||||
|
|
||||||
calc_sequence_disp(scene, seq);
|
calc_sequence_disp(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
@ -141,13 +141,13 @@ static Sequence *rna_Sequences_new_scene(Editing *ed, Main *bmain, bContext *C,
|
|||||||
|
|
||||||
calc_sequence_disp(scene, seq);
|
calc_sequence_disp(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sequence *rna_Sequences_new_image(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
|
static Sequence *rna_Sequences_new_image(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
|
||||||
const char *name, const char* file, int channel,
|
const char *name, const char *file, int channel,
|
||||||
int start_frame)
|
int start_frame)
|
||||||
{
|
{
|
||||||
Sequence *seq;
|
Sequence *seq;
|
||||||
@ -166,13 +166,13 @@ static Sequence *rna_Sequences_new_image(Editing *ed, Main *bmain, bContext *C,
|
|||||||
|
|
||||||
calc_sequence_disp(scene, seq);
|
calc_sequence_disp(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Sequence *rna_Sequences_new_movie(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
|
static Sequence *rna_Sequences_new_movie(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
|
||||||
const char *name, const char* file, int channel,
|
const char *name, const char *file, int channel,
|
||||||
int start_frame)
|
int start_frame)
|
||||||
{
|
{
|
||||||
Sequence *seq;
|
Sequence *seq;
|
||||||
@ -194,14 +194,14 @@ static Sequence *rna_Sequences_new_movie(Editing *ed, Main *bmain, bContext *C,
|
|||||||
|
|
||||||
calc_sequence_disp(scene, seq);
|
calc_sequence_disp(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WITH_AUDASPACE
|
#ifdef WITH_AUDASPACE
|
||||||
static Sequence *rna_Sequences_new_sound(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
|
static Sequence *rna_Sequences_new_sound(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
|
||||||
const char *name, const char* file, int channel, int start_frame)
|
const char *name, const char *file, int channel, int start_frame)
|
||||||
{
|
{
|
||||||
Sequence *seq;
|
Sequence *seq;
|
||||||
|
|
||||||
@ -221,7 +221,7 @@ static Sequence *rna_Sequences_new_sound(Editing *ed, Main *bmain, bContext *C,
|
|||||||
|
|
||||||
calc_sequence_disp(scene, seq);
|
calc_sequence_disp(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
@ -304,7 +304,7 @@ static Sequence *rna_Sequences_new_effect(Editing *ed, Main *bmain, bContext *C,
|
|||||||
|
|
||||||
calc_sequence(scene, seq);
|
calc_sequence(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
|
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
@ -320,10 +320,10 @@ static void rna_Sequences_remove(Editing *ed, Main *bmain, bContext *C, Sequence
|
|||||||
BLI_remlink(&ed->seqbase, seq);
|
BLI_remlink(&ed->seqbase, seq);
|
||||||
seq_free_sequence(scene, seq);
|
seq_free_sequence(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
static StripElem *rna_SequenceElements_push(Sequence *seq, Main *bmain, bContext *C, const char* filename)
|
static StripElem *rna_SequenceElements_push(Sequence *seq, Main *bmain, bContext *C, const char *filename)
|
||||||
{
|
{
|
||||||
Sequence *seqn;
|
Sequence *seqn;
|
||||||
Scene *scene;
|
Scene *scene;
|
||||||
@ -339,14 +339,14 @@ static StripElem *rna_SequenceElements_push(Sequence *seq, Main *bmain, bContext
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
seq->strip->stripdata = se = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem)*(seq->len+1));
|
seq->strip->stripdata = se = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem) * (seq->len + 1));
|
||||||
se += seq->len;
|
se += seq->len;
|
||||||
BLI_strncpy(se->name, filename, sizeof(se->name));
|
BLI_strncpy(se->name, filename, sizeof(se->name));
|
||||||
seq->len++;
|
seq->len++;
|
||||||
|
|
||||||
calc_sequence_disp(scene, seq);
|
calc_sequence_disp(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
|
|
||||||
return se;
|
return se;
|
||||||
}
|
}
|
||||||
@ -372,12 +372,12 @@ static void rna_SequenceElements_pop(Sequence *seq, Main *bmain, bContext *C, Re
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* just chop off the end ...what could possibly go wrong? */
|
/* just chop off the end ...what could possibly go wrong? */
|
||||||
seq->strip->stripdata = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem)*(seq->len-1));
|
seq->strip->stripdata = MEM_reallocN(seq->strip->stripdata, sizeof(StripElem) * (seq->len - 1));
|
||||||
seq->len--;
|
seq->len--;
|
||||||
|
|
||||||
calc_sequence_disp(scene, seq);
|
calc_sequence_disp(scene, seq);
|
||||||
|
|
||||||
WM_event_add_notifier(C, NC_SCENE|ND_SEQUENCER, scene);
|
WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -399,7 +399,7 @@ void RNA_api_sequence_strip(StructRNA *srna)
|
|||||||
func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
|
func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
|
||||||
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
RNA_def_function_flag(func, FUNC_USE_REPORTS);
|
||||||
parm = RNA_def_pointer(func, "other", "Sequence", "Other", "");
|
parm = RNA_def_pointer(func, "other", "Sequence", "Other", "");
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
|
void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
|
||||||
@ -414,7 +414,7 @@ void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
|
|||||||
RNA_def_struct_ui_text(srna, "SequenceElements", "Collection of SequenceElement");
|
RNA_def_struct_ui_text(srna, "SequenceElements", "Collection of SequenceElement");
|
||||||
|
|
||||||
func = RNA_def_function(srna, "push", "rna_SequenceElements_push");
|
func = RNA_def_function(srna, "push", "rna_SequenceElements_push");
|
||||||
RNA_def_function_flag(func, FUNC_USE_MAIN|FUNC_USE_CONTEXT);
|
RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_CONTEXT);
|
||||||
RNA_def_function_ui_description(func, "Push an image from ImageSequence.directory");
|
RNA_def_function_ui_description(func, "Push an image from ImageSequence.directory");
|
||||||
parm = RNA_def_string(func, "file", "File", 0, "", "Filepath to image");
|
parm = RNA_def_string(func, "file", "File", 0, "", "Filepath to image");
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||||
@ -423,7 +423,7 @@ void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
|
|||||||
RNA_def_function_return(func, parm);
|
RNA_def_function_return(func, parm);
|
||||||
|
|
||||||
func = RNA_def_function(srna, "pop", "rna_SequenceElements_pop");
|
func = RNA_def_function(srna, "pop", "rna_SequenceElements_pop");
|
||||||
RNA_def_function_flag(func, FUNC_USE_REPORTS|FUNC_USE_MAIN|FUNC_USE_CONTEXT);
|
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_MAIN | FUNC_USE_CONTEXT);
|
||||||
RNA_def_function_ui_description(func, "Pop an image off the collection");
|
RNA_def_function_ui_description(func, "Pop an image off the collection");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
|
|||||||
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
|
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||||
parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to add");
|
parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to add");
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
|
||||||
parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
|
parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
|
||||||
"The channel for the new sequence", 0, MAXSEQ - 1);
|
"The channel for the new sequence", 0, MAXSEQ - 1);
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||||
@ -481,7 +481,7 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
|
|||||||
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
|
parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||||
parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to add");
|
parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to add");
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
|
||||||
parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
|
parm = RNA_def_int(func, "channel", 0, 0, MAXSEQ - 1, "Channel",
|
||||||
"The channel for the new sequence", 0, MAXSEQ - 1);
|
"The channel for the new sequence", 0, MAXSEQ - 1);
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED);
|
RNA_def_property_flag(parm, PROP_REQUIRED);
|
||||||
@ -568,10 +568,10 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
|
|||||||
|
|
||||||
|
|
||||||
func = RNA_def_function(srna, "remove", "rna_Sequences_remove");
|
func = RNA_def_function(srna, "remove", "rna_Sequences_remove");
|
||||||
RNA_def_function_flag(func, FUNC_USE_MAIN|FUNC_USE_CONTEXT);
|
RNA_def_function_flag(func, FUNC_USE_MAIN | FUNC_USE_CONTEXT);
|
||||||
RNA_def_function_ui_description(func, "Remove a Sequence");
|
RNA_def_function_ui_description(func, "Remove a Sequence");
|
||||||
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "Sequence to remove");
|
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "Sequence to remove");
|
||||||
RNA_def_property_flag(parm, PROP_REQUIRED|PROP_NEVER_NULL);
|
RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user