Skip to content

Support conversion of project-specific settings #592

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

martastain
Copy link
Member

@martastain martastain commented May 7, 2025

This PR enhances the conversion of project-specific settings by dynamically checking if the target addon’s conversion method expects a "project_name" parameter and, if so, passing it accordingly.

@martastain martastain requested a review from Copilot May 7, 2025 11:59
@martastain martastain self-assigned this May 7, 2025
@martastain martastain added the type: enhancement Improvement of existing functionality or minor addition label May 7, 2025
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the conversion of project-specific settings by dynamically checking if the target addon’s conversion method expects a "project_name" parameter and, if so, passing it accordingly.

  • Added import for the inspect module.
  • Dynamically inspects the signature of convert_settings_overrides to conditionally include the "project_name".
Comments suppressed due to low confidence (1)

ayon_server/addons/addon.py:386

  • If get_project_overrides is called frequently, consider caching the result of inspect.getfullargspec(target_addon.convert_settings_overrides) to reduce the overhead of repeated introspection.
if "project_name" in additional_args:

@martastain martastain requested a review from BigRoy May 7, 2025 12:01
@martastain martastain marked this pull request as ready for review May 7, 2025 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement Improvement of existing functionality or minor addition
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert Settings: In conversion, allow targeting only a certain scope (e.g. Project overrides)
1 participant