-
Notifications
You must be signed in to change notification settings - Fork 15
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
nifxml 0.9 specification sync #8
Open
hexabits
wants to merge
27
commits into
niftools:develop
Choose a base branch
from
hexabits:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains 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
On several occasions the newer nif.xml now has version-exclusive names which are identical yet have different types. Such as uint in one version and ushort in another. Adding the cast to read/write will adjust the read/write size appropriately. Note this does not fix all duplicate names, just the ones where a cast during read/write is all that is necessary. The first type also has to be the largest as declaration for the type depends on the first name, and subsequent smaller types will reuse that name.
NiDataStream uses two members to store args extracted from the RTTI string for the name that are not actually read/written during I/O so the current generation for this object is incorrect.
For some reason nifxml.py lists a bunch of compounds which are often nested in order to write the toString code correctly. Added the new constraint descriptors to it.
The mapping for XML type to niflib type is now internal instead of in nif.xml. Type names are synced to nifxml 0.9.
The list of includes was not first reduced to unique includes before writing, so the same file would be included over and over again.
Added Compound.has_arr() which recursively checks all members for an array size. This removes the need for a manually maintained list of compounds with arrays.
Required to pass a child member of BSVertexDesc through to BSVertexData. Comment out BSVertexDesc as a native type for now, as niflib doesn't have such a type yet anyway.
This is only the first step of many...
…e/include Reduced the constant code() calls for each line and used multi-line string templates instead. Created specialized CFile methods for includes, include guards, and namespaces to make it even more legible.
A function, parse_XML now must be called to actually fill the Blocks/Compounds. This gives another script a chance to monkeypatch the classes before calling the function. Moved all the niflib specific methods to gen_niflib and then monkeypatch the classes with them. Pass native types dict as a parameter instead of referencing it globally. Fixed nifxml_doc generation also.
Wasn't actually looking at the member count attribute. Thanks, Python.
Also improve the include() function for CFile so that quotes are not required.
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.
Updated for XML features up to 0.9
<enum>
/<bitflags>
<add>
members, which means ignore on read/write. This is found in Usage/Access members on NiDataStream.bodyFlags
can just be cast to the smaller type, but the class member variable is stored as uint. Source XML: