Skip to content

Commit 43341a1

Browse files
authored
Merge pull request #578 from niftools/develop for version 0.1.0
2 parents e8ede44 + 09dae59 commit 43341a1

77 files changed

Lines changed: 1717 additions & 1648 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AUTHORS.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,14 @@ Contributors
1818
------------
1919

2020
* Aaron1178
21+
* Allofich
2122
* Alphax
2223
* Arcimaestro
2324
* Arthmoor
2425
* Artorp
25-
2626
* Deedes
2727
* Eli2
28+
* enpinion
2829
* Entim
2930
* Eugenius-v
3031
* Fritz_fretz
@@ -37,11 +38,13 @@ Contributors
3738
* mgm101
3839
* opusGlass
3940
* Pacificmorrowind
41+
* paulgreenG
4042
* Pentinen
4143
* @reddraconi
4244
* shon
4345
* @SubhadeepG
4446
* @TagnumElite
47+
* TackYs
4548
* Tamira
4649
* Thedaywalker
4750
* Tijer

CHANGELOG.rst

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,36 @@
1+
Version v0.1.00
2+
===============
3+
4+
- #576 Updates to documentation, changelog and makezip.bat (copies over generated folder from cobra-tools).
5+
- #572 Extra development of NiMesh import and some fixes
6+
- Fix to BSInvMarker rotation export.
7+
- Fix for bs_data_flags setting in export - now also applied to other games where applicable, not just Skyrim.
8+
- Fix to transform on packed collision vertices export.
9+
- Adjust StringProperty arguments to prevent crash in Blender 3.2 or lower.
10+
- Fix to mistake in BhkMalleableConstraint info import.
11+
- Added processing of regions to NiMesh bone import.
12+
- Basic DisplayList import (NiMesh with a specific type of datastream, which encodes the geometry). Bone weights for this type of nif are still unimplemented.
13+
- #543 Use "Color" type for "InvertY" group
14+
- #541 NiMesh import and updates for newer xml
15+
- Nif file glob now partially dependent on xml.
16+
- Support for NiMesh import (except those using DisplayList).
17+
- Support for BSDynamicTriShape import.
18+
- Update to Object properties ui (now only show relevant properties)
19+
- Closes #533 "Unknown block type BSDynamicTriShape".
20+
- Closes #421 "Can't import catherine classic .nif files."
21+
- #535 Pyffi overhaul
22+
- Change kf and nif import to make use of the new statically generated nif reading/writing library.
23+
- Added support for SSE mesh import.
24+
- Closes #521.
25+
- #526 Allow setting armature axis manually
26+
- #524 int cast in add_dummy_markers to comply with blender 3.1+'s python and check for interpolator attribute on controller before accessing it.
27+
- #506 Speedup anim import & various other fixes
28+
- Closes #180
29+
- Closes #495
30+
- Closes #500
31+
- Closes #510
32+
- Closes #517
33+
134
Version v0.0.14
235
===============
336

docs/user/features/geometry/geometry.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,15 @@ Vertex Color & Alpha
9494
* `This image should clarify per-face vertex colouring
9595
<http://i211.photobucket.com/albums/bb189/NifTools/Blender/documentation/per_face_vertex_color.jpg>`_
9696
* On export, the scripts will create extra vertices for different vertex colors per face.
97+
98+
99+
.. _geometry-shapekeys:
100+
101+
Shape Key Animations
102+
--------------------
103+
104+
**Example:**
105+
106+
#. :ref:`Create a mesh-object <geometry-mesh>`.
107+
#. Add relative shape keys to your mesh.
108+
#. Keyframe each shape key's value so that the key influences the shape of the mesh at the desired time.

docs/user/features/object/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ First, we complete the object panel:
122122
#. Set your **BSX Flags**.
123123
#. Select a **Consistency Flag** from the drop-down box. See `this comment
124124
<https://github.com/niftools/nifskope/issues/69#issuecomment-61427385>`_ for discussion of what they might do.
125-
#. The **Object Flag** is ???????. Set it to an appropriate number.
126-
#. The **Nif Long Name** is ???????. Set it to an appropriate string.
125+
#. The **Object Flag** corresponds to the flags field on NiAVObjects. The exact meaning will differ based on the block type. Set it to an appropriate number. If left to 0, will use a default value.
126+
#. The **Nif Long Name** is the actual name used for the corresponding block in the nif. You can either set it to an appropriate string, or leave it empty. In the latter case, the nif name will be determined based on the blender name of the object.
127127
#. The **Skeleton Root** determines the root bone used in this mesh's SkinInstance. Can usually be ignored / left empty, falls back to the armature object = root node.
128128

129129
.. Extra Data and InvMarkers I have no idea how to fill them in. Help?

