Skip to content

Commit

Permalink
When exporting, Pixelorama now remembers the last exported path
Browse files Browse the repository at this point in the history
  • Loading branch information
OverloadedOrama committed Feb 15, 2024
1 parent b3fa887 commit 9a31382
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Translations/Translations.pot
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@ msgstr ""
msgid "Rename Layout"
msgstr ""

#. Refers to the current layout of the user interface.
msgid "Current layout"
msgstr ""

msgid "Are you sure you want to delete this layout?"
msgstr ""

Expand Down Expand Up @@ -2128,6 +2132,10 @@ msgstr ""
msgid "File failed to save. Error code %s"
msgstr ""

#. Appears when the user attempts to export a project as a video, but the process fails. FFMPEG is the external software used to export videos.
msgid "Video failed to export. Ensure that FFMPEG is installed correctly."
msgstr ""

msgid "File(s) exported"
msgstr ""

Expand Down
11 changes: 7 additions & 4 deletions src/Autoload/Export.gd
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,9 @@ func export_processed_images(
if is_using_ffmpeg(project.file_format):
var video_exported := export_video(export_paths)
if not video_exported:
Global.popup_error(
tr("Video failed to export. Ensure that FFMPEG is installed correctly.")
)
return false
else:
var exporter: AImgIOBaseExporter
Expand All @@ -299,7 +302,6 @@ func export_processed_images(
gif_export_thread.wait_to_finish()
gif_export_thread.start(export_animated.bind(details))
else:
var succeeded := true
for i in range(processed_images.size()):
if OS.has_feature("web"):
if project.file_format == FileFormat.PNG:
Expand Down Expand Up @@ -333,10 +335,9 @@ func export_processed_images(
Global.popup_error(
tr("File failed to save. Error code %s (%s)") % [err, error_string(err)]
)
succeeded = false
if succeeded:
Global.notification_label("File(s) exported")
return false

Global.notification_label("File(s) exported")
# Store settings for quick export and when the dialog is opened again
var file_name_with_ext := project.file_name + file_format_string(project.file_format)
project.was_exported = true
Expand All @@ -348,6 +349,8 @@ func export_processed_images(
Global.top_menu_container.file_menu.set_item_text(
Global.FileMenu.EXPORT, tr("Export") + " %s" % file_name_with_ext
)
project.directory_path = export_paths[0].get_base_dir()
Global.config_cache.set_value("data", "current_dir", project.directory_path)
return true


Expand Down

0 comments on commit 9a31382

Please sign in to comment.