예제 #1
0
    def test_has_repr_method_is_working_properly(self):
        """testing if Representation.has_repr() method is working properly
        """
        rep = Representation(self.version1)
        self.assertTrue(rep.has_repr('BBox'))

        rep.version = self.version17
        self.assertTrue(rep.has_repr('Lores'))

        rep.version = self.version19
        self.assertFalse(rep.has_repr('BBox'))
예제 #2
0
    def test_has_repr_method_is_working_properly(self):
        """testing if Representation.has_repr() method is working properly
        """
        rep = Representation(self.version1)
        self.assertTrue(rep.has_repr('BBox'))

        rep.version = self.version17
        self.assertTrue(rep.has_repr('Lores'))

        rep.version = self.version19
        self.assertFalse(rep.has_repr('BBox'))
예제 #3
0
    def has_repr(self, repr_name):
        """checks if the reference has the given representation

        :param str repr_name: The name of the desired representation
        :return:
        """
        from anima.env.mayaEnv import Maya
        m = Maya()
        v = m.get_version_from_full_path(self.path)

        if v is None:
            return False

        rep = Representation(version=v)
        return rep.has_repr(repr_name)
예제 #4
0
    def has_repr(self, repr_name):
        """checks if the reference has the given representation

        :param str repr_name: The name of the desired representation
        :return:
        """
        from anima.env.mayaEnv import Maya
        m = Maya()
        v = m.get_version_from_full_path(self.path)

        if v is None:
            return False

        rep = Representation(version=v)
        return rep.has_repr(repr_name)