[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [22837] branches/blender2.5/blender: First try in sound UI for the sequencer.

Joerg Mueller nexyon at gmail.com
Fri Aug 28 14:27:29 CEST 2009


Revision: 22837
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=22837
Author:   nexyon
Date:     2009-08-28 14:27:29 +0200 (Fri, 28 Aug 2009)

Log Message:
-----------
First try in sound UI for the sequencer.

Modified Paths:
--------------
    branches/blender2.5/blender/release/ui/space_sequencer.py
    branches/blender2.5/blender/source/blender/editors/sound/sound_intern.h
    branches/blender2.5/blender/source/blender/editors/sound/sound_ops.c
    branches/blender2.5/blender/source/blender/editors/space_api/spacetypes.c
    branches/blender2.5/blender/source/blender/editors/space_image/image_ops.c

Added Paths:
-----------
    branches/blender2.5/blender/source/blender/editors/include/ED_sound.h

Modified: branches/blender2.5/blender/release/ui/space_sequencer.py
===================================================================
--- branches/blender2.5/blender/release/ui/space_sequencer.py	2009-08-28 11:13:45 UTC (rev 22836)
+++ branches/blender2.5/blender/release/ui/space_sequencer.py	2009-08-28 12:27:29 UTC (rev 22837)
@@ -455,6 +455,29 @@
 		col.itemR(strip, "animation_start_offset", text="Start")
 		col.itemR(strip, "animation_end_offset", text="End")
 
+class SEQUENCER_PT_sound(SequencerButtonsPanel):
+	__label__ = "Sound"
+	
+	def poll(self, context):
+		if context.space_data.display_mode != 'SEQUENCER':
+			return False
+		
+		strip = act_strip(context)
+		if not strip:
+			return False
+		
+		return strip.type in ('SOUND')
+	
+	def draw(self, context):
+		layout = self.layout
+		
+		strip = act_strip(context)
+		
+		layout.template_ID(strip, "sound", new="sound.open")
+		
+		layout.itemR(strip.sound, "filename")
+		layout.itemR(strip.sound, "caching")
+
 class SEQUENCER_PT_filter(SequencerButtonsPanel):
 	__label__ = "Filter"
 	
@@ -558,6 +581,7 @@
 bpy.types.register(SEQUENCER_PT_edit) # sequencer panels
 bpy.types.register(SEQUENCER_PT_effect)
 bpy.types.register(SEQUENCER_PT_input)
+bpy.types.register(SEQUENCER_PT_sound)
 bpy.types.register(SEQUENCER_PT_filter)
 bpy.types.register(SEQUENCER_PT_proxy)
 

Added: branches/blender2.5/blender/source/blender/editors/include/ED_sound.h
===================================================================
--- branches/blender2.5/blender/source/blender/editors/include/ED_sound.h	                        (rev 0)
+++ branches/blender2.5/blender/source/blender/editors/include/ED_sound.h	2009-08-28 12:27:29 UTC (rev 22837)
@@ -0,0 +1,35 @@
+/**
+ * $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,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ * The Original Code is Copyright (C) 2008 Blender Foundation.
+ * All rights reserved.
+ *
+ * 
+ * Contributor(s): Blender Foundation
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#ifndef ED_SOUND_H
+#define ED_SOUND_H
+
+void ED_operatortypes_sound(void);
+
+#endif /* ED_SOUND_H */
+

Modified: branches/blender2.5/blender/source/blender/editors/sound/sound_intern.h
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sound/sound_intern.h	2009-08-28 11:13:45 UTC (rev 22836)
+++ branches/blender2.5/blender/source/blender/editors/sound/sound_intern.h	2009-08-28 12:27:29 UTC (rev 22837)
@@ -33,7 +33,5 @@
 
 void SOUND_OT_open(wmOperatorType *ot);
 
-void sound_operatortype_init(void);
-
 #endif /* ED_SOUND_INTERN_H */
 

Modified: branches/blender2.5/blender/source/blender/editors/sound/sound_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/sound/sound_ops.c	2009-08-28 11:13:45 UTC (rev 22836)
+++ branches/blender2.5/blender/source/blender/editors/sound/sound_ops.c	2009-08-28 12:27:29 UTC (rev 22837)
@@ -38,6 +38,8 @@
 #include "BKE_report.h"
 #include "BKE_sound.h"
 
+#include "ED_sound.h"
+
 #include "RNA_access.h"
 #include "RNA_define.h"
 
@@ -84,7 +86,7 @@
 void SOUND_OT_open(wmOperatorType *ot)
 {
 	/* identifiers */
-	ot->name= "Open";
+	ot->name= "Open Sound";
 	ot->idname= "SOUND_OT_open";
 	ot->description= "Load a sound file into blender";
 
@@ -101,7 +103,7 @@
 
 /* ******************************************************* */
 
-void sound_operatortype_init(void)
+void ED_operatortypes_sound(void)
 {
 	WM_operatortype_append(SOUND_OT_open);
 }

Modified: branches/blender2.5/blender/source/blender/editors/space_api/spacetypes.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_api/spacetypes.c	2009-08-28 11:13:45 UTC (rev 22836)
+++ branches/blender2.5/blender/source/blender/editors/space_api/spacetypes.c	2009-08-28 12:27:29 UTC (rev 22837)
@@ -51,6 +51,7 @@
 #include "ED_screen.h"
 #include "ED_sculpt.h"
 #include "ED_space_api.h"
+#include "ED_sound.h"
 #include "ED_uvedit.h"
 #include "ED_mball.h"
 
@@ -99,6 +100,7 @@
 	ED_operatortypes_metaball();
 	ED_operatortypes_boids();
 	ED_operatortypes_gpencil();
+	ED_operatortypes_sound();
 	
 	ui_view2d_operatortypes();
 	

Modified: branches/blender2.5/blender/source/blender/editors/space_image/image_ops.c
===================================================================
--- branches/blender2.5/blender/source/blender/editors/space_image/image_ops.c	2009-08-28 11:13:45 UTC (rev 22836)
+++ branches/blender2.5/blender/source/blender/editors/space_image/image_ops.c	2009-08-28 12:27:29 UTC (rev 22837)
@@ -650,7 +650,7 @@
 void IMAGE_OT_open(wmOperatorType *ot)
 {
 	/* identifiers */
-	ot->name= "Open";
+	ot->name= "Open Image";
 	ot->idname= "IMAGE_OT_open";
 	
 	/* api callbacks */





More information about the Bf-blender-cvs mailing list