def load_mtl()

in jsuarez/extra/embyr_deprecated/embyr/kivy3/loaders/objloader.py [0:0]


    def load_mtl(self):
        if not os.path.exists(self.mtl_source):
            #TODO show warning about materials file is not found
            return
        for line in open(self.mtl_source, "r"):
            if line.startswith('#'):
                continue
            values = line.split()
            if not values:
                continue
            if values[0] == 'newmtl':
                mtl = self.mtl_contents[values[1]] = {}
                continue
            elif mtl is None:
                raise ValueError("mtl doesn't start with newmtl statement")
            mtl[values[0]] = values[1:]