remove redundant get gomp name function

This commit is contained in:
Alexey Bogomolov 2023-02-17 13:31:52 +03:00
parent 718f4e748d
commit dacc90f9ad
2 changed files with 2 additions and 8 deletions

View file

@ -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"""

View file

@ -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