Skip to content

Commit

Permalink
opacity
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhang95 committed Dec 7, 2024
1 parent dd83788 commit ba1d56d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions projects/FBX/FBXSDK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,20 @@ static std::shared_ptr<PrimitiveObject> GetMesh(FbxNode* pNode) {
}
}
}
{
FbxProperty property = material->FindProperty(FbxSurfaceMaterial::sTransparencyFactor);
if (property.IsValid()) {
double value = property.Get<double>();
json["opacity_value"] = value;
int textureCount = property.GetSrcObjectCount<FbxTexture>();
for (int i = 0; i < textureCount; ++i) {
FbxFileTexture* texture = FbxCast<FbxFileTexture>(property.GetSrcObject<FbxTexture>(i));
if (texture) {
json["opacity_tex"] = texture->GetFileName();
}
}
}
}
{
FbxProperty property = material->FindProperty(FbxSurfaceMaterial::sReflection);
if (property.IsValid()) {
Expand Down

0 comments on commit ba1d56d

Please sign in to comment.