Merge pull request #354 from ynput/enhancement/use-project-name-from-context

Chore: Use project name from context to get settings
This commit is contained in:
Jakub Trllo 2024-04-03 18:22:47 +02:00 committed by GitHub
commit 1bba097820
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
from pyblish import api
from ayon_core.settings import get_current_project_settings
from ayon_core.settings import get_project_settings
class CollectSettings(api.ContextPlugin):
@ -9,4 +9,9 @@ class CollectSettings(api.ContextPlugin):
label = "Collect Settings"
def process(self, context):
context.data["project_settings"] = get_current_project_settings()
project_name = context.data["projectName"]
self.log.debug(
"Collecting settings for project: {}".format(project_name)
)
project_settings = get_project_settings(project_name)
context.data["project_settings"] = project_settings