Merge pull request #4026 from Mykhailo418/master

Fix: incorrect reading of PBR properties in FBX
pull/4037/head
Kim Kulling 2021-08-18 10:47:20 +02:00 committed by GitHub
commit ceced70df0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -2131,7 +2131,7 @@ void FBXConverter::SetShadingPropertiesCommon(aiMaterial *out_mat, const Propert
if (ok) { if (ok) {
out_mat->AddProperty(&Emissive, 1, AI_MATKEY_COLOR_EMISSIVE); out_mat->AddProperty(&Emissive, 1, AI_MATKEY_COLOR_EMISSIVE);
} else { } else {
const aiColor3D &emissiveColor = GetColorPropertyFromMaterial(props, "Maya|emissive", ok); const aiColor3D &emissiveColor = GetColorProperty(props, "Maya|emissive", ok);
if (ok) { if (ok) {
out_mat->AddProperty(&emissiveColor, 1, AI_MATKEY_COLOR_EMISSIVE); out_mat->AddProperty(&emissiveColor, 1, AI_MATKEY_COLOR_EMISSIVE);
} }
@ -2218,7 +2218,7 @@ void FBXConverter::SetShadingPropertiesCommon(aiMaterial *out_mat, const Propert
} }
// PBR material information // PBR material information
const aiColor3D &baseColor = GetColorPropertyFromMaterial(props, "Maya|base_color", ok); const aiColor3D &baseColor = GetColorProperty(props, "Maya|base_color", ok);
if (ok) { if (ok) {
out_mat->AddProperty(&baseColor, 1, AI_MATKEY_BASE_COLOR); out_mat->AddProperty(&baseColor, 1, AI_MATKEY_BASE_COLOR);
} }