Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Forgot to mention: ImportFile actually fails to resolve the references as well,
but you can fix that by temporarily setting Environment.CurrentDirectory to the
proper content directory (parent folder of the "objects" and "scenes"
subfolders in this case). CurrentDirectory basically must be set to the same
folder set as content directory in LightWave when creating the LWS/LWO files:
Environment.CurrentDirectory = @"C:\Content";
AssimpImporter importer = new AssimpImporter();
Scene scene = importer.ImportFile(@"C:\Content\scenes\fenris.lws");
This doesn't work with ImportFileFromStream, though.
Original comment by arpa...@googlemail.com
on 28 Feb 2013 at 2:27
Yeah, the custom file handling was never exposed. I'll look into adding support.
Original comment by nicholas.woodfield
on 28 Feb 2013 at 10:16
I've implemented the IOSystem/IOStream. There's a simple implementation,
"FileIOSystem" that you can specify multiple search paths that can handle
finding input files that are spread out beyond the model's root folder.
There is one caveat though, the custom file IO will only work with ImportFile
or ConvertFile API's. You will continue hitting the exception when using the
ImportFileFromStream API.
This s because none of the Assimp "ImportFromMemory" C functions take in an
aiFileIO structure. I'm waiting a response from the Assimp developers regarding
this.
Original comment by nicholas.woodfield
on 10 Mar 2013 at 4:39
FYI, an update on the caveat:
If you need to use custom file IO, you need to do so from the API that
imports/converts from a File source. Custom file IO is not supported from
importing from a memory buffer in the Assimp C API, and therefore is not
supported by AssimpNet.
https://sourceforge.net/projects/assimp/forums/forum/817653/topic/6973982/index/
page/1
Original comment by nicholas.woodfield
on 10 Mar 2013 at 7:20
Original issue reported on code.google.com by
arpa...@googlemail.com
on 28 Feb 2013 at 1:55Attachments: