Skip to content

Commit

Permalink
Fix: Import bhkLimitedHingeConstraint
Browse files Browse the repository at this point in the history
Had no attribute sub_constraint, causing import to fail due to apply_scale() being called on it.
  • Loading branch information
HENDRIX-ZT2 committed Sep 13, 2019
1 parent bf7d277 commit ca8e075
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pyffi/formats/nif/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2335,17 +2335,17 @@ class bhkLimitedHingeConstraint:
def apply_scale(self, scale):
"""Scale data."""
# apply scale on transform
self.sub_constraint.limited_hinge.pivot_a.x *= scale
self.sub_constraint.limited_hinge.pivot_a.y *= scale
self.sub_constraint.limited_hinge.pivot_a.z *= scale
self.sub_constraint.limited_hinge.pivot_b.x *= scale
self.sub_constraint.limited_hinge.pivot_b.y *= scale
self.sub_constraint.limited_hinge.pivot_b.z *= scale
self.limited_hinge.pivot_a.x *= scale
self.limited_hinge.pivot_a.y *= scale
self.limited_hinge.pivot_a.z *= scale
self.limited_hinge.pivot_b.x *= scale
self.limited_hinge.pivot_b.y *= scale
self.limited_hinge.pivot_b.z *= scale

def update_a_b(self, parent):
"""Update the B data from the A data. The parent argument is simply a
common parent to the entities."""
self.sub_constraint.limited_hinge.update_a_b(self.get_transform_a_b(parent))
self.limited_hinge.update_a_b(self.get_transform_a_b(parent))

class bhkListShape:
def get_mass_center_inertia(self, density = 1, solid = True):
Expand Down

0 comments on commit ca8e075

Please sign in to comment.