Skip to content
Snippets Groups Projects
Commit f1a360fe authored by Grant Kim's avatar Grant Kim
Browse files
parents a1fd2a04 e8ede448
No related branches found
No related tags found
No related merge requests found
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
==============
......
v0.0.13
\ No newline at end of file
v0.0.14
\ No newline at end of file
......@@ -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",
......
......@@ -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
......
......@@ -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
......
......@@ -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',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment