Browse Source

Fix a wait bug in Responder Command reenabling

Responder commands now wait until the current command finishes, even if
the command is the last in the chain. Previously, the final command would
reenable the logic modifier when the penultimate command finished.
pull/38/head
Adam Johnson 9 years ago
parent
commit
e65f7a3965
  1. 5
      korman/nodes/node_responder.py

5
korman/nodes/node_responder.py

@ -256,8 +256,9 @@ class PlasmaResponderCommandNode(PlasmaNodeBase, bpy.types.Node):
# If we have child commands, we need to make sure that we support chaining this message as a callback # If we have child commands, we need to make sure that we support chaining this message as a callback
# If not, we'll export our children and tell them to not actually wait on us. # If not, we'll export our children and tell them to not actually wait on us.
haveChildren = self.find_output("trigger", "PlasmaResponderCommandNode") is not None haveChildren = self.find_output("trigger", "PlasmaResponderCommandNode") is not None or
if haveChildren and msgNode.has_callbacks: self.find_outputs("reenable")
if msgNode.has_callbacks and haveChildren:
childWaitOn = commandMgr.add_wait(idx) childWaitOn = commandMgr.add_wait(idx)
msgNode.convert_callback_message(exporter, so, msg, responder.key, childWaitOn) msgNode.convert_callback_message(exporter, so, msg, responder.key, childWaitOn)
else: else:

Loading…
Cancel
Save