def parse_usemtl(self, args):
        [usemtl] = args
        self.material = self.wavefront.materials.get(usemtl, None)
        if self.material is None:
            raise PywavefrontException('Unknown material: %s' % args[0])
        if self.mesh is not None:
            self.mesh.add_material(self.material)
dataset/ETHPy150Open greenmoss/PyWavefront/pywavefront/__init__.py/ObjParser.parse_usemtl/original