Пример #1
0
 def createNameFilter(self):
     '''
     returns name filter (InflFilterMatch instance) based on control values
     '''
     filter = InfluenceNameFilter()
     filter.setFilterString(self.influenceNameFilter.getValue())
     return filter
Пример #2
0
 def createNameFilter(self):
     '''
     returns name filter (InflFilterMatch instance) based on control values
     '''
     filter = InfluenceNameFilter()
     filter.setFilterString(self.influenceNameFilter.getValue())
     return filter
 def testPartialMatch(self):
     f = InfluenceNameFilter().setFilterString("joint")
     self.assertTrue(f.isMatch("joint1"))
     self.assertTrue(f.isMatch("joint2"))
 def testFilterOutGarbage(self):
     f = InfluenceNameFilter().setFilterString("joint)({}#$%^@#@!&&&#1")
     self.assertTrue(f.isMatch("joint1"))
     self.assertFalse(f.isMatch("joint2"))
 def testCaseInsensitive(self):
     f = InfluenceNameFilter().setFilterString("L_finger4_1 l_finger4_2")
     
     self.assertTrue(f.isMatch("l_finger4_1"))
     self.assertTrue(f.isMatch("L_finger4_2"))
     self.assertFalse(f.isMatch("R_finger4_1"))
 def testMultiMatch(self):
     f = InfluenceNameFilter().setFilterString("joint1 joint2")
     
     self.assertTrue(f.isMatch("joint1"))
     self.assertTrue(f.isMatch("joint2"))
     self.assertFalse(f.isMatch("joint3"))
 def testWildcardMatch(self):
     f = InfluenceNameFilter().setFilterString("joint*_1")
     self.assertTrue(f.isMatch("joint1_1"))
     self.assertTrue(f.isMatch("joint55_1"))
     self.assertTrue(f.isMatch("joint_1"))
     self.assertFalse(f.isMatch("joint1_2"))
Пример #8
0
 def testPartialMatch(self):
     f = InfluenceNameFilter().setFilterString("joint")
     self.assertTrue(f.isMatch("joint1"))
     self.assertTrue(f.isMatch("joint2"))
Пример #9
0
    def testCaseInsensitive(self):
        f = InfluenceNameFilter().setFilterString("L_finger4_1 l_finger4_2")

        self.assertTrue(f.isMatch("l_finger4_1"))
        self.assertTrue(f.isMatch("L_finger4_2"))
        self.assertFalse(f.isMatch("R_finger4_1"))
Пример #10
0
 def testFilterOutGarbage(self):
     f = InfluenceNameFilter().setFilterString("joint)({}#$%^@#@!&&&#1")
     self.assertTrue(f.isMatch("joint1"))
     self.assertFalse(f.isMatch("joint2"))
Пример #11
0
 def testWildcardMatch(self):
     f = InfluenceNameFilter().setFilterString("joint*_1")
     self.assertTrue(f.isMatch("joint1_1"))
     self.assertTrue(f.isMatch("joint55_1"))
     self.assertTrue(f.isMatch("joint_1"))
     self.assertFalse(f.isMatch("joint1_2"))
Пример #12
0
    def testMultiMatch(self):
        f = InfluenceNameFilter().setFilterString("joint1 joint2")

        self.assertTrue(f.isMatch("joint1"))
        self.assertTrue(f.isMatch("joint2"))
        self.assertFalse(f.isMatch("joint3"))