From 5b84c5e7c04f5626bae41ad4fc4bae5cdf050ad8 Mon Sep 17 00:00:00 2001 From: huxingyi Date: Wed, 18 Nov 2020 22:09:47 +0930 Subject: [PATCH] Rename one texture type from Metalness to Metallic --- src/materialpreviewsgenerator.cpp | 2 +- src/texturegenerator.cpp | 2 +- src/texturetype.h | 12 +++++++----- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/materialpreviewsgenerator.cpp b/src/materialpreviewsgenerator.cpp index bf0e5e94..fa3a1ec3 100644 --- a/src/materialpreviewsgenerator.cpp +++ b/src/materialpreviewsgenerator.cpp @@ -86,7 +86,7 @@ void MaterialPreviewsGenerator::generate() textureGenerator->addPartColorMap(partId, image, layer.tileScale); else if (TextureType::Normal == mapItem.forWhat) textureGenerator->addPartNormalMap(partId, image, layer.tileScale); - else if (TextureType::Metalness == mapItem.forWhat) + else if (TextureType::Metallic == mapItem.forWhat) textureGenerator->addPartMetalnessMap(partId, image, layer.tileScale); else if (TextureType::Roughness == mapItem.forWhat) textureGenerator->addPartRoughnessMap(partId, image, layer.tileScale); diff --git a/src/texturegenerator.cpp b/src/texturegenerator.cpp index 23ed47fb..b2c6cfb2 100644 --- a/src/texturegenerator.cpp +++ b/src/texturegenerator.cpp @@ -167,7 +167,7 @@ void TextureGenerator::prepare() addPartColorMap(bmeshNode.partId, image, tileScale); else if (TextureType::Normal == forWhat) addPartNormalMap(bmeshNode.partId, image, tileScale); - else if (TextureType::Metalness == forWhat) + else if (TextureType::Metallic == forWhat) addPartMetalnessMap(bmeshNode.partId, image, tileScale); else if (TextureType::Roughness == forWhat) addPartRoughnessMap(bmeshNode.partId, image, tileScale); diff --git a/src/texturetype.h b/src/texturetype.h index b6b3df14..101973e7 100644 --- a/src/texturetype.h +++ b/src/texturetype.h @@ -9,7 +9,7 @@ enum class TextureType None, BaseColor, Normal, - Metalness, + Metallic, Roughness, AmbientOcclusion, Count @@ -24,7 +24,7 @@ QString TextureTypeToDispName(TextureType type) \ return QObject::tr("Base Color"); \ case TextureType::Normal: \ return QObject::tr("Normal Map"); \ - case TextureType::Metalness: \ + case TextureType::Metallic: \ return QObject::tr("Metallic"); \ case TextureType::Roughness: \ return QObject::tr("Roughness"); \ @@ -46,8 +46,8 @@ const char *TextureTypeToString(TextureType type) \ return "BaseColor"; \ case TextureType::Normal: \ return "Normal"; \ - case TextureType::Metalness: \ - return "Metalness"; \ + case TextureType::Metallic: \ + return "Metallic"; \ case TextureType::Roughness: \ return "Roughness"; \ case TextureType::AmbientOcclusion: \ @@ -67,8 +67,10 @@ TextureType TextureTypeFromString(const char *typeString) \ return TextureType::BaseColor; \ if (type == "Normal") \ return TextureType::Normal; \ + if (type == "Metallic") \ + return TextureType::Metallic; \ if (type == "Metalness") \ - return TextureType::Metalness; \ + return TextureType::Metallic; \ if (type == "Roughness") \ return TextureType::Roughness; \ if (type == "AmbientOcclusion") \