diff --git a/laf b/laf index 81622fcbb..f14a6a5f3 160000 --- a/laf +++ b/laf @@ -1 +1 @@ -Subproject commit 81622fcbb9e4a0edc14a02250c387bd6fa878708 +Subproject commit f14a6a5f33b77b9d5363075bde5ab328219cfd92 diff --git a/src/app/file/file.cpp b/src/app/file/file.cpp index 1a3891131..cb7e965a7 100644 --- a/src/app/file/file.cpp +++ b/src/app/file/file.cpp @@ -679,7 +679,8 @@ FileOp* FileOp::createSaveDocumentOperation(const Context* context, .outerTagName(outerTag ? outerTag->name(): "") .frame(outputFrame) .tagFrame(innerTag ? frame - innerTag->fromFrame(): - outputFrame); + outputFrame) + .duration(spr->frameDuration(frame)); fop->m_seq.filename_list.push_back( filename_formatter(fn_format, fnInfo)); diff --git a/src/app/filename_formatter.cpp b/src/app/filename_formatter.cpp index f2a980228..49ce4c5b5 100644 --- a/src/app/filename_formatter.cpp +++ b/src/app/filename_formatter.cpp @@ -1,4 +1,5 @@ // Aseprite +// Copyright (C) 2022 Igara Studio S.A. // Copyright (C) 2001-2017 David Capello // // This program is distributed under the terms of @@ -112,12 +113,12 @@ std::string filename_formatter( base::replace_string(output, "{layer}", info.layerName()); base::replace_string(output, "{group}", info.groupName()); base::replace_string(output, "{slice}", info.sliceName()); - base::replace_string(output, "{duration}", std::to_string(info.duration())); if (replaceFrame) { base::replace_string(output, "{tag}", info.innerTagName()); base::replace_string(output, "{innertag}", info.innerTagName()); base::replace_string(output, "{outertag}", info.outerTagName()); + base::replace_string(output, "{duration}", std::to_string(info.duration())); replace_frame("{frame", info.frame(), output); replace_frame("{tagframe", info.tagFrame(), output); } diff --git a/src/app/filename_formatter.h b/src/app/filename_formatter.h index 21325a2fc..1ad7074be 100644 --- a/src/app/filename_formatter.h +++ b/src/app/filename_formatter.h @@ -1,4 +1,5 @@ // Aseprite +// Copyright (C) 2022 Igara Studio S.A. // Copyright (C) 2001-2017 David Capello // // This program is distributed under the terms of @@ -14,8 +15,6 @@ namespace app { class FilenameInfo { public: - FilenameInfo() : m_frame(-1), m_tagFrame(-1) { } - const std::string& filename() const { return m_filename; } const std::string& layerName() const { return m_layerName; } const std::string& groupName() const { return m_groupName; } @@ -78,9 +77,9 @@ namespace app { std::string m_innerTagName; std::string m_outerTagName; std::string m_sliceName; - int m_frame; - int m_tagFrame; - int m_duration; + int m_frame = -1; + int m_tagFrame = -1; + int m_duration = 0; }; // Returns the information inside {frame} tag. diff --git a/src/doc/algorithm/shift_image.cpp b/src/doc/algorithm/shift_image.cpp index bd23c32e8..72380f7be 100644 --- a/src/doc/algorithm/shift_image.cpp +++ b/src/doc/algorithm/shift_image.cpp @@ -91,17 +91,25 @@ ImageRef shift_image_with_mask(const Cel* cel, ImageRef imageToShift(Image::create(compImage->pixelFormat(), maskedBounds.w, maskedBounds.h)); imageToShift->copy(compImage.get(), gfx::Clip(0, 0, maskedBounds)); - // Shiftting the masked area of the COMPOUND IMAGE (compImage). - int initialX = maskedBounds.x; - int initialY = maskedBounds.y; - int finalX = maskedBounds.x2(); - int finalY = maskedBounds.y2(); - for (int y=initialY; y