From 3cb9220ebd81083930feace4a37de6ac07c284c8 Mon Sep 17 00:00:00 2001 From: Jamie Hardt Date: Thu, 6 Nov 2025 10:04:46 -0800 Subject: [PATCH] Conforming to extensions --- __init__.py | 47 +++++++------------------------------------ blender_manifest.toml | 19 +++++++++++++++-- 2 files changed, 24 insertions(+), 42 deletions(-) diff --git a/__init__.py b/__init__.py index ab0b565..b08938e 100644 --- a/__init__.py +++ b/__init__.py @@ -1,52 +1,19 @@ import bpy +from .operator_protools_export import ProToolsExport +def export_pt_menu_callback(self, _): + self.layout.operator(ProToolsExport.bl_idname, text="Send to Pro Tools") -# class SoundObjectAttachmentPanel(bpy.types.Panel): -# bl_idname = "OBJECT_PT_sound_object_attachment_panel" -# bl_space_type = "VIEW_3D" -# bl_label = "Attach Sounds" -# bl_region_type = "UI" -# bl_category = "Tools" -# bl_context = "object" -# bl_options = {"DEFAULT_CLOSED"} - -# def draw(self, context): -# self.layout.label(text="Attach Sounds") - - -def import_wav_menu_callback(self, context): - self.layout.operator(ImportWav.bl_idname, text="WAV Audio Files (.wav)") - - -def export_adm_menu_callback(self, context): - self.layout.operator(ADMWaveExport.bl_idname, text="ADM Broadcast-WAVE (.wav)") - - -def add_sound_to_mesh_menu_callback(self, context): - self.layout.operator(AddSoundToMeshOperator.bl_idname, icon='SPEAKER') - def register(): - bpy.utils.register_class(AddSoundToMeshOperator) - bpy.utils.register_class(ADMWaveExport) - bpy.utils.register_class(ImportWav) + bpy.utils.register_class(ProToolsExport) + bpy.types.TOPBAR_MT_file_export.append(export_pt_menu_callback) - bpy.types.TOPBAR_MT_file_import.append(import_wav_menu_callback) - bpy.types.TOPBAR_MT_file_export.append(export_adm_menu_callback) - bpy.types.VIEW3D_MT_object.append(add_sound_to_mesh_menu_callback) - -# bpy.utils.register_class(SoundObjectAttachmentPanel) - def unregister(): - bpy.utils.unregister_class(AddSoundToMeshOperator) - bpy.utils.unregister_class(ADMWaveExport) - bpy.utils.unregister_class(ImportWav) + bpy.utils.unregister_class(ProToolsExport) - bpy.types.TOPBAR_MT_file_import.remove(import_wav_menu_callback) - bpy.types.TOPBAR_MT_file_export.remove(export_adm_menu_callback) - bpy.types.VIEW3D_MT_object.remove(add_sound_to_mesh_menu_callback) + bpy.types.TOPBAR_MT_file_export.remove(export_pt_menu_callback) -# bpy.utils.unregister_class(SoundObjectAttachmentPanel) diff --git a/blender_manifest.toml b/blender_manifest.toml index 61ec8b8..9b502fd 100644 --- a/blender_manifest.toml +++ b/blender_manifest.toml @@ -1,10 +1,10 @@ +# https://docs.blender.org/manual/en/latest/advanced/extensions/getting_started.html schema_version = "1.0.0" -# Example of manifest file for a Blender extension -# Change the values according to your extension id = "soundobjects_blender_addon" version = "0.0.2" name = "Send Sounds to Pro Tools" +tags = ["Animation", "Object"] tagline = "Render each speaker as a track in Pro Tools with panning" maintainer = "Jamie Hardt" type = "add-on" @@ -12,3 +12,18 @@ blender_version_min = "4.5.3" license = [ "SPDX:GPL-3.0-or-later", ] +website = "https://git.squad51.us/jamie/soundobjects_blender_addon" +platforms = ["macos-arm64", "windows-x64"] + +[permissions] +network = "Communicates with Pro Tools via RPC, only localhost" + +[build] +paths_exclude_pattern = [ + "__pycache__/", + "/.git/", + "/*.zip", + "/.venv/", + ".mypy_*", + ".DS_Store" +]