fix non-embedded textures

This commit is contained in:
SamGondelman 2019-04-03 11:26:07 -07:00
parent 770b863604
commit cf7230f023

View file

@ -243,8 +243,7 @@ void MaterialBaker::outputMaterial() {
void MaterialBaker::addTexture(const QString& materialName, image::TextureUsage::Type textureUsage, const hfm::Texture& texture) {
auto& textureUsageMap = _textureContentMap[materialName.toStdString()];
if (textureUsageMap.find(textureUsage) == textureUsageMap.end()) {
// Content may be empty, unless the data is inlined
if (textureUsageMap.find(textureUsage) == textureUsageMap.end() && !texture.content.isEmpty()) {
textureUsageMap[textureUsage] = { texture.content, texture.filename };
}
};