mirror of
https://github.com/CesiumGS/obj2gltf.git
synced 2024-11-23 16:44:05 -05:00
Handle -i -o without following name
This commit is contained in:
parent
bbdecdece2
commit
96b8d17009
@ -128,6 +128,16 @@ if (defined(argv.metallicRoughnessOcclusionTexture) && defined(argv.specularGlos
|
||||
var objPath = argv.input;
|
||||
var gltfPath = argv.output;
|
||||
|
||||
if (objPath === '.') {
|
||||
console.log('Input path is required');
|
||||
return;
|
||||
}
|
||||
|
||||
if (gltfPath === '.') {
|
||||
console.log('Output path must be a filename');
|
||||
return;
|
||||
}
|
||||
|
||||
var filename = defaultValue(gltfPath, objPath);
|
||||
var name = path.basename(filename, path.extname(filename));
|
||||
var outputDirectory = path.dirname(filename);
|
||||
|
Loading…
Reference in New Issue
Block a user