|
|
@ -15,6 +15,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
import bpy |
|
|
|
import bpy |
|
|
|
from bpy.props import * |
|
|
|
from bpy.props import * |
|
|
|
|
|
|
|
from collections import OrderedDict |
|
|
|
import math |
|
|
|
import math |
|
|
|
from PyHSPlasma import * |
|
|
|
from PyHSPlasma import * |
|
|
|
|
|
|
|
|
|
|
@ -37,32 +38,32 @@ class PlasmaClickableNode(PlasmaNodeBase, bpy.types.Node): |
|
|
|
items=bounds_types, |
|
|
|
items=bounds_types, |
|
|
|
default="hull") |
|
|
|
default="hull") |
|
|
|
|
|
|
|
|
|
|
|
input_sockets = { |
|
|
|
input_sockets = OrderedDict([ |
|
|
|
"region": { |
|
|
|
("region", { |
|
|
|
"text": "Avatar Inside Region", |
|
|
|
"text": "Avatar Inside Region", |
|
|
|
"type": "PlasmaClickableRegionSocket", |
|
|
|
"type": "PlasmaClickableRegionSocket", |
|
|
|
}, |
|
|
|
}), |
|
|
|
"facing": { |
|
|
|
("facing", { |
|
|
|
"text": "Avatar Facing Target", |
|
|
|
"text": "Avatar Facing Target", |
|
|
|
"type": "PlasmaFacingTargetSocket", |
|
|
|
"type": "PlasmaFacingTargetSocket", |
|
|
|
}, |
|
|
|
}), |
|
|
|
"enable_callback": { |
|
|
|
("enable_callback", { |
|
|
|
"text": "Local Reenable", |
|
|
|
"text": "Local Reenable", |
|
|
|
"type": "PlasmaRespCommandSocket", |
|
|
|
"type": "PlasmaRespCommandSocket", |
|
|
|
"spawn_empty": True, |
|
|
|
"spawn_empty": True, |
|
|
|
} |
|
|
|
}), |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
output_sockets = { |
|
|
|
output_sockets = OrderedDict([ |
|
|
|
"keyref": { |
|
|
|
("keyref", { |
|
|
|
"text": "References", |
|
|
|
"text": "References", |
|
|
|
"type": "PlasmaPythonReferenceNodeSocket", |
|
|
|
"type": "PlasmaPythonReferenceNodeSocket", |
|
|
|
}, |
|
|
|
}), |
|
|
|
"satisfies": { |
|
|
|
("satisfies", { |
|
|
|
"text": "Satisfies", |
|
|
|
"text": "Satisfies", |
|
|
|
"type": "PlasmaConditionSocket", |
|
|
|
"type": "PlasmaConditionSocket", |
|
|
|
}, |
|
|
|
}), |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
layout.prop_search(self, "clickable", bpy.data, "objects", icon="MESH_DATA") |
|
|
|
layout.prop_search(self, "clickable", bpy.data, "objects", icon="MESH_DATA") |
|
|
@ -155,12 +156,12 @@ class PlasmaClickableRegionNode(PlasmaNodeBase, bpy.types.Node): |
|
|
|
items=bounds_types, |
|
|
|
items=bounds_types, |
|
|
|
default="hull") |
|
|
|
default="hull") |
|
|
|
|
|
|
|
|
|
|
|
output_sockets = { |
|
|
|
output_sockets = OrderedDict([ |
|
|
|
"satisfies": { |
|
|
|
("satisfies", { |
|
|
|
"text": "Satisfies", |
|
|
|
"text": "Satisfies", |
|
|
|
"type": "PlasmaClickableRegionSocket", |
|
|
|
"type": "PlasmaClickableRegionSocket", |
|
|
|
} |
|
|
|
}), |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
layout.prop_search(self, "region", bpy.data, "objects", icon="MESH_DATA") |
|
|
|
layout.prop_search(self, "region", bpy.data, "objects", icon="MESH_DATA") |
|
|
@ -221,12 +222,12 @@ class PlasmaFacingTargetNode(PlasmaNodeBase, bpy.types.Node): |
|
|
|
description="How far away from the target the avatar can turn (in degrees)", |
|
|
|
description="How far away from the target the avatar can turn (in degrees)", |
|
|
|
min=-180, max=180, default=45) |
|
|
|
min=-180, max=180, default=45) |
|
|
|
|
|
|
|
|
|
|
|
output_sockets = { |
|
|
|
output_sockets = OrderedDict([ |
|
|
|
"satisfies": { |
|
|
|
("satisfies", { |
|
|
|
"text": "Satisfies", |
|
|
|
"text": "Satisfies", |
|
|
|
"type": "PlasmaFacingTargetSocket", |
|
|
|
"type": "PlasmaFacingTargetSocket", |
|
|
|
}, |
|
|
|
}), |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
layout.prop(self, "directional") |
|
|
|
layout.prop(self, "directional") |
|
|
@ -296,13 +297,13 @@ class PlasmaVolumeReportNode(PlasmaNodeBase, bpy.types.Node): |
|
|
|
description="How many objects should be in the region for it to trigger", |
|
|
|
description="How many objects should be in the region for it to trigger", |
|
|
|
min=1) |
|
|
|
min=1) |
|
|
|
|
|
|
|
|
|
|
|
output_sockets = { |
|
|
|
output_sockets = OrderedDict([ |
|
|
|
"settings": { |
|
|
|
("settings", { |
|
|
|
"text": "Trigger Settings", |
|
|
|
"text": "Trigger Settings", |
|
|
|
"type": "PlasmaVolumeSettingsSocketOut", |
|
|
|
"type": "PlasmaVolumeSettingsSocketOut", |
|
|
|
"valid_link_sockets": {"PlasmaVolumeSettingsSocketIn"}, |
|
|
|
"valid_link_sockets": {"PlasmaVolumeSettingsSocketIn"}, |
|
|
|
}, |
|
|
|
}), |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
layout.prop(self, "report_when") |
|
|
|
layout.prop(self, "report_when") |
|
|
@ -336,30 +337,30 @@ class PlasmaVolumeSensorNode(PlasmaNodeBase, bpy.types.Node): |
|
|
|
("dynamics", "Dynamics", "Any non-avatar dynamic physical object (eg kickables)")], |
|
|
|
("dynamics", "Dynamics", "Any non-avatar dynamic physical object (eg kickables)")], |
|
|
|
default={"avatar"}) |
|
|
|
default={"avatar"}) |
|
|
|
|
|
|
|
|
|
|
|
input_sockets = { |
|
|
|
input_sockets = OrderedDict([ |
|
|
|
"enter": { |
|
|
|
("enter", { |
|
|
|
"text": "Trigger on Enter", |
|
|
|
"text": "Trigger on Enter", |
|
|
|
"type": "PlasmaVolumeSettingsSocketIn", |
|
|
|
"type": "PlasmaVolumeSettingsSocketIn", |
|
|
|
"valid_link_sockets": {"PlasmaVolumeSettingsSocketOut"}, |
|
|
|
"valid_link_sockets": {"PlasmaVolumeSettingsSocketOut"}, |
|
|
|
}, |
|
|
|
}), |
|
|
|
"exit": { |
|
|
|
("exit", { |
|
|
|
"text": "Trigger on Exit", |
|
|
|
"text": "Trigger on Exit", |
|
|
|
"type": "PlasmaVolumeSettingsSocketIn", |
|
|
|
"type": "PlasmaVolumeSettingsSocketIn", |
|
|
|
"valid_link_sockets": {"PlasmaVolumeSettingsSocketOut"}, |
|
|
|
"valid_link_sockets": {"PlasmaVolumeSettingsSocketOut"}, |
|
|
|
}, |
|
|
|
}), |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
output_sockets = { |
|
|
|
output_sockets = OrderedDict([ |
|
|
|
"keyref": { |
|
|
|
("keyref", { |
|
|
|
"text": "References", |
|
|
|
"text": "References", |
|
|
|
"type": "PlasmaPythonReferenceNodeSocket", |
|
|
|
"type": "PlasmaPythonReferenceNodeSocket", |
|
|
|
"valid_link_nodes": {"PlasmaPythonFileNode"}, |
|
|
|
"valid_link_nodes": {"PlasmaPythonFileNode"}, |
|
|
|
}, |
|
|
|
}), |
|
|
|
"satisfies": { |
|
|
|
("satisfies", { |
|
|
|
"text": "Satisfies", |
|
|
|
"text": "Satisfies", |
|
|
|
"type": "PlasmaConditionSocket", |
|
|
|
"type": "PlasmaConditionSocket", |
|
|
|
}, |
|
|
|
}), |
|
|
|
} |
|
|
|
]) |
|
|
|
|
|
|
|
|
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
def draw_buttons(self, context, layout): |
|
|
|
layout.prop(self, "report_on") |
|
|
|
layout.prop(self, "report_on") |
|
|
|