-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TinyGltfImporter: more backporting #109
Conversation
Needed for test files that have smaller/larger sizes
- scene node list must only contain root nodes - nodes must not have multiple parents - cycle detection
Used to be an assert and consequently untested
The MSFT_texture_dds in the test files is there so other importers (CgltfImporter, really) can share test files. Also for CgltfImporter, the invalid basisu index test needs to be separate because that's checked by cgltf at import.
and mention their existence in the docs
The accessor checks for these were previously untested
Originally moved out for CgltfImporter, but it doesn't perform these tests in openData() anymore, so they don't need to be in separate files
std::isdigit requires <cctype>, apparently MSVC 2019 transitively included it somewhere already
Codecov Report
@@ Coverage Diff @@
## master #109 +/- ##
==========================================
+ Coverage 94.86% 94.92% +0.05%
==========================================
Files 112 112
Lines 8874 8977 +103
==========================================
+ Hits 8418 8521 +103
Misses 456 456
Continue to review full report at Codecov.
|
Not allowed, and used to lead to an assert in vertexFormat()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Extra points for catching the additional cases of invalid scene hierarchies, I wouldn't even think of that.
I was wondering, should those non-cycle checks maybe be moved out of |
It's used in other places already, be consistent and allow easier search for integer parsing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should those non-cycle checks maybe be moved out of
openData()
?
I think this would be easier to do in the SceneData
rework I'll be doing -- there it would only need to be handled in the doScene()
call (which also takes care of all child objects). Here, as far as I can tell, you'd have to duplicate the handling also in doObject3D()
(all of them? or only those that import the affected object? sounds complicated).
So I'd say keep it in doOpenData()
and then I'll move it to doScene()
during the port to new SceneData
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wonderful, I'll merge as soon as the CIs look like finishing green :)
I applied the latest fixup commits to the rest and merged as 144716c...f7b29fd. Thank you! |
Here's the second set of changes for
TinyGltfImporter
.Mostly consists of a bunch of changes backported from
CgltfImporter
deemed "bug/security/robustness" fixes. For slightly more background information, see #107 (comment) and #107 (comment).This also undoes some test file splits done in #106 because
CgltfImporter
doesn't depend oncgltf_validate
anymore so those checks don't fail inopenData
.