Repository navigation
Honor material creation when loading cached models - #160
Open
civilwarinfrance wants to merge 1 commit into
Open
civilwarinfrance wants to merge 1 commit into
civilwarinfrance wants to merge 1 commit into
Conversation
Preserve create_materials in CacheLoader and tolerate missing material libraries consistently with OBJ parsing. Keep cached geometry and available material definitions intact. AI assistance was used to investigate, implement, and test this change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
create_materials=Truelets OBJ parsing continue when a referenced material library is missing, but the cache loader accepts and then ignores that option. After a material file is removed, the same model loads normally without caching and raisesOSErrorwhen loaded from an existing cache.Retain the option in
CacheLoaderand skip unreadable material libraries when it is enabled, matching OBJ parsing. The existing vertex-buffer loader then supplies default materials for the missing definitions. Cached geometry and available material definitions stay intact. With the option disabled, the existing error remains. The README clarifies this behavior.Regression tests create actual OBJ/MTL and compressed cache files, remove the first, second, or both material libraries, and compare cached geometry and material properties with uncached parsing. Controls cover intact libraries and the default error behavior.
Validation on Python 3.11.15/macOS:
Other Python versions and operating systems have not been run locally. No cache format change or dependencies. This is a reproduced code-inspection finding.
AI assistance was used to investigate, implement, and test this change.