install/makezip.bat

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,26 @@ mkdir "%DEPS%"
2626

2727
python -m pip install "PyFFI==%PYFFI_VERSION%" --target="%DEPS%"
2828

29+
xcopy "%GENERATED_FOLDER%" "%DEPS%\generated" /s /q /i
30+
2931
xcopy "%ROOT%"\AUTHORS.rst io_scene_niftools
3032
xcopy "%ROOT%"\CHANGELOG.rst io_scene_niftools
3133
xcopy "%ROOT%"\LICENSE.rst io_scene_niftools
3234
xcopy "%ROOT%"\README.rst io_scene_niftools
35+
36+
:: remove all __pycache__ folders
37+
for /d /r %%x in (*) do if "%%~nx" == "__pycache__" rd %%x /s /q
38+
3339
popd
3440

35-
powershell -executionpolicy bypass -Command "%DIR%\zip.ps1" -source "%DIR%\temp\io_scene_niftools" -destination "%DIR%\%ZIP_NAME%.zip"
36-
rmdir /s /q %DIR%\temp
41+
set "COMMAND_FILE=%DIR%\zip.ps1"
42+
set "COMMAND_FILE=%COMMAND_FILE: =` %"
43+
44+
set "SOURCE_DIR=%DIR%\temp\io_scene_niftools"
45+
set "SOURCE_DIR=%SOURCE_DIR: =` %"
46+
47+
set "DESTINATION_DIR=%DIR%\%ZIP_NAME%.zip"
48+
set "DESTINATION_DIR=%DESTINATION_DIR: =` %"
49+
50+
powershell -executionpolicy bypass -Command "%COMMAND_FILE%" -source "%SOURCE_DIR%" -destination "%DESTINATION_DIR%"
51+
rmdir /s /q "%DIR%\temp"

io_scene_niftools/VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v0.0.14
1+
v0.1.0

io_scene_niftools/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
"description": "Import and export files in the NetImmerse/Gamebryo formats (.nif, .kf, .egm)",
5050
"author": "Niftools team",
5151
"blender": (2, 82, 0),
52-
"version": (0, 0, 14), # can't read from VERSION, blender wants it hardcoded
52+
"version": (0, 1, 0), # can't read from VERSION, blender wants it hardcoded
5353
"api": 39257,
5454
"location": "File > Import-Export",
5555
"warning": "Generally stable port of the Niftool's Blender NifScripts, many improvements, still work in progress",
@@ -72,8 +72,8 @@ def locate_dependencies():
7272

7373
with open(os.path.join(current_dir, "VERSION.txt")) as version:
7474
NifLog.info(f"Loading: Blender Niftools Addon: {version.read()}")
75-
import pyffi
76-
NifLog.info(f"Loading: PyFFi: {pyffi.__version__}")
75+
import generated.formats.nif as NifFormat
76+
NifLog.info(f"Loading: NifFormat: {NifFormat.__xml_version__}") # todo [generated] update this and library to have actual versioning
7777

7878

7979
locate_dependencies()

io_scene_niftools/file_io/kf.py

Lines changed: 0 additions & 69 deletions
This file was deleted.

io_scene_niftools/file_io/nif.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,9 @@
3737
#
3838
# ***** END LICENSE BLOCK *****
3939

40+
import os.path as path
4041

41-
from pyffi.formats.nif import NifFormat
42+
import generated.formats.nif as NifFormat
4243

4344
from io_scene_niftools.utils.logging import NifLog, NifError
4445

@@ -51,18 +52,18 @@ def load_nif(file_path):
5152
"""Loads a nif from the given file path"""
5253
NifLog.info(f"Importing {file_path}")
5354

54-
data = NifFormat.Data()
55+
file_ext = path.splitext(file_path)[1]
5556

5657
# open file for binary reading
5758
with open(file_path, "rb") as nif_stream:
5859
# check if nif file is valid
59-
data.inspect_version_only(nif_stream)
60-
if data.version >= 0:
60+
modification, (version, user_version, bs_version) = NifFormat.NifFile.inspect_version_only(nif_stream)
61+
if version >= 0:
6162
# it is valid, so read the file
62-
NifLog.info(f"NIF file version: {data.version:x}")
63-
NifLog.info("Reading file")
64-
data.read(nif_stream)
65-
elif data.version == -1:
63+
NifLog.info(f"NIF file version: {version:x}")
64+
NifLog.info(f"Reading {file_ext} file")
65+
data = NifFormat.NifFile.from_stream(nif_stream)
66+
elif version == -1:
6667
raise NifError("Unsupported NIF version.")
6768
else:
6869
raise NifError("Not a NIF file.")

0 commit comments

Comments
 (0)