[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46504] trunk/blender: minor changes to sequencer api

Campbell Barton ideasman42 at gmail.com
Thu May 10 17:32:01 CEST 2012


Revision: 46504
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46504
Author:   campbellbarton
Date:     2012-05-10 15:32:01 +0000 (Thu, 10 May 2012)
Log Message:
-----------
minor changes to sequencer api
- rename seqelements.push(file) --> filename
- rename SoundSequence.waveform --> show_waveform
- dont pass context to sequencer functions. editing any scenes sequence can be done, irrespective of context.

Modified Paths:
--------------
    trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
    trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
    trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c

Modified: trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-05-10 15:28:35 UTC (rev 46503)
+++ trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2012-05-10 15:32:01 UTC (rev 46504)
@@ -654,7 +654,7 @@
 
         row.prop(sound, "use_memory_cache")
 
-        layout.prop(strip, "waveform")
+        layout.prop(strip, "show_waveform")
         layout.prop(strip, "volume")
         layout.prop(strip, "pitch")
         layout.prop(strip, "pan")

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2012-05-10 15:28:35 UTC (rev 46503)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer.c	2012-05-10 15:32:01 UTC (rev 46504)
@@ -1561,7 +1561,7 @@
 	                              "rna_Sequence_filepath_set");
 	RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_filepath_update");
 
-	prop = RNA_def_property(srna, "waveform", PROP_BOOLEAN, PROP_NONE);
+	prop = RNA_def_property(srna, "show_waveform", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_AUDIO_DRAW_WAVEFORM);
 	RNA_def_property_ui_text(prop, "Draw Waveform", "Whether to draw the sound's waveform");
 	RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, NULL);

Modified: trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c	2012-05-10 15:28:35 UTC (rev 46503)
+++ trunk/blender/source/blender/makesrna/intern/rna_sequencer_api.c	2012-05-10 15:32:01 UTC (rev 46504)
@@ -106,7 +106,7 @@
 	return scene;
 }
 
-static Sequence *rna_Sequences_new_clip(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
+static Sequence *rna_Sequences_new_clip(Editing *ed, Main *bmain, ReportList *reports,
                                         const char *name, MovieClip *clip, int channel,
                                         int start_frame)
 {
@@ -120,12 +120,12 @@
 
 	calc_sequence_disp(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 
 	return seq;
 }
 
-static Sequence *rna_Sequences_new_scene(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
+static Sequence *rna_Sequences_new_scene(Editing *ed, Main *bmain, ReportList *reports,
                                          const char *name, Scene *sce_seq, int channel,
                                          int start_frame)
 {
@@ -141,12 +141,12 @@
 
 	calc_sequence_disp(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 
 	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, ReportList *reports,
                                          const char *name, const char *file, int channel,
                                          int start_frame)
 {
@@ -166,12 +166,12 @@
 
 	calc_sequence_disp(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 
 	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, ReportList *reports,
                                          const char *name, const char *file, int channel,
                                          int start_frame)
 {
@@ -194,13 +194,13 @@
 
 	calc_sequence_disp(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 
 	return seq;
 }
 
 #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, ReportList *reports,
                                          const char *name, const char *file, int channel, int start_frame)
 {
 	Sequence *seq;
@@ -221,12 +221,12 @@
 
 	calc_sequence_disp(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 
 	return seq;
 }
 #else /* 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, ReportList *reports,
                                          const char *name, bSound *sound, int channel, int start_frame)
 {
 	(void)ed;
@@ -241,7 +241,7 @@
 }
 #endif /* WITH_AUDASPACE */
 
-static Sequence *rna_Sequences_new_effect(Editing *ed, Main *bmain, bContext *C, ReportList *reports,
+static Sequence *rna_Sequences_new_effect(Editing *ed, Main *bmain, ReportList *reports,
                                           const char *name, int type, int channel,
                                           int start_frame, int end_frame,
                                           Sequence *seq1, Sequence *seq2, Sequence *seq3)
@@ -304,12 +304,12 @@
 
 	calc_sequence(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 
 	return seq;
 }
 
-static void rna_Sequences_remove(Editing *ed, Main *bmain, bContext *C, Sequence *seq)
+static void rna_Sequences_remove(Editing *ed, Main *bmain, Sequence *seq)
 {
 	Scene *scene;
 
@@ -320,10 +320,10 @@
 	BLI_remlink(&ed->seqbase, seq);
 	seq_free_sequence(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(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, const char *filename)
 {
 	Sequence *seqn;
 	Scene *scene;
@@ -346,12 +346,12 @@
 
 	calc_sequence_disp(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 
 	return se;
 }
 
-static void rna_SequenceElements_pop(Sequence *seq, Main *bmain, bContext *C, ReportList *reports)
+static void rna_SequenceElements_pop(Sequence *seq, Main *bmain, ReportList *reports)
 {
 	Sequence *seqn;
 	Scene *scene;
@@ -377,7 +377,7 @@
 
 	calc_sequence_disp(scene, seq);
 
-	WM_event_add_notifier(C, NC_SCENE | ND_SEQUENCER, scene);
+	WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
 }
 
 
@@ -414,16 +414,16 @@
 	RNA_def_struct_ui_text(srna, "SequenceElements", "Collection of SequenceElement");
 
 	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);
 	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, "filename", "File", 0, "", "Filepath to image");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
 	/* return type */
 	parm = RNA_def_pointer(func, "elem", "SequenceElement", "", "New SequenceElement");
 	RNA_def_function_return(func, parm);
 
 	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);
 	RNA_def_function_ui_description(func, "Pop an image off the collection");
 }
 
@@ -459,7 +459,7 @@
 	RNA_def_struct_ui_text(srna, "Sequences", "Collection of Sequences");
 
 	func = RNA_def_function(srna, "new_clip", "rna_Sequences_new_clip");
-	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);
 	RNA_def_function_ui_description(func, "Add a new movie clip sequence");
 	parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -476,7 +476,7 @@
 	RNA_def_function_return(func, parm);
 
 	func = RNA_def_function(srna, "new_scene", "rna_Sequences_new_scene");
-	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);
 	RNA_def_function_ui_description(func, "Add a new scene sequence");
 	parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -493,7 +493,7 @@
 	RNA_def_function_return(func, parm);
 
 	func = RNA_def_function(srna, "new_image", "rna_Sequences_new_image");
-	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);
 	RNA_def_function_ui_description(func, "Add a new image sequence");
 	parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -510,7 +510,7 @@
 	RNA_def_function_return(func, parm);
 
 	func = RNA_def_function(srna, "new_movie", "rna_Sequences_new_movie");
-	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);
 	RNA_def_function_ui_description(func, "Add a new movie sequence");
 	parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -527,7 +527,7 @@
 	RNA_def_function_return(func, parm);
 
 	func = RNA_def_function(srna, "new_sound", "rna_Sequences_new_sound");
-	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);
 	RNA_def_function_ui_description(func, "Add a new movie clip sequence");
 	parm = RNA_def_string(func, "name", "Name", 0, "", "New name for the sequence");
 	RNA_def_property_flag(parm, PROP_REQUIRED);
@@ -544,7 +544,7 @@
 	RNA_def_function_return(func, parm);
 
 	func = RNA_def_function(srna, "new_effect", "rna_Sequences_new_effect");

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list