compute %width% and %height% in filepath when saving
This commit is contained in:
parent
f5365c9c81
commit
8a35c12e8c
7
nodes.py
7
nodes.py
|
@ -746,6 +746,13 @@ class SaveImage:
|
|||
except:
|
||||
digits = 0
|
||||
return (digits, prefix)
|
||||
|
||||
def compute_vars(input):
|
||||
input = input.replace("%width%", str(images[0].shape[1]))
|
||||
input = input.replace("%height%", str(images[0].shape[0]))
|
||||
return input
|
||||
|
||||
filename_prefix = compute_vars(filename_prefix)
|
||||
|
||||
subfolder = os.path.dirname(os.path.normpath(filename_prefix))
|
||||
filename = os.path.basename(os.path.normpath(filename_prefix))
|
||||
|
|
Loading…
Reference in New Issue