rename get_fusion module

This commit is contained in:
Alexey Bogomolov 2023-02-17 13:50:08 +03:00
parent d77c0e252b
commit 87ab9e3598
2 changed files with 4 additions and 4 deletions

View file

@ -302,7 +302,7 @@ def get_frame_path(path):
return filename, padding, ext
def get_fusion():
def get_fusion_module():
"""Get current Fusion instance"""
fusion = getattr(sys.modules["__main__"], "fusion", None)
return fusion
@ -310,7 +310,7 @@ def get_fusion():
def get_current_comp():
"""Get current comp in this session"""
fusion = get_fusion()
fusion = get_fusion_module()
if fusion:
comp = fusion.CurrentComp
return comp

View file

@ -2,7 +2,7 @@
import sys
import os
from .lib import get_fusion, get_current_comp, get_comp_filename
from .lib import get_fusion_module, get_current_comp, get_comp_filename
def file_extensions():
@ -20,7 +20,7 @@ def save_file(filepath):
def open_file(filepath):
fusion = get_fusion()
fusion = get_fusion_module()
return fusion.LoadComp(filepath)