|
|
|
@ -60,10 +60,6 @@ class PlasmaAnimationModifier(ActionModifier, PlasmaModifierProperties):
|
|
|
|
|
loop_end = StringProperty(name="Loop End", |
|
|
|
|
description="Marker indicating where the default loop ends") |
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
def requires_actor(self): |
|
|
|
|
return True |
|
|
|
|
|
|
|
|
|
def export(self, exporter, bo, so): |
|
|
|
|
action = self.blender_action |
|
|
|
|
|
|
|
|
@ -95,30 +91,6 @@ class PlasmaAnimationModifier(ActionModifier, PlasmaModifierProperties):
|
|
|
|
|
atcanim.loopStart = atcanim.start |
|
|
|
|
atcanim.loopEnd = atcanim.end |
|
|
|
|
|
|
|
|
|
def _make_physical_movable(self, so): |
|
|
|
|
sim = so.sim |
|
|
|
|
if sim is not None: |
|
|
|
|
sim = sim.object |
|
|
|
|
sim.setProperty(plSimulationInterface.kPhysAnim, True) |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
# set kPinned so it doesn't fall through |
|
|
|
|
sim.setProperty(plSimulationInterface.kPinned, True) |
|
|
|
|
phys.setProperty(plSimulationInterface.kPinned, True) |
|
|
|
|
|
|
|
|
|
# Do the same for children objects |
|
|
|
|
for child in so.coord.object.children: |
|
|
|
|
self.make_physical_movable(child.object) |
|
|
|
|
|
|
|
|
|
def post_export(self, exporter, bo, so): |
|
|
|
|
# If this object has a physical, we need to tell the simulation iface that it can be animated |
|
|
|
|
self._make_physical_movable(so) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AnimGroupObject(bpy.types.PropertyGroup): |
|
|
|
|
object_name = StringProperty(name="Child", |
|
|
|
|