Rename one texture type from Metalness to Metallic

master
huxingyi 2020-11-18 22:09:47 +09:30
parent 01aa96c3bd
commit 5b84c5e7c0
3 changed files with 9 additions and 7 deletions

View File

@ -86,7 +86,7 @@ void MaterialPreviewsGenerator::generate()
textureGenerator->addPartColorMap(partId, image, layer.tileScale); textureGenerator->addPartColorMap(partId, image, layer.tileScale);
else if (TextureType::Normal == mapItem.forWhat) else if (TextureType::Normal == mapItem.forWhat)
textureGenerator->addPartNormalMap(partId, image, layer.tileScale); textureGenerator->addPartNormalMap(partId, image, layer.tileScale);
else if (TextureType::Metalness == mapItem.forWhat) else if (TextureType::Metallic == mapItem.forWhat)
textureGenerator->addPartMetalnessMap(partId, image, layer.tileScale); textureGenerator->addPartMetalnessMap(partId, image, layer.tileScale);
else if (TextureType::Roughness == mapItem.forWhat) else if (TextureType::Roughness == mapItem.forWhat)
textureGenerator->addPartRoughnessMap(partId, image, layer.tileScale); textureGenerator->addPartRoughnessMap(partId, image, layer.tileScale);

View File

@ -167,7 +167,7 @@ void TextureGenerator::prepare()
addPartColorMap(bmeshNode.partId, image, tileScale); addPartColorMap(bmeshNode.partId, image, tileScale);
else if (TextureType::Normal == forWhat) else if (TextureType::Normal == forWhat)
addPartNormalMap(bmeshNode.partId, image, tileScale); addPartNormalMap(bmeshNode.partId, image, tileScale);
else if (TextureType::Metalness == forWhat) else if (TextureType::Metallic == forWhat)
addPartMetalnessMap(bmeshNode.partId, image, tileScale); addPartMetalnessMap(bmeshNode.partId, image, tileScale);
else if (TextureType::Roughness == forWhat) else if (TextureType::Roughness == forWhat)
addPartRoughnessMap(bmeshNode.partId, image, tileScale); addPartRoughnessMap(bmeshNode.partId, image, tileScale);

View File

@ -9,7 +9,7 @@ enum class TextureType
None, None,
BaseColor, BaseColor,
Normal, Normal,
Metalness, Metallic,
Roughness, Roughness,
AmbientOcclusion, AmbientOcclusion,
Count Count
@ -24,7 +24,7 @@ QString TextureTypeToDispName(TextureType type) \
return QObject::tr("Base Color"); \ return QObject::tr("Base Color"); \
case TextureType::Normal: \ case TextureType::Normal: \
return QObject::tr("Normal Map"); \ return QObject::tr("Normal Map"); \
case TextureType::Metalness: \ case TextureType::Metallic: \
return QObject::tr("Metallic"); \ return QObject::tr("Metallic"); \
case TextureType::Roughness: \ case TextureType::Roughness: \
return QObject::tr("Roughness"); \ return QObject::tr("Roughness"); \
@ -46,8 +46,8 @@ const char *TextureTypeToString(TextureType type) \
return "BaseColor"; \ return "BaseColor"; \
case TextureType::Normal: \ case TextureType::Normal: \
return "Normal"; \ return "Normal"; \
case TextureType::Metalness: \ case TextureType::Metallic: \
return "Metalness"; \ return "Metallic"; \
case TextureType::Roughness: \ case TextureType::Roughness: \
return "Roughness"; \ return "Roughness"; \
case TextureType::AmbientOcclusion: \ case TextureType::AmbientOcclusion: \
@ -67,8 +67,10 @@ TextureType TextureTypeFromString(const char *typeString) \
return TextureType::BaseColor; \ return TextureType::BaseColor; \
if (type == "Normal") \ if (type == "Normal") \
return TextureType::Normal; \ return TextureType::Normal; \
if (type == "Metallic") \
return TextureType::Metallic; \
if (type == "Metalness") \ if (type == "Metalness") \
return TextureType::Metalness; \ return TextureType::Metallic; \
if (type == "Roughness") \ if (type == "Roughness") \
return TextureType::Roughness; \ return TextureType::Roughness; \
if (type == "AmbientOcclusion") \ if (type == "AmbientOcclusion") \