Fix files_list not found

This commit is contained in:
yolain
2024-11-04 11:25:44 +08:00
parent e4b331cd93
commit 2a4f89dab0
+2 -3
View File
@@ -7347,11 +7347,10 @@ class pipeXYPlotAdvanced:
@classmethod
def INPUT_TYPES(s):
files_list = []
if s.font_dir and os.path.exists(s.font_dir):
font_dir = s.font_dir
files_list = [f for f in os.listdir(font_dir) if os.path.isfile(os.path.join(font_dir, f)) and f.lower().endswith(".ttf")]
else:
flies_list = []
files_list = files_list + [f for f in os.listdir(font_dir) if os.path.isfile(os.path.join(font_dir, f)) and f.lower().endswith(".ttf")]
if s.user_font_dir and os.path.exists(s.user_font_dir):
files_list = files_list + [f for f in os.listdir(s.user_font_dir) if os.path.isfile(os.path.join(s.user_font_dir, f)) and f.lower().endswith(".ttf")]