Fix #1606 sprite sheet contains full path of image

This commit is contained in:
Shiqing 2019-03-22 12:42:07 +08:00
parent 3ec3f75d91
commit ca1728fd38

View File

@ -837,7 +837,9 @@ void DocExporter::createDataFile(const Samples& samples, std::ostream& os, Image
<< " \"version\": \"" << VERSION << "\",\n";
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"
<< " \"size\": { "