Skip to content

Add external renderer plugin API - #2340

Open
Astel123457 wants to merge 9 commits into
openutau:masterfrom
Astel123457:external-renderer-api
Open

Add external renderer plugin API#2340
Astel123457 wants to merge 9 commits into
openutau:masterfrom
Astel123457:external-renderer-api

Conversation

@Astel123457

Copy link
Copy Markdown
Contributor

Summary

  • add discovery and stable identity for external phrase renderer plugins
  • support manifest and attribute-based renderer registration
  • expose renderer capabilities, expressions, analysis generation, and cache services
  • integrate external renderers with track settings and singer analysis generation
  • add focused registry and compatibility tests

This introduces API version 1 as a public preview for renderer developers.

Copilot AI lite review requested due to automatic review settings August 31, 2026 09:42

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Renderers.GetDefaultRenderer does not honor newly listed external renderer defaults from Preferences, making the new default-renderer option ineffective.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR introduces an external renderer plugin API (v1 public preview), adding discovery/identity for external renderers, exposing renderer-declared capabilities/expressions/analysis/cache services, and integrating those renderers into both UI selection and singer/oto workflows.

Changes:

  • Add external renderer discovery/registry plus plugin surface types (metadata, analysis provider, cache/analysis services).
  • Integrate stable renderer IDs into track settings selection and render-phrase hashing.
  • Add UI entry point to generate renderer-provided analysis files and add targeted registry/compatibility tests.
File summaries
File Description
OpenUtau/Views/SingersDialog.axaml.cs Adds a context-menu flow for generating external renderer analysis from selected oto sources.
OpenUtau/Views/SingersDialog.axaml Adds a context menu entry for “Generate renderer analysis”.
OpenUtau/ViewModels/TrackHeaderViewModel.cs Updates renderer selection menu to use stable renderer IDs; adds error handling around renderer selection.
OpenUtau/Strings/Strings.axaml Adds localized strings for renderer analysis generation UI.
OpenUtau.Test/Render/ExternalRendererRegistryTest.cs Adds unit tests covering discovery, identity, analysis generation, and runtime/manifest compatibility checks.
OpenUtau.Core/Ustx/UTrack.cs Enhances render settings validation with stable renderer identity + controlled fallback and load error reporting.
OpenUtau.Core/Render/RenderPhrase.cs Switches render cache hash contribution to stable renderer ID rather than ToString().
OpenUtau.Core/Render/Renderers.cs Adds renderer options (Id/Name), external renderer integration, and stable renderer identity helpers.
OpenUtau.Core/Render/ExternalRendererRegistry.cs Introduces the external renderer registry: discovery, loading, analysis orchestration, and collectible load contexts.
OpenUtau.Core/Render/ExternalRendererPlugin.cs Adds the public plugin API types: attribute, metadata, analysis provider interfaces, and cache/analysis services.
OpenUtau.Core/Commands/TrackCommands.cs Makes renderer changes fail-fast (no silent fallback) when explicitly selecting a renderer.
OpenUtau.Core/Classic/ToolsManager.cs Hooks external renderer discovery into the resampler search path.
OpenUtau.Core/Classic/ResamplerManifest.cs Extends YAML manifest model to include renderer + analysis metadata blocks.
OpenUtau.Core/Classic/ResamplerItem.cs Allows injecting a resampler override for classic rendering paths.
OpenUtau.Core/Classic/ExeResampler.cs Makes ExeResampler public (for broader use/interop).
OpenUtau.Core/Classic/ClassicRenderer.cs Adds resampler override support and renderer name override to keep stable identity.
Review details

Suppressed comments (1)

OpenUtau.Core/Render/Renderers.cs:68

  • GetDefaultRenderer currently only honors the "Classic" preference; after getRendererOptions() started listing external renderer IDs, selecting an external default renderer in Preferences will still fall back to the first supported renderer. This makes the new preference option ineffective.
        public static string GetDefaultRenderer(USingerType singerType) {
            if (Preferences.Default.DefaultRenderer == "Classic" && singerType == USingerType.Classic) {
                return CLASSIC;
            } else {
                return GetSupportedRenderers(singerType)[0];
  • Files reviewed: 16/16 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread OpenUtau/Views/SingersDialog.axaml.cs
Comment thread OpenUtau.Core/Render/ExternalRendererRegistry.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants