From e65f7a3965bc78a5e65cb08c4eae5a5061f519d7 Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 19 Jun 2016 19:43:55 -0400 Subject: [PATCH] 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. --- korman/nodes/node_responder.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/korman/nodes/node_responder.py b/korman/nodes/node_responder.py index a052eb3..d60e661 100644 --- a/korman/nodes/node_responder.py +++ b/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 not, we'll export our children and tell them to not actually wait on us. - haveChildren = self.find_output("trigger", "PlasmaResponderCommandNode") is not None - if haveChildren and msgNode.has_callbacks: + haveChildren = self.find_output("trigger", "PlasmaResponderCommandNode") is not None or + self.find_outputs("reenable") + if msgNode.has_callbacks and haveChildren: childWaitOn = commandMgr.add_wait(idx) msgNode.convert_callback_message(exporter, so, msg, responder.key, childWaitOn) else: