Skip to content

Commit

Permalink
Merge pull request #2404 from mlavik1/issue_2043
Browse files Browse the repository at this point in the history
Suggested fix for issue 2043
  • Loading branch information
kimkulling committed Apr 5, 2019
2 parents 01d4b10 + 898e59d commit 225b6fa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions code/FBXMaterial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,20 @@ Texture::Texture(uint64_t id, const Element& element, const Document& doc, const

props = GetPropertyTable(doc,"Texture.FbxFileTexture",element,sc);

// 3DS Max and FBX SDK use "Scaling" and "Translation" instead of "ModelUVScaling" and "ModelUVTranslation". Use these properties if available.
bool ok;
const aiVector3D& scaling = PropertyGet<aiVector3D>(*props, "Scaling", ok);
if (ok) {
uvScaling.x = scaling.x;
uvScaling.y = scaling.y;
}

const aiVector3D& trans = PropertyGet<aiVector3D>(*props, "Translation", ok);
if (ok) {
uvTrans.x = trans.x;
uvTrans.y = trans.y;
}

// resolve video links
if(doc.Settings().readTextures) {
const std::vector<const Connection*>& conns = doc.GetConnectionsByDestinationSequenced(ID());
Expand Down

0 comments on commit 225b6fa

Please sign in to comment.