|
|
|
@ -303,6 +303,11 @@ class PlasmaMultiStageBehaviorNode(PlasmaNodeBase, bpy.types.Node):
|
|
|
|
|
"link_limit": 1, |
|
|
|
|
"spawn_empty": True, |
|
|
|
|
}), |
|
|
|
|
("condition", { |
|
|
|
|
"text": "Triggered By", |
|
|
|
|
"type": "PlasmaConditionSocket", |
|
|
|
|
"spawn_empty": True, |
|
|
|
|
}), |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
|
output_sockets = OrderedDict([ |
|
|
|
@ -311,6 +316,10 @@ class PlasmaMultiStageBehaviorNode(PlasmaNodeBase, bpy.types.Node):
|
|
|
|
|
"type": "PlasmaBehaviorSocket", |
|
|
|
|
"valid_link_nodes": {"PlasmaPythonFileNode"}, |
|
|
|
|
"spawn_empty": True, |
|
|
|
|
}), |
|
|
|
|
("satisfies", { |
|
|
|
|
"text": "Trigger", |
|
|
|
|
"type": "PlasmaConditionSocket", |
|
|
|
|
}) |
|
|
|
|
]) |
|
|
|
|
|
|
|
|
@ -326,7 +335,7 @@ class PlasmaMultiStageBehaviorNode(PlasmaNodeBase, bpy.types.Node):
|
|
|
|
|
if seek_target is not None: |
|
|
|
|
seek_object = exporter.mgr.find_create_object(plSceneObject, bl=seek_target) |
|
|
|
|
else: |
|
|
|
|
raise ExportError("'{}': MultiStage Behavior's seek point object is invalid".format(self._find_create_key(plMultistageBehMod, exporter, so=so).name)) |
|
|
|
|
self.raise_error("MultiStage Behavior's seek point object is invalid") |
|
|
|
|
else: |
|
|
|
|
seek_object = so |
|
|
|
|
|
|
|
|
@ -382,6 +391,14 @@ class PlasmaMultiStageBehaviorNode(PlasmaNodeBase, bpy.types.Node):
|
|
|
|
|
|
|
|
|
|
msbmod.addStage(animstage) |
|
|
|
|
|
|
|
|
|
receivers = ((i, i.get_key(exporter, so)) for i in self.find_outputs("satisfies")) |
|
|
|
|
for node, key in receivers: |
|
|
|
|
if key is not None: |
|
|
|
|
msbmod.addReceiver(key) |
|
|
|
|
else: |
|
|
|
|
exporter.report.warn("'{}' Node '{}' doesn't expose a key. It won't be triggered by '{}'!", |
|
|
|
|
node.bl_idname, node.name, self.name, indent=3) |
|
|
|
|
|
|
|
|
|
@property |
|
|
|
|
def requires_actor(self): |
|
|
|
|
return not self.find_input_socket("seek_target").is_linked |
|
|
|
|