aboutsummaryrefslogtreecommitdiff
path: root/behaviors/LocationMask.py
diff options
context:
space:
mode:
Diffstat (limited to 'behaviors/LocationMask.py')
-rw-r--r--behaviors/LocationMask.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/behaviors/LocationMask.py b/behaviors/LocationMask.py
new file mode 100644
index 0000000..51eafeb
--- /dev/null
+++ b/behaviors/LocationMask.py
@@ -0,0 +1,19 @@
+from operationscore.Behavior import *
+
+class LocationMask (Behavior):
+ """Modifies Pixels such that only ones in the pixels specified by the "location"
+ argument will show"""
+
+ def processResponse(self, inputs, state):
+
+ ret = []
+ inputs = list(inputs)
+
+ for inputset in inputs:
+ inputset = dict(inputset)
+
+ inputset['Location'] += '@' + self['Location']
+
+ ret.append(inputset)
+
+ return (ret, [])