From b255902b9ed86a460a859887c1d8ba02b93bbe14 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 10 Jul 2015 22:43:47 -0400 Subject: [PATCH] Only apply mass = 1 to animated physicals --- korman/exporter/physics.py | 4 ---- korman/properties/modifiers/anim.py | 4 ++++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/korman/exporter/physics.py b/korman/exporter/physics.py index cd95698..e0e52c6 100644 --- a/korman/exporter/physics.py +++ b/korman/exporter/physics.py @@ -74,10 +74,6 @@ class PhysicsConverter: simIface = self._mgr.add_object(pl=plSimulationInterface, bl=bo) physical = self._mgr.add_object(pl=plGenericPhysical, bl=bo, name=name) - # libHSPlasma's default mass is evil. The issue is that CWE will only do PhysAnim - # aka non dynamic animated physicals if the mass != 0. The user can override this. - physical.mass = 1.0 - simIface.physical = physical.key physical.object = so.key physical.sceneNode = self._mgr.get_scene_node(bl=bo) diff --git a/korman/properties/modifiers/anim.py b/korman/properties/modifiers/anim.py index cff916e..dfce8c8 100644 --- a/korman/properties/modifiers/anim.py +++ b/korman/properties/modifiers/anim.py @@ -137,6 +137,10 @@ class PlasmaAnimationModifier(PlasmaModifierProperties): phys = sim.physical.object phys.setProperty(plSimulationInterface.kPhysAnim, True) + # If the mass is zero, then we will fail to animate. Fix that. + if phys.mass == 0.0: + phys.mass = 1.0 + class LoopMarker(bpy.types.PropertyGroup): loop_name = StringProperty(name="Loop Name",