diff --git a/WebGLExport/WebGLExport.py b/WebGLExport/WebGLExport.py index 36d3134..46886e7 100644 --- a/WebGLExport/WebGLExport.py +++ b/WebGLExport/WebGLExport.py @@ -578,7 +578,8 @@ def createXtree( self, position, level=_ROOT, parent="" ): if self.__copyFiles: fileName = os.path.split( file )[1] shutil.copy( file, os.path.join( self.__outputDir, fileName ) ) - file = fileName + + file = os.path.split( file )[1] output += ' ' * 8 + mrmlId + '.file = "' + file + '";\n' output += ' ' * 8 + mrmlId + '.color = ' + color + ';\n'