From dacc90f9ad8ddab10ad60f814950db818e3327f3 Mon Sep 17 00:00:00 2001 From: Alexey Bogomolov Date: Fri, 17 Feb 2023 13:31:52 +0300 Subject: [PATCH] remove redundant get gomp name function --- openpype/hosts/fusion/api/lib.py | 7 ------- openpype/hosts/fusion/api/workio.py | 3 ++- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/openpype/hosts/fusion/api/lib.py b/openpype/hosts/fusion/api/lib.py index ec96d6cf18..f175d3a1d3 100644 --- a/openpype/hosts/fusion/api/lib.py +++ b/openpype/hosts/fusion/api/lib.py @@ -316,13 +316,6 @@ def get_current_comp(): return comp -def get_comp_filename(): - """Get comp's Filename""" - comp = get_current_comp() - if comp: - return comp.GetAttrs()["COMPS_FileName"] - - @contextlib.contextmanager def comp_lock_and_undo_chunk(comp, undo_queue_name="Script CMD"): """Lock comp and open an undo chunk during the context""" diff --git a/openpype/hosts/fusion/api/workio.py b/openpype/hosts/fusion/api/workio.py index 048e6e090a..8012d600da 100644 --- a/openpype/hosts/fusion/api/workio.py +++ b/openpype/hosts/fusion/api/workio.py @@ -25,7 +25,8 @@ def open_file(filepath): def current_file(): - current_filepath = get_comp_filename() + comp = get_current_comp() + current_filepath = comp.GetAttrs()["COMPS_FileName"] return current_filepath or None