niftools / pyffi

PyFFI is a Python library for processing block structured files.
http://www.niftools.org/pyffi
Other
47 stars 26 forks source link

Fix/havok material #69

Open neomonkeus opened 4 years ago

neomonkeus commented 4 years ago

@niftools/pyffi-reviewer

Overview

[Overview of content of the pull request] Fix issue with Havok Material for current version of nif.xml

Fixes Known Issues

[Ordered list of issues fixed by this PR]

Detailed Description

[List of functional updates] Revert .material.material to material due to using older version of nif.xml

Documentation

[Overview of updates to documentation] N/A

Testing

[Overview of testing required to ensure functionality is correctly implemented]

Manual

[Order steps to manually verify updates are working correctly]

Automated

[List of tests run, updated or added to avoid future regressions]

Additional Information

[Anything else you deem relevant]

Allofich commented 2 years ago

When trying to export a .nif from Oblivion in the Blender nif export addon, execution of the mopper fails because of this line.

https://github.com/niftools/pyffi/blob/7f4404dbb8cf832dadd4b3150819340b8764f9b0/pyffi/utils/mopp.py#L168

Removing ".material" there allows the mopper to run.

Together with the other ".material" fixes in this PR (discussed in https://github.com/niftools/blender_niftools_addon/issues/453), the export process becomes at least able to finish without errors.

The resultant .nif still had problems the last I checked (before https://github.com/niftools/blender_niftools_addon/commit/e8ede4488e2bb63c07deba06f5aac1a2a68e92e8). Oblivion would crash when loading the .nif file, but I found that opening it in NifSkope and saving it with auto-sanitize on would fix this and allow it to at least load in Oblivion without crashing. (It still had a misaligned collision mesh, and probably other issues as well)

Any chance of this PR being merged sometime soon? I had thought about sending in a PR with the .material fixes, but then I saw that they were already in this PR, except for the mopp.py one.

Edit: I just tried with https://github.com/niftools/blender_niftools_addon/commit/e8ede4488e2bb63c07deba06f5aac1a2a68e92e8 applied together with the .material removals, but the exported .nif still has the same problems (crashing on load, misaligned collision).

neomonkeus commented 2 years ago

We found that there was several other issues between the previous release version and this version The flip for between .material.material might get you forward one step but breaks other things.

@HENDRIX-ZT2 & @Candoran2 are working on integrating a different library which would have more modern nif.xml support which avoids the above issues.