back out the more controversial changes

This commit is contained in:
Seth Alves 2015-08-17 12:40:56 -07:00
parent fedbfe8881
commit 1c8030472a
2 changed files with 23 additions and 8 deletions

View file

@ -976,7 +976,7 @@ ExtractedMesh extractMesh(const FBXNode& object, unsigned int& meshIndex) {
data.extracted.mesh.meshIndex = meshIndex++; data.extracted.mesh.meshIndex = meshIndex++;
QVector<int> materials; QVector<int> materials;
QVector<int> textures; QVector<int> textures;
// bool isMaterialPerPolygon = false; bool isMaterialPerPolygon = false;
foreach (const FBXNode& child, object.children) { foreach (const FBXNode& child, object.children) {
if (child.name == "Vertices") { if (child.name == "Vertices") {
@ -1107,13 +1107,12 @@ ExtractedMesh extractMesh(const FBXNode& object, unsigned int& meshIndex) {
foreach (const FBXNode& subdata, child.children) { foreach (const FBXNode& subdata, child.children) {
if (subdata.name == "Materials") { if (subdata.name == "Materials") {
materials = getIntVector(subdata); materials = getIntVector(subdata);
} // else if (subdata.name == "MappingInformationType") { } else if (subdata.name == "MappingInformationType") {
// if (subdata.properties.at(0) == "ByPolygon") if (subdata.properties.at(0) == "ByPolygon")
// isMaterialPerPolygon = true; isMaterialPerPolygon = true;
// } else { } else {
// isMaterialPerPolygon = false; isMaterialPerPolygon = false;
// } }
// }
} }
@ -1126,6 +1125,11 @@ ExtractedMesh extractMesh(const FBXNode& object, unsigned int& meshIndex) {
} }
} }
bool isMultiMaterial = false;
if (isMaterialPerPolygon) {
isMultiMaterial = true;
}
// convert the polygons to quads and triangles // convert the polygons to quads and triangles
int polygonIndex = 0; int polygonIndex = 0;
QHash<QPair<int, int>, int> materialTextureParts; QHash<QPair<int, int>, int> materialTextureParts;

View file

@ -1808,6 +1808,17 @@ void Model::segregateMeshGroups() {
const FBXMesh& mesh = geometry.meshes.at(i); const FBXMesh& mesh = geometry.meshes.at(i);
const MeshState& state = _meshStates.at(i); const MeshState& state = _meshStates.at(i);
bool translucentMesh = networkMesh.getTranslucentPartCount(mesh) == networkMesh.parts.size();
bool hasTangents = !mesh.tangents.isEmpty();
bool hasSpecular = mesh.hasSpecularTexture();
bool hasLightmap = mesh.hasEmissiveTexture();
bool isSkinned = state.clusterMatrices.size() > 1;
bool wireframe = isWireframe();
if (wireframe) {
translucentMesh = hasTangents = hasSpecular = hasLightmap = isSkinned = false;
}
// Create the render payloads // Create the render payloads
int totalParts = mesh.parts.size(); int totalParts = mesh.parts.size();
for (int partIndex = 0; partIndex < totalParts; partIndex++) { for (int partIndex = 0; partIndex < totalParts; partIndex++) {