Fixed bug that caused transparency values in FBX files to be imported incorrectly
This commit is contained in:
@@ -937,7 +937,7 @@ void LoadMaterial(KRContext &context, std::vector<KRResource *> &resources, FbxS
|
|||||||
|
|
||||||
// Transparency
|
// Transparency
|
||||||
lKFbxDouble1 =((KFbxSurfacePhong *) pMaterial)->TransparencyFactor;
|
lKFbxDouble1 =((KFbxSurfacePhong *) pMaterial)->TransparencyFactor;
|
||||||
new_material->setTransparency(lKFbxDouble1.Get());
|
new_material->setTransparency(1.0f - lKFbxDouble1.Get());
|
||||||
|
|
||||||
// Shininess
|
// Shininess
|
||||||
lKFbxDouble1 =((KFbxSurfacePhong *) pMaterial)->Shininess;
|
lKFbxDouble1 =((KFbxSurfacePhong *) pMaterial)->Shininess;
|
||||||
@@ -972,7 +972,7 @@ void LoadMaterial(KRContext &context, std::vector<KRResource *> &resources, FbxS
|
|||||||
|
|
||||||
// Opacity
|
// Opacity
|
||||||
lKFbxDouble1 =((KFbxSurfaceLambert *)pMaterial)->TransparencyFactor;
|
lKFbxDouble1 =((KFbxSurfaceLambert *)pMaterial)->TransparencyFactor;
|
||||||
new_material->setTransparency(lKFbxDouble1.Get());
|
new_material->setTransparency(1.0f - lKFbxDouble1.Get());
|
||||||
} else {
|
} else {
|
||||||
printf("Error! Unable to convert material: %s", pMaterial->GetName());
|
printf("Error! Unable to convert material: %s", pMaterial->GetName());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user