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)
518518 // write metadata to file
519519 if ( importSettings . importMetadata == true )
520520 {
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" ) ;
522529 Log . Write ( "Writing metadata to file: " + jsonFile ) ;
523530 File . WriteAllText ( jsonFile , jsonMeta ) ;
524531 }
You can’t perform that action at this time.
0 commit comments