From f4b2e9b91d78b270f8741cec9b8770579d424f4a Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 10 Jun 2011 12:43:06 +0000 Subject: Added operator to make importing Keying Sets from files easier. This can be found from the dropdown below the Add/Remove buttons in the Properties Editor -> Scene -> Keying Sets panel. --- release/scripts/startup/bl_ui/properties_scene.py | 39 +++++++++++++++++++++++ 1 file changed, 39 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 7725f661693..e2dc9de064f 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -76,6 +76,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): col = row.column(align=True) col.operator("anim.keying_set_add", icon='ZOOMIN', text="") col.operator("anim.keying_set_remove", icon='ZOOMOUT', text="") + col.menu("SCENE_MT_keying_set_specials", icon='DOWNARROW_HLT', text="") ks = scene.keying_sets.active if ks and ks.is_path_absolute: @@ -94,6 +95,14 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): col.prop(ks, "bl_options") +class SCENE_MT_keying_set_specials(bpy.types.Menu): + bl_label = "Keying Set Specials" + + def draw(self, context): + layout = self.layout + + layout.operator("anim.keying_set_import", text="Import From File") + class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel): bl_label = "Active Keying Set" @@ -198,6 +207,36 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel): # XXX, move operator to op/ dir +class ANIM_OT_keying_set_import(bpy.types.Operator): + "Import Keying Set from a python script." + bl_idname = "anim.keying_set_import" + bl_label = "Import Keying Set from File" + + filepath = bpy.props.StringProperty(name="File Path", description="Filepath to read file from.") + filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) + filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'}) + filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'}) + + def execute(self, context): + if not self.filepath: + raise Exception("Filepath not set.") + + f = open(self.filepath, "r") + if not f: + raise Exception("Could not open file.") + + # lazy way of loading and running this file... + exec(compile(f.read(), self.filepath, 'exec')) + + f.close() + + return {'FINISHED'} + + def invoke(self, context, event): + wm = context.window_manager + wm.fileselect_add(self) + return {'RUNNING_MODAL'} + class ANIM_OT_keying_set_export(bpy.types.Operator): "Export Keying Set to a python script." bl_idname = "anim.keying_set_export" -- cgit v1.2.3 From bd6ca0570e089afc1d29b4f18b8bb6cc086545ea Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Thu, 28 Jul 2011 13:58:59 +0000 Subject: 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 --- release/scripts/startup/bl_ui/properties_scene.py | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index e2dc9de064f..aec9d88511c 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -43,6 +43,32 @@ class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel): layout.prop(scene, "background_set", text="Background") +class SCENE_PT_audio(SceneButtonsPanel, bpy.types.Panel): + bl_label = "Audio" + COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + + def draw(self, context): + layout = self.layout + scene = context.scene + rd = context.scene.render + + layout.prop(scene, "audio_distance_model") + + layout.prop(scene, "audio_doppler_speed", text="Speed") + layout.prop(scene, "audio_doppler_factor") + + layout.prop(scene, "audio_volume") + layout.operator("sound.update_animation_flags") + layout.operator("sound.bake_animation") + + split = layout.split() + + col = split.column() + col.prop(rd, "ffmpeg_audio_mixrate", text="Rate") + col = split.column() + col.prop(rd, "ffmpeg_audio_channels", text="") + + class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): bl_label = "Units" COMPAT_ENGINES = {'BLENDER_RENDER'} -- cgit v1.2.3 From 3e85ec432ef050563d75488eca3049b77497153d Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Mon, 1 Aug 2011 11:44:20 +0000 Subject: 3D Audio GSoC: Adds new speaker object type. Notes: * Needs some nice icons * Quickily review by Joshua Leung (5 mins) * Properties UI updated (with help of Thomans Dinges) * Speakers have their own theme color * No real audio functionality yet. * Minor bug regarding lamps/lattices fixed in interface_templates.c I personality tested: * Creation, Deletion, Duplication * Saving, Loading * Library linking (incl. make local) * Tracking * Dope Sheet, Outliner * Animation * Drawing (incl. Theme) --- release/scripts/startup/bl_ui/properties_scene.py | 55 ++++------------------- 1 file changed, 9 insertions(+), 46 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index aec9d88511c..a9310fcc532 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -51,22 +51,24 @@ class SCENE_PT_audio(SceneButtonsPanel, bpy.types.Panel): layout = self.layout scene = context.scene rd = context.scene.render - - layout.prop(scene, "audio_distance_model") - - layout.prop(scene, "audio_doppler_speed", text="Speed") - layout.prop(scene, "audio_doppler_factor") layout.prop(scene, "audio_volume") - layout.operator("sound.update_animation_flags") layout.operator("sound.bake_animation") split = layout.split() col = split.column() - col.prop(rd, "ffmpeg_audio_mixrate", text="Rate") + + col.label("Listener:") + col.prop(scene, "audio_distance_model", text="") + col.prop(scene, "audio_doppler_speed", text="Speed") + col.prop(scene, "audio_doppler_factor", text="Doppler") + col = split.column() + + col.label("Format:") col.prop(rd, "ffmpeg_audio_channels", text="") + col.prop(rd, "ffmpeg_audio_mixrate", text="Rate") class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): @@ -102,7 +104,6 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): col = row.column(align=True) col.operator("anim.keying_set_add", icon='ZOOMIN', text="") col.operator("anim.keying_set_remove", icon='ZOOMOUT', text="") - col.menu("SCENE_MT_keying_set_specials", icon='DOWNARROW_HLT', text="") ks = scene.keying_sets.active if ks and ks.is_path_absolute: @@ -121,14 +122,6 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): col.prop(ks, "bl_options") -class SCENE_MT_keying_set_specials(bpy.types.Menu): - bl_label = "Keying Set Specials" - - def draw(self, context): - layout = self.layout - - layout.operator("anim.keying_set_import", text="Import From File") - class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel): bl_label = "Active Keying Set" @@ -233,36 +226,6 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel): # XXX, move operator to op/ dir -class ANIM_OT_keying_set_import(bpy.types.Operator): - "Import Keying Set from a python script." - bl_idname = "anim.keying_set_import" - bl_label = "Import Keying Set from File" - - filepath = bpy.props.StringProperty(name="File Path", description="Filepath to read file from.") - filter_folder = bpy.props.BoolProperty(name="Filter folders", description="", default=True, options={'HIDDEN'}) - filter_text = bpy.props.BoolProperty(name="Filter text", description="", default=True, options={'HIDDEN'}) - filter_python = bpy.props.BoolProperty(name="Filter python", description="", default=True, options={'HIDDEN'}) - - def execute(self, context): - if not self.filepath: - raise Exception("Filepath not set.") - - f = open(self.filepath, "r") - if not f: - raise Exception("Could not open file.") - - # lazy way of loading and running this file... - exec(compile(f.read(), self.filepath, 'exec')) - - f.close() - - return {'FINISHED'} - - def invoke(self, context, event): - wm = context.window_manager - wm.fileselect_add(self) - return {'RUNNING_MODAL'} - class ANIM_OT_keying_set_export(bpy.types.Operator): "Export Keying Set to a python script." bl_idname = "anim.keying_set_export" -- cgit v1.2.3 From c334bf69a7282254bb80bb2896bd8716930a4adf Mon Sep 17 00:00:00 2001 From: Joerg Mueller Date: Sat, 6 Aug 2011 17:57:20 +0000 Subject: 3D Audio GSoC: Mixdown functionality. * Mixdown possible via libsndfile and ffmpeg! * Fixed some ffmpeg deprecation warnings * Mixdown UI only shows working Container, Codec and Format combinations! * Minor bugs and warnings fixed --- release/scripts/startup/bl_ui/properties_scene.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index a9310fcc532..c3784b9f692 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -70,6 +70,8 @@ class SCENE_PT_audio(SceneButtonsPanel, bpy.types.Panel): col.prop(rd, "ffmpeg_audio_channels", text="") col.prop(rd, "ffmpeg_audio_mixrate", text="Rate") + layout.operator("sound.mixdown") + class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): bl_label = "Units" -- cgit v1.2.3 From b374ab919a4b46d377d88ad0f1f1eced06621eca Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 12 Aug 2011 06:57:00 +0000 Subject: import common classes from bpy.types, saves ~1000 python getattrs on startup. --- release/scripts/startup/bl_ui/properties_scene.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index 7725f661693..6e96e1228e7 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -18,6 +18,7 @@ # import bpy +from bpy.types import Operator, Panel from rna_prop_ui import PropertyPanel @@ -31,7 +32,7 @@ class SceneButtonsPanel(): return context.scene -class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_scene(SceneButtonsPanel, Panel): bl_label = "Scene" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -43,7 +44,7 @@ class SCENE_PT_scene(SceneButtonsPanel, bpy.types.Panel): layout.prop(scene, "background_set", text="Background") -class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_unit(SceneButtonsPanel, Panel): bl_label = "Units" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -61,7 +62,7 @@ class SCENE_PT_unit(SceneButtonsPanel, bpy.types.Panel): row.prop(unit, "use_separate") -class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_keying_sets(SceneButtonsPanel, Panel): bl_label = "Keying Sets" def draw(self, context): @@ -94,7 +95,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel, bpy.types.Panel): col.prop(ks, "bl_options") -class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_keying_set_paths(SceneButtonsPanel, Panel): bl_label = "Active Keying Set" @classmethod @@ -144,7 +145,7 @@ class SCENE_PT_keying_set_paths(SceneButtonsPanel, bpy.types.Panel): col.prop(ksp, "bl_options") -class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_physics(SceneButtonsPanel, Panel): bl_label = "Gravity" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -161,7 +162,7 @@ class SCENE_PT_physics(SceneButtonsPanel, bpy.types.Panel): layout.prop(scene, "gravity", text="") -class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel): +class SCENE_PT_simplify(SceneButtonsPanel, Panel): bl_label = "Simplify" COMPAT_ENGINES = {'BLENDER_RENDER'} @@ -190,7 +191,7 @@ class SCENE_PT_simplify(SceneButtonsPanel, bpy.types.Panel): col.prop(rd, "simplify_ao_sss", text="AO and SSS") -class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel): +class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, Panel): COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} _context_path = "scene" _property_type = bpy.types.Scene @@ -198,7 +199,7 @@ class SCENE_PT_custom_props(SceneButtonsPanel, PropertyPanel, bpy.types.Panel): # XXX, move operator to op/ dir -class ANIM_OT_keying_set_export(bpy.types.Operator): +class ANIM_OT_keying_set_export(Operator): "Export Keying Set to a python script." bl_idname = "anim.keying_set_export" bl_label = "Export Keying Set..." -- cgit v1.2.3 From 6c9ee34dd8acba35808847d3669798c6d3459b9c Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Tue, 30 Aug 2011 10:44:02 +0000 Subject: 2.5 UI Files: * Code cleanup after Pepper merge. --- release/scripts/startup/bl_ui/properties_scene.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_scene.py') diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index fd7fc8ed462..66f967bb6e1 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -59,14 +59,12 @@ class SCENE_PT_audio(SceneButtonsPanel, Panel): split = layout.split() col = split.column() - col.label("Listener:") col.prop(scene, "audio_distance_model", text="") col.prop(scene, "audio_doppler_speed", text="Speed") col.prop(scene, "audio_doppler_factor", text="Doppler") col = split.column() - col.label("Format:") col.prop(rd, "ffmpeg_audio_channels", text="") col.prop(rd, "ffmpeg_audio_mixrate", text="Rate") -- cgit v1.2.3