示例#1
0
    def add(self, plugs, rs):
        if not Inspect.isSeq(plugs):
            plugs = [plugs]

        rs.useAnimatedValues = False
        for p in plugs:
            self.copyPlug(p)

        if self._anims:
            self.copyAnims(rs)
示例#2
0
    def setCurrentTask(self, target):
        if Inspect.isNumber(target):
            targetId = target
            target = self.getTaskName(targetId)
        else:
            targetId = self.getTaskId(target)

        self.debug('Setting task {0} #{1}', target, targetId)

        url = "{0}/quick.php?user={1}&start_id={2}"
        url = url.format(self.tt_service, self.tt_user, targetId)

        self.debug(url)
        urllib2.urlopen(url)
示例#3
0
    def renderFrames(self):
        print "search render frames"
        settings = self.outputSettings
        print settings

        if not settings:
            return [0, 0]

        frames = [None, None]

        for rng in settings.frames:
            if frames[0] is not None:
                frames[0] = min(frames[0], rng[0])
                frames[1] = max(frames[1], rng[1])
            else:
                if Inspect.isSeq(rng):
                    frames = list(rng)
                else:
                    frames = [rng, rng]

        return [int(frames[0]), int(frames[1])]