Skip to content

Commit 0305c8d

Browse files
authored
Merge pull request #615 from niftools/develop
Develop to master
2 parents c649495 + 33cff83 commit 0305c8d

Some content is hidden

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

67 files changed

+714
-413
lines changed

CHANGELOG.rst

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,30 @@
1-
Version v0.1.00
1+
Version v0.1.1
2+
===============
3+
4+
- #591 Expansion of DisplayList processing and small fixes.
5+
- Rigged meshes with DisplayLists will now have functional weights.
6+
- 4-component normals are now handled correctly for DisplayLists.
7+
- Added multiple UV layer support for DisplayLists.
8+
- Rudimentary support for Fallout NV (Fallout New Vegas) by treating it the same as Fallout 3.
9+
- Fixes #582
10+
- Fixes #589
11+
- Fix for animation support for Shin Megami Tensei: Imagine.
12+
- Fixes #584
13+
- Fixes #554 and overhauls/isolates the way the nif geometry data is obtained during export.
14+
- Added option for splitting on tangents (did not happen before). Needs to be disabled for Oblivion head meshes.
15+
- Warn rather than silent fail during egm import.
16+
- Export: Move UV coordinates that are completely in another UV tile to the 0-1 tile.
17+
- Added support for weighted Fallout 4 meshes, fixing #598
18+
- Fixes #599
19+
- Fixes #600
20+
- Add exported tangents to Bully SE.
21+
- Always return copy for get_object_bind to prevent accidental modification.
22+
- Added support for basic (unweighted) Skyrim SE export.
23+
- Change generated module name from generated to nifgen to prevent collision with cobra-tools.
24+
- #592 Update to documentation
25+
- #593 Supported export for Sid Meier's Pirates!.
26+
27+
Version v0.1.0
228
===============
329

430
- #576 Updates to documentation, changelog and makezip.bat (copies over generated folder from cobra-tools).

install/install.bat

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ for %%I in ("%DIR%\..") do set "ROOT=%%~fI"
99
set "NAME=blender_niftools_addon"
1010
set /p VERSION=<%ROOT%\io_scene_niftools\VERSION.txt
1111
for /f %%i in ('git rev-parse --short HEAD') do set HASH=%%i
12-
for /f %%i in ('echo %date%') do set DATE=%%i
12+
:: Use PowerShell to get current date in YYYY-MM-DD format independent of local format
13+
for /f %%i in ('powershell -executionpolicy bypass -Command Get-Date -Format "yyyy-MM-dd"') do set DATE=%%i
1314
set "ZIP_NAME=%NAME%-%VERSION%-%DATE%-%HASH%"
1415

1516
if "%BLENDER_ADDONS_DIR%" == "" if not exist "%BLENDER_ADDONS_DIR%" (

install/makezip.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ mkdir "%DEPS%"
2626

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

29-
xcopy "%GENERATED_FOLDER%" "%DEPS%\generated" /s /q /i
29+
xcopy "%GENERATED_FOLDER%" "%DEPS%\nifgen" /s /q /i
3030

3131
xcopy "%ROOT%"\AUTHORS.rst io_scene_niftools
3232
xcopy "%ROOT%"\CHANGELOG.rst io_scene_niftools

install/makezip.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ echo "Creating dependencies folder ${DEPS_OUT:-${BUILD_DIR}/dependencies}"
3434
python -m pip install "PyFFI==${PYFFI_VERSION}" --target="${DEPS_OUT:-${BUILD_DIR}/dependencies}"
3535

3636
echo "Copying loose files"
37-
cp -r "$GENERATED_FOLDER" "${DEPS_OUT:-${BUILD_DIR}/dependencies}/generated"
37+
cp -r "$GENERATED_FOLDER" "${DEPS_OUT:-${BUILD_DIR}/dependencies}/nifgen"
3838
cp "${ROOT}"/AUTHORS.rst "${ADDON_OUT}"
3939
cp "${ROOT}"/CHANGELOG.rst "${ADDON_OUT}"
4040
cp "${ROOT}"/LICENSE.rst "${ADDON_OUT}"

install/zip.ps1

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,20 @@ write ("Existing archive removed successfully")
1313
}
1414

1515
Add-Type -assembly "system.io.compression.filesystem"
16-
[io.compression.zipfile]::CreateFromDirectory($source, $destination, 1, 1)
16+
17+
$EncoderClass=@"
18+
public class FixedEncoder : System.Text.UTF8Encoding {
19+
public FixedEncoder() : base(true) { }
20+
public override byte[] GetBytes(string s) {
21+
s = s.Replace("\\", "/");
22+
return base.GetBytes(s);
23+
}
24+
}
25+
"@
26+
Add-Type -TypeDefinition $EncoderClass
27+
28+
$Encoder = New-Object FixedEncoder
29+
[io.compression.zipfile]::CreateFromDirectory($source, $destination, 1, 1, $Encoder)
1730
If(Test-path $destination) {
1831
write("File successully written")
1932
}

io_scene_niftools/VERSION.txt

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

io_scene_niftools/__init__.py

Lines changed: 2 additions & 2 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, 1, 0), # can't read from VERSION, blender wants it hardcoded
52+
"version": (0, 1, 1), # 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,7 +72,7 @@ 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 generated.formats.nif as NifFormat
75+
import nifgen.formats.nif as NifFormat
7676
NifLog.info(f"Loading: NifFormat: {NifFormat.__xml_version__}") # todo [generated] update this and library to have actual versioning
7777

7878

io_scene_niftools/egm_import.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ def execute(self):
6969
b_obj = bpy.context.view_layer.objects.active
7070
if b_obj and b_obj.type == "MESH":
7171
self.morph_anim.import_egm_morphs(b_obj)
72+
else:
73+
NifLog.warn(f'Selected object {b_obj.name} is not a mesh object, nothing will be imported.')
7274
except NifError:
7375
return {'CANCELLED'}
7476

io_scene_niftools/file_io/nif.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
import os.path as path
4141

42-
import generated.formats.nif as NifFormat
42+
import nifgen.formats.nif as NifFormat
4343

4444
from io_scene_niftools.utils.logging import NifLog, NifError
4545

io_scene_niftools/kf_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def execute(self):
8989
data.neosteam = (bpy.context.scene.niftools_scene.game == 'NEOSTEAM')
9090

9191
# scale correction for the skeleton
92-
self.apply_scale(data, round(1 / NifOp.props.scale_correction))
92+
self.apply_scale(data, 1 / NifOp.props.scale_correction)
9393

9494
data.validate()
9595

0 commit comments

Comments
 (0)