From 011aa017ac32b0ac7847251e64e17f800728213a Mon Sep 17 00:00:00 2001 From: Darryl Pogue Date: Fri, 21 Aug 2020 22:53:19 -0700 Subject: [PATCH] Add support for pushable objects I assume these are going to be necessary if we want to add the ball back to the Watcher's Pub. --- korman/exporter/physics.py | 2 ++ korman/properties/modifiers/physics.py | 1 + korman/ui/modifiers/physics.py | 3 +++ 3 files changed, 6 insertions(+) diff --git a/korman/exporter/physics.py b/korman/exporter/physics.py index d13f221..d808bf5 100644 --- a/korman/exporter/physics.py +++ b/korman/exporter/physics.py @@ -175,6 +175,8 @@ class PhysicsConverter: physical.mass = mod.mass _set_phys_prop(plSimulationInterface.kStartInactive, simIface, physical, value=mod.start_asleep) + _set_phys_prop(plSimulationInterface.kAvAnimPushable, simIface, physical, + value=mod.pushable) elif not mod.avatar_blocker: physical.memberGroup = plSimDefs.kGroupLOSOnly else: diff --git a/korman/properties/modifiers/physics.py b/korman/properties/modifiers/physics.py index f561144..643893a 100644 --- a/korman/properties/modifiers/physics.py +++ b/korman/properties/modifiers/physics.py @@ -61,6 +61,7 @@ class PlasmaCollider(PlasmaModifierProperties): dynamic = BoolProperty(name="Dynamic", description="Object can be influenced by other objects (ie is kickable)", default=False) mass = FloatProperty(name="Mass", description="Mass of object in pounds", min=0.0, default=1.0) start_asleep = BoolProperty(name="Start Asleep", description="Object is not active until influenced by another object", default=False) + pushable = BoolProperty(name="Pushable", description="Object can be pushed by the avatar (with pushing animation)", default=False) def export(self, exporter, bo, so): # All modifier properties are examined by this little stinker... diff --git a/korman/ui/modifiers/physics.py b/korman/ui/modifiers/physics.py index 615e476..4208860 100644 --- a/korman/ui/modifiers/physics.py +++ b/korman/ui/modifiers/physics.py @@ -34,6 +34,9 @@ def collision(modifier, layout, context): row = col.row() row.active = modifier.dynamic row.prop(modifier, "start_asleep") + row = col.row() + row.active = modifier.dynamic + row.prop(modifier, "pushable") col = split.column() col.active = modifier.dynamic