mirror of
https://github.com/microsoft/UVAtlas
synced 2024-09-19 14:20:00 +00:00
Fix command-line tools handling when using .vbo files as inputs
This commit is contained in:
parent
fcf879ee93
commit
00617d9a7d
@ -2425,6 +2425,7 @@ HRESULT Mesh::ExportToSDKMESH(const wchar_t* szFileName, size_t nMaterials, cons
|
|||||||
s.PrimitiveType = PT_TRIANGLE_LIST;
|
s.PrimitiveType = PT_TRIANGLE_LIST;
|
||||||
s.IndexCount = mnFaces * 3;
|
s.IndexCount = mnFaces * 3;
|
||||||
s.VertexCount = mnVerts;
|
s.VertexCount = mnVerts;
|
||||||
|
subsetArray.push_back(0);
|
||||||
submeshes.push_back(s);
|
submeshes.push_back(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1109,7 +1109,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
}
|
}
|
||||||
else if ( !_wcsicmp(outputExt, L".sdkmesh") )
|
else if ( !_wcsicmp(outputExt, L".sdkmesh") )
|
||||||
{
|
{
|
||||||
hr = inMesh->ExportToSDKMESH(outputPath, inMaterial.size(), &inMaterial.front());
|
hr = inMesh->ExportToSDKMESH(outputPath, inMaterial.size(), inMaterial.empty() ? nullptr : &inMaterial.front());
|
||||||
}
|
}
|
||||||
else if ( !_wcsicmp(outputExt, L".cmo") )
|
else if ( !_wcsicmp(outputExt, L".cmo") )
|
||||||
{
|
{
|
||||||
@ -1125,7 +1125,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
hr = inMesh->ExportToCMO(outputPath, inMaterial.size(), &inMaterial.front());
|
hr = inMesh->ExportToCMO(outputPath, inMaterial.size(), inMaterial.empty() ? nullptr : &inMaterial.front());
|
||||||
}
|
}
|
||||||
else if ( !_wcsicmp(outputExt, L".x") )
|
else if ( !_wcsicmp(outputExt, L".x") )
|
||||||
{
|
{
|
||||||
@ -1168,11 +1168,11 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
|
|||||||
}
|
}
|
||||||
else if (!_wcsicmp(outputExt, L".sdkmesh"))
|
else if (!_wcsicmp(outputExt, L".sdkmesh"))
|
||||||
{
|
{
|
||||||
hr = inMesh->ExportToSDKMESH(outputPath, inMaterial.size(), &inMaterial.front());
|
hr = inMesh->ExportToSDKMESH(outputPath, inMaterial.size(), inMaterial.empty() ? nullptr : &inMaterial.front());
|
||||||
}
|
}
|
||||||
else if (!_wcsicmp(outputExt, L".cmo"))
|
else if (!_wcsicmp(outputExt, L".cmo"))
|
||||||
{
|
{
|
||||||
hr = inMesh->ExportToCMO(outputPath, inMaterial.size(), &inMaterial.front());
|
hr = inMesh->ExportToCMO(outputPath, inMaterial.size(), inMaterial.empty() ? nullptr : &inMaterial.front());
|
||||||
}
|
}
|
||||||
if (FAILED(hr))
|
if (FAILED(hr))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user