|
|
@ -131,8 +131,7 @@ class PlasmaAnimationModifier(PlasmaModifierProperties): |
|
|
|
def key_name(self): |
|
|
|
def key_name(self): |
|
|
|
return "{}_(Entire Animation)".format(self.id_data.name) |
|
|
|
return "{}_(Entire Animation)".format(self.id_data.name) |
|
|
|
|
|
|
|
|
|
|
|
def post_export(self, exporter, bo, so): |
|
|
|
def _make_physical_movable(self, so): |
|
|
|
# If this object has a physical, we need to tell the simulation iface that it can be animated |
|
|
|
|
|
|
|
sim = so.sim |
|
|
|
sim = so.sim |
|
|
|
if sim is not None: |
|
|
|
if sim is not None: |
|
|
|
sim = sim.object |
|
|
|
sim = sim.object |
|
|
@ -144,6 +143,18 @@ class PlasmaAnimationModifier(PlasmaModifierProperties): |
|
|
|
if phys.mass == 0.0: |
|
|
|
if phys.mass == 0.0: |
|
|
|
phys.mass = 1.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): |
|
|
|
class AnimGroupObject(bpy.types.PropertyGroup): |
|
|
|
object_name = StringProperty(name="Child", |
|
|
|
object_name = StringProperty(name="Child", |
|
|
|