This repository has been archived by the owner on Sep 20, 2024. It is now read-only.
Settings: Fix settings for inactive projects #3778
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Brief description
This fixes Settings reading and saving for inactive projects.
openpype.client.get_project
argumentinactive
default to True.And
openpype.client.get_projects
argumentinactive
still defaults to False like before.I felt that was a much more logical default value for a function whose sole function is to get a single project by name - it should just return it if found by default. Having this filtered by default would also break a lot of other code too if you would be working inside the DCC and the project would be set to inactive.
Description
The Project Settings did not read the project settings (anatomy data) for an inactive project and thus the UI would just show the default values.
Saving the settings for an inactive project would error:
Additional info
I tried fixing it locally in Settings handlers here and here but turning it into
get_project(project_name, inactive=True)
.That did fix the querying and viewing of the settings in the UI but still disallowed saving the project correctly.
Also reported on OpenPype Discord here.
Testing notes:
project_anatomy/attributes/active
to False.get_project
also still behaves as intended