diff --git a/openpype/hosts/fusion/addon.py b/openpype/hosts/fusion/addon.py index 345e348c3b..45683cfbde 100644 --- a/openpype/hosts/fusion/addon.py +++ b/openpype/hosts/fusion/addon.py @@ -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. - `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")`. 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__) - if not app_data: + if not app_name: return - app_version_candidates = re.findall(r"\d+", app_data) + app_version_candidates = re.findall(r"\d+", app_name) if not app_version_candidates: return for app_version in app_version_candidates: diff --git a/openpype/hosts/fusion/hooks/pre_fusion_profile_hook.py b/openpype/hosts/fusion/hooks/pre_fusion_profile_hook.py index 15c9424990..cf168194c3 100644 --- a/openpype/hosts/fusion/hooks/pre_fusion_profile_hook.py +++ b/openpype/hosts/fusion/hooks/pre_fusion_profile_hook.py @@ -125,8 +125,8 @@ class FusionCopyPrefsPrelaunch(PreLaunchHook): ) = self.get_copy_fusion_prefs_settings() # Get launched application context and return correct app version - app_data = self.launch_context.env.get("AVALON_APP_NAME") - app_version = get_fusion_version(app_data) + app_name = self.launch_context.env.get("AVALON_APP_NAME") + app_version = get_fusion_version(app_name) _, profile_version = FUSION_VERSIONS_DICT[app_version] fu_profile = self.get_fusion_profile_name(profile_version)