mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-31 07:29:49 +00:00
Include tag name even if we're exporting a single file
This commit is contained in:
parent
237eeef4d1
commit
b3133130ad
|
@ -303,7 +303,7 @@ func export_processed_images(
|
||||||
) -> bool:
|
) -> bool:
|
||||||
# Stop export if directory path or file name are not valid
|
# Stop export if directory path or file name are not valid
|
||||||
var dir := DirAccess.open(project.export_directory_path)
|
var dir := DirAccess.open(project.export_directory_path)
|
||||||
var dir_exists := dir.dir_exists(project.export_directory_path)
|
var dir_exists := DirAccess.dir_exists_absolute(project.export_directory_path)
|
||||||
var is_valid_filename := project.file_name.is_valid_filename()
|
var is_valid_filename := project.file_name.is_valid_filename()
|
||||||
if not dir_exists:
|
if not dir_exists:
|
||||||
if is_valid_filename: # Directory path not valid, file name is valid
|
if is_valid_filename: # Directory path not valid, file name is valid
|
||||||
|
@ -336,7 +336,7 @@ func export_processed_images(
|
||||||
# if directories exist, and create them if not
|
# if directories exist, and create them if not
|
||||||
if multiple_files and new_dir_for_each_frame_tag:
|
if multiple_files and new_dir_for_each_frame_tag:
|
||||||
var frame_tag_directory := DirAccess.open(export_path.get_base_dir())
|
var frame_tag_directory := DirAccess.open(export_path.get_base_dir())
|
||||||
if not frame_tag_directory.dir_exists(export_path.get_base_dir()):
|
if not DirAccess.dir_exists_absolute(export_path.get_base_dir()):
|
||||||
frame_tag_directory = DirAccess.open(project.export_directory_path)
|
frame_tag_directory = DirAccess.open(project.export_directory_path)
|
||||||
frame_tag_directory.make_dir(export_path.get_base_dir().get_file())
|
frame_tag_directory.make_dir(export_path.get_base_dir().get_file())
|
||||||
|
|
||||||
|
@ -607,9 +607,9 @@ func _create_export_path(
|
||||||
var path := project.file_name
|
var path := project.file_name
|
||||||
if path.contains("{name}"):
|
if path.contains("{name}"):
|
||||||
path = path.replace("{name}", project.name)
|
path = path.replace("{name}", project.name)
|
||||||
|
var path_extras := ""
|
||||||
# Only append frame number when there are multiple files exported
|
# Only append frame number when there are multiple files exported
|
||||||
if multifile:
|
if multifile:
|
||||||
var path_extras := ""
|
|
||||||
if layer > -1:
|
if layer > -1:
|
||||||
var layer_name := project.layers[layer].name
|
var layer_name := project.layers[layer].name
|
||||||
path_extras += "(%s) " % layer_name
|
path_extras += "(%s) " % layer_name
|
||||||
|
|
Loading…
Reference in a new issue