From ca8e07567281400c3504a45c6db1a7650be4d3fc Mon Sep 17 00:00:00 2001 From: HENDRIX-ZT2 Date: Fri, 13 Sep 2019 16:14:36 +0200 Subject: [PATCH] Fix: Import bhkLimitedHingeConstraint Had no attribute sub_constraint, causing import to fail due to apply_scale() being called on it. --- pyffi/formats/nif/__init__.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pyffi/formats/nif/__init__.py b/pyffi/formats/nif/__init__.py index 849866cab..9afd36842 100644 --- a/pyffi/formats/nif/__init__.py +++ b/pyffi/formats/nif/__init__.py @@ -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):