Browse Source

BREAKING CHANGE: Renamed the enum keys in volume sensor node.

This is to make the code simpler--I doubt anyone actually used this
anyway.
pull/175/head
Adam Johnson 5 years ago
parent
commit
be9c30b7f8
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 13
      korman/nodes/node_conditions.py

13
korman/nodes/node_conditions.py

@ -344,9 +344,9 @@ class PlasmaVolumeSensorNode(idprops.IDPropObjectMixin, PlasmaNodeBase, bpy.type
report_on = EnumProperty(name="Triggerers", report_on = EnumProperty(name="Triggerers",
description="What triggers this region?", description="What triggers this region?",
options={"ANIMATABLE", "ENUM_FLAG"}, options={"ANIMATABLE", "ENUM_FLAG"},
items=[("avatar", "Avatars", "Avatars trigger this region"), items=[("kGroupAvatar", "Avatars", "Avatars trigger this region"),
("dynamics", "Dynamics", "Any non-avatar dynamic physical object (eg kickables)")], ("kGroupDynamic", "Dynamics", "Any non-avatar dynamic physical object (eg kickables)")],
default={"avatar"}) default={"kGroupAvatar"})
input_sockets = OrderedDict([ input_sockets = OrderedDict([
("enter", { ("enter", {
@ -428,14 +428,9 @@ class PlasmaVolumeSensorNode(idprops.IDPropObjectMixin, PlasmaNodeBase, bpy.type
interface.addIntfKey(key) interface.addIntfKey(key)
# Don't forget to export the physical object itself! # Don't forget to export the physical object itself!
report_groups = []
if "avatar" in self.report_on:
report_groups.append("kGroupAvatar")
if "dynamics" in self.report_on:
report_groups.append("kGroupDynamics")
exporter.physics.generate_physical(region_bo, region_so, bounds=self.bounds, exporter.physics.generate_physical(region_bo, region_so, bounds=self.bounds,
member_group="kGroupDetector", member_group="kGroupDetector",
report_groups=report_groups) report_groups=self.report_on)
def _export_volume_event(self, exporter, bo, so, event, settings): def _export_volume_event(self, exporter, bo, so, event, settings):
if event == plVolumeSensorConditionalObject.kTypeEnter: if event == plVolumeSensorConditionalObject.kTypeEnter:

Loading…
Cancel
Save