Open famda opened 1 year ago
these methods already have a ReadSettings argument, you can call:
ParseGLB( bytes, ValidationMode.Strict);
ReadGLB( stream, ValidationMode.Strict);
That's true but you can't validate before you read it. When you read it from file you can check before and select the option (strick, tryfix, skip) based on the validation errors.
On those methods it's a try catch experience and I can't know what is happening with the GLB (there's no way to see why it's failing).
I have a bunch of glb's that have assessors out of bounds. To fix it, I just need to update bounds of the arrays. This is something that I can't solve without knowing the reason.
you can create an instance of ReadContext.CreateFromFile
and then call Validate(fileName)
I actually tried but that method accepts a string. If you have a stream or a byte array, what would you pass to it? There's no filename in that case.
I'll review the code to see if there's a path through... it'll take some time
Thanks. 😉
Hey,
The Validate method from ModelRoot available for models from a filePath. Is it possible to add the same method for Stream or byte array (ParseGLB and ReadGLB)?
Thanks in advance.