mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-10 12:44:53 +00:00
Merge branch 'spritesheet-fullpath' of https://github.com/kawa-yoiko/aseprite into master
This commit is contained in:
commit
b2e169569a
@ -374,14 +374,14 @@ public:
|
|||||||
else
|
else
|
||||||
pr.pack(gfx::Size(width, height));
|
pr.pack(gfx::Size(width, height));
|
||||||
|
|
||||||
auto it = samples.begin();
|
auto it = pr.begin();
|
||||||
for (auto& rc : pr) {
|
for (auto& sample : samples) {
|
||||||
if (it->isDuplicated())
|
if (sample.isDuplicated() ||
|
||||||
|
sample.isEmpty())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
ASSERT(it != samples.end());
|
ASSERT(it != pr.end());
|
||||||
it->setInTextureBounds(rc);
|
sample.setInTextureBounds(*(it++));
|
||||||
++it;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -835,7 +835,9 @@ void DocExporter::createDataFile(const Samples& samples, std::ostream& os, Image
|
|||||||
<< " \"version\": \"" << VERSION << "\",\n";
|
<< " \"version\": \"" << VERSION << "\",\n";
|
||||||
|
|
||||||
if (!m_textureFilename.empty())
|
if (!m_textureFilename.empty())
|
||||||
os << " \"image\": \"" << escape_for_json(m_textureFilename).c_str() << "\",\n";
|
os << " \"image\": \""
|
||||||
|
<< escape_for_json(base::get_file_name(m_textureFilename)).c_str()
|
||||||
|
<< "\",\n";
|
||||||
|
|
||||||
os << " \"format\": \"" << (textureImage->pixelFormat() == IMAGE_RGB ? "RGBA8888": "I8") << "\",\n"
|
os << " \"format\": \"" << (textureImage->pixelFormat() == IMAGE_RGB ? "RGBA8888": "I8") << "\",\n"
|
||||||
<< " \"size\": { "
|
<< " \"size\": { "
|
||||||
|
Loading…
x
Reference in New Issue
Block a user