File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -518,7 +518,14 @@ private static async Task ProcessAllFiles(object workerParamsObject)
518
518
// write metadata to file
519
519
if ( importSettings . importMetadata == true )
520
520
{
521
- var jsonFile = Path . Combine ( Path . GetDirectoryName ( importSettings . outputFile ) , Path . GetFileNameWithoutExtension ( importSettings . outputFile ) + ".json" ) ;
521
+ string filename = Path . GetFileNameWithoutExtension ( importSettings . outputFile ) ;
522
+ // for gltf, there is no output filename
523
+ if ( string . IsNullOrEmpty ( filename ) )
524
+ {
525
+ // get last folder name
526
+ filename = Path . GetFileName ( Path . GetDirectoryName ( importSettings . inputFiles [ 0 ] ) ) ;
527
+ }
528
+ var jsonFile = Path . Combine ( Path . GetDirectoryName ( importSettings . outputFile ) , filename + ".json" ) ;
522
529
Log . Write ( "Writing metadata to file: " + jsonFile ) ;
523
530
File . WriteAllText ( jsonFile , jsonMeta ) ;
524
531
}
You can’t perform that action at this time.
0 commit comments