mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Refactor app_data -> app_name
This commit is contained in:
parent
bec4639985
commit
00b83e5879
2 changed files with 6 additions and 6 deletions
|
|
@ -17,11 +17,11 @@ FUSION_VERSIONS_DICT = {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
def get_fusion_version(app_data):
|
def get_fusion_version(app_name):
|
||||||
"""
|
"""
|
||||||
The function is triggered by the prelaunch hooks to get the fusion version.
|
The function is triggered by the prelaunch hooks to get the fusion version.
|
||||||
|
|
||||||
`app_data` is obtained by prelaunch hooks from the
|
`app_name` is obtained by prelaunch hooks from the
|
||||||
`launch_context.env.get("AVALON_APP_NAME")`.
|
`launch_context.env.get("AVALON_APP_NAME")`.
|
||||||
|
|
||||||
To get a correct Fusion version, a version number should be present
|
To get a correct Fusion version, a version number should be present
|
||||||
|
|
@ -31,10 +31,10 @@ def get_fusion_version(app_data):
|
||||||
|
|
||||||
log = Logger.get_logger(__name__)
|
log = Logger.get_logger(__name__)
|
||||||
|
|
||||||
if not app_data:
|
if not app_name:
|
||||||
return
|
return
|
||||||
|
|
||||||
app_version_candidates = re.findall(r"\d+", app_data)
|
app_version_candidates = re.findall(r"\d+", app_name)
|
||||||
if not app_version_candidates:
|
if not app_version_candidates:
|
||||||
return
|
return
|
||||||
for app_version in app_version_candidates:
|
for app_version in app_version_candidates:
|
||||||
|
|
|
||||||
|
|
@ -125,8 +125,8 @@ class FusionCopyPrefsPrelaunch(PreLaunchHook):
|
||||||
) = self.get_copy_fusion_prefs_settings()
|
) = self.get_copy_fusion_prefs_settings()
|
||||||
|
|
||||||
# Get launched application context and return correct app version
|
# Get launched application context and return correct app version
|
||||||
app_data = self.launch_context.env.get("AVALON_APP_NAME")
|
app_name = self.launch_context.env.get("AVALON_APP_NAME")
|
||||||
app_version = get_fusion_version(app_data)
|
app_version = get_fusion_version(app_name)
|
||||||
_, profile_version = FUSION_VERSIONS_DICT[app_version]
|
_, profile_version = FUSION_VERSIONS_DICT[app_version]
|
||||||
fu_profile = self.get_fusion_profile_name(profile_version)
|
fu_profile = self.get_fusion_profile_name(profile_version)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue