|
|
@ -24,6 +24,17 @@ class PlasmaResponderNode(PlasmaNodeVariableInput, bpy.types.Node): |
|
|
|
bl_category = "LOGIC" |
|
|
|
bl_category = "LOGIC" |
|
|
|
bl_idname = "PlasmaResponderNode" |
|
|
|
bl_idname = "PlasmaResponderNode" |
|
|
|
bl_label = "Responder" |
|
|
|
bl_label = "Responder" |
|
|
|
|
|
|
|
bl_width_default = 145 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
detect_trigger = BoolProperty(name="Detect Trigger", |
|
|
|
|
|
|
|
description="When notified, trigger the Responder", |
|
|
|
|
|
|
|
default=True) |
|
|
|
|
|
|
|
detect_untrigger = BoolProperty(name="Detect UnTrigger", |
|
|
|
|
|
|
|
description="When notified, untrigger the Responder", |
|
|
|
|
|
|
|
default=False) |
|
|
|
|
|
|
|
no_ff_sounds = BoolProperty(name="Don't F-Fwd Sounds", |
|
|
|
|
|
|
|
description="When fast-forwarding, play sound effects", |
|
|
|
|
|
|
|
default=False) |
|
|
|
|
|
|
|
|
|
|
|
def init(self, context): |
|
|
|
def init(self, context): |
|
|
|
self.inputs.new("PlasmaConditionSocket", "Condition", "condition") |
|
|
|
self.inputs.new("PlasmaConditionSocket", "Condition", "condition") |
|
|
@ -32,6 +43,10 @@ class PlasmaResponderNode(PlasmaNodeVariableInput, bpy.types.Node): |
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
self.ensure_sockets("PlasmaConditionSocket", "Condition", "condition") |
|
|
|
self.ensure_sockets("PlasmaConditionSocket", "Condition", "condition") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
layout.prop(self, "detect_trigger") |
|
|
|
|
|
|
|
layout.prop(self, "detect_untrigger") |
|
|
|
|
|
|
|
layout.prop(self, "no_ff_sounds") |
|
|
|
|
|
|
|
|
|
|
|
def get_key(self, exporter, tree, so): |
|
|
|
def get_key(self, exporter, tree, so): |
|
|
|
return exporter.mgr.find_create_key(plResponderModifier, name=self.create_key_name(tree), so=so) |
|
|
|
return exporter.mgr.find_create_key(plResponderModifier, name=self.create_key_name(tree), so=so) |
|
|
|
|
|
|
|
|
|
|
@ -40,6 +55,13 @@ class PlasmaResponderNode(PlasmaNodeVariableInput, bpy.types.Node): |
|
|
|
if not bo.plasma_net.manual_sdl: |
|
|
|
if not bo.plasma_net.manual_sdl: |
|
|
|
responder.setExclude("Responder") |
|
|
|
responder.setExclude("Responder") |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if self.detect_trigger: |
|
|
|
|
|
|
|
responder.flags |= plResponderModifier.kDetectTrigger |
|
|
|
|
|
|
|
if self.detect_untrigger: |
|
|
|
|
|
|
|
responder.flags |= plResponderModifier.kDetectUnTrigger |
|
|
|
|
|
|
|
if self.no_ff_sounds: |
|
|
|
|
|
|
|
responder.flags |= plResponderModifier.kSkipFFSound |
|
|
|
|
|
|
|
|
|
|
|
class ResponderStateMgr: |
|
|
|
class ResponderStateMgr: |
|
|
|
def __init__(self, respNode, respMod): |
|
|
|
def __init__(self, respNode, respMod): |
|
|
|
self.states = [] |
|
|
|
self.states = [] |
|
|
|