Drop misleading warning.
It's perfectly fine for materials to have neither diffuse texture nor vertex colours. This dates back to a time when the tool had more limited use cases. To compensate: https://github.com/facebookincubator/FBX2glTF/issues/43
This commit is contained in:
parent
5eb36702b5
commit
bcbfdae6be
|
@ -474,18 +474,11 @@ ModelData *Raw2Gltf(
|
|||
|
||||
for (size_t surfaceIndex = 0; surfaceIndex < materialModels.size(); surfaceIndex++) {
|
||||
const RawModel &surfaceModel = materialModels[surfaceIndex];
|
||||
assert(surfaceModel.GetSurfaceCount() == 1);
|
||||
|
||||
assert(surfaceModel.GetSurfaceCount() == 1);
|
||||
const RawSurface &rawSurface = surfaceModel.GetSurface(0);
|
||||
const std::string surfaceName = std::to_string(surfaceIndex) + "_" + rawSurface.name;
|
||||
|
||||
const RawMaterial &rawMaterial = surfaceModel.GetMaterial(surfaceModel.GetTriangle(0).materialIndex);
|
||||
if (rawMaterial.textures[RAW_TEXTURE_USAGE_DIFFUSE] < 0 &&
|
||||
(surfaceModel.GetVertexAttributes() & RAW_VERTEX_ATTRIBUTE_COLOR) == 0) {
|
||||
if (verboseOutput) {
|
||||
fmt::printf("Warning: surface %s has neither texture nor vertex colors.\n", surfaceName.c_str());
|
||||
}
|
||||
}
|
||||
const MaterialData &mData = require(materialsByName, materialHash(rawMaterial));
|
||||
|
||||
std::string nodeName = rawSurface.nodeName;
|
||||
|
|
Loading…
Reference in New Issue