aboutsummaryrefslogtreecommitdiff
path: root/behaviors/LocationMask.py
blob: 51eafeb54ff9bf621fb7bf5cb1de261db5a3b763 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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, [])