diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 97615b9c6b4a6cea89d737407205d813d660cd63..8dd3977b0dfd923d15156aeeb19afd42fa274a93 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,3 +1,16 @@ +Version v0.0.14 +=============== + +- #512 Two small Collision fixes + - Fix for importing an empty (convex) collision shape + - Closes #499 by moving it to a setting rather than using the collision physics property. + - Closes #511 Blender 3.1 python errors importing and exporting collisions +- #497 Slight fix for triangle assignment to bodypart on partition import + - Added warning for too many bones per partition (since some games will crash with that + - Closes #496 "Some polygons of Parthurnax not assigned to any body part." error on unmodified model +- #505 Import animation by default + + Version v0.0.13 ============== diff --git a/io_scene_niftools/VERSION.txt b/io_scene_niftools/VERSION.txt index 71ad83c0c2efc9bf5a6380f80e4afbf96c79279f..67788826d4485cdb0e441a8c19d4221e4fd8c5a1 100644 --- a/io_scene_niftools/VERSION.txt +++ b/io_scene_niftools/VERSION.txt @@ -1 +1 @@ -v0.0.13 \ No newline at end of file +v0.0.14 \ No newline at end of file diff --git a/io_scene_niftools/__init__.py b/io_scene_niftools/__init__.py index ceb27b8690ab68f4dc9c1a204ae55d7ba2628959..26f8138a135735e6d838e95ce28b07e8c4216959 100644 --- a/io_scene_niftools/__init__.py +++ b/io_scene_niftools/__init__.py @@ -49,7 +49,7 @@ bl_info = { "description": "Import and export files in the NetImmerse/Gamebryo formats (.nif, .kf, .egm)", "author": "Niftools team", "blender": (2, 82, 0), - "version": (0, 0, 13), # can't read from VERSION, blender wants it hardcoded + "version": (0, 0, 14), # can't read from VERSION, blender wants it hardcoded "api": 39257, "location": "File > Import-Export", "warning": "Generally stable port of the Niftool's Blender NifScripts, many improvements, still work in progress", diff --git a/io_scene_niftools/modules/nif_export/collision/havok.py b/io_scene_niftools/modules/nif_export/collision/havok.py index aeaca69de43b52afa85dd267f1791967ea7b940d..9f36dcdeb0d2472d9bc41c296dc3d7d1991b9986 100644 --- a/io_scene_niftools/modules/nif_export/collision/havok.py +++ b/io_scene_niftools/modules/nif_export/collision/havok.py @@ -173,7 +173,7 @@ class BhkCollision(Collision): n_r_body.restitution = b_r_body.restitution n_r_body.max_linear_velocity = b_obj.nifcollision.max_linear_velocity n_r_body.max_angular_velocity = b_obj.nifcollision.max_angular_velocity - n_r_body.penetration_depth = b_obj.collision.permeability + n_r_body.penetration_depth = b_obj.nifcollision.penetration_depth n_r_body.motion_system = b_obj.nifcollision.motion_system n_r_body.deactivator_type = b_obj.nifcollision.deactivator_type n_r_body.solver_deactivation = b_obj.nifcollision.solver_deactivation diff --git a/io_scene_niftools/modules/nif_import/collision/havok.py b/io_scene_niftools/modules/nif_import/collision/havok.py index c3f1b39476b6647c47bdd98302243b38ecf0b34e..fa4e4be749807e6d42e8086690de44b004f50830 100644 --- a/io_scene_niftools/modules/nif_import/collision/havok.py +++ b/io_scene_niftools/modules/nif_import/collision/havok.py @@ -197,7 +197,7 @@ class BhkCollision(Collision): b_r_body.deactivate_angular_velocity = mathutils.Vector([ang_vel.w, ang_vel.x, ang_vel.y, ang_vel.z]).magnitude # Custom Niftools properties - b_col_obj.collision.permeability = bhkshape.penetration_depth + b_col_obj.nifcollision.penetration_depth = bhkshape.penetration_depth b_col_obj.nifcollision.deactivator_type = NifFormat.DeactivatorType._enumkeys[bhkshape.deactivator_type] b_col_obj.nifcollision.solver_deactivation = NifFormat.SolverDeactivation._enumkeys[bhkshape.solver_deactivation] b_col_obj.nifcollision.max_linear_velocity = bhkshape.max_linear_velocity @@ -269,7 +269,11 @@ class BhkCollision(Collision): # find vertices (and fix scale) scaled_verts = [(self.HAVOK_SCALE * n_vert.x, self.HAVOK_SCALE * n_vert.y, self.HAVOK_SCALE * n_vert.z) for n_vert in bhk_shape.vertices] - verts, faces = qhull3d(scaled_verts) + if scaled_verts: + verts, faces = qhull3d(scaled_verts) + else: + verts = [] + faces = [] b_obj = Object.mesh_from_data("convexpoly", verts, faces) radius = bhk_shape.radius * self.HAVOK_SCALE diff --git a/io_scene_niftools/properties/collision.py b/io_scene_niftools/properties/collision.py index 877a9550a7392e6614127abeb0a0a39c058a52d1..dd938c22e5fee2ffac22ec3e46e9e8a3aa540d89 100644 --- a/io_scene_niftools/properties/collision.py +++ b/io_scene_niftools/properties/collision.py @@ -82,6 +82,12 @@ class CollisionProperty(PropertyGroup): items=game_specific_col_layer_items, ) + penetration_depth: FloatProperty( + name='Penetration Depth', + description='The maximum allowed penetration for this object.', + default=0.15 + ) + deactivator_type: EnumProperty( name='Deactivator Type', description='Motion deactivation setting',