Initial revision
[blender.git] / intern / python / modules / Converter / bimporter.py
1 class importer:
2         def __init__(self,writer=None):
3                 self.writer = writer
4                 self.filename = None
5                 self.file = None
6                 self.ext = ""
7         def readfile(self, name):
8                 file = open(name, "r")
9                 if not file:    
10                         return 0
11                 self.file = file        
12                 self.filename = name
13                 self.lines = file.readlines()
14         def close(self):
15                 if self.filename:
16                         self.file.close()
17         def checkmagic(self, name):
18                 # return 1 if magic true (format verified), 0 else
19                 return 0
20         def parse(self, data):
21                 # parse and convert the data shere
22                 pass
23
24 class writer:
25         def __init__(self, args = None):
26                 pass
27         def mesh(self, me, name):
28                 pass
29
30 _inst = importer()
31 readfile = _inst.readfile
32 close = _inst.close
33 checkmagic = _inst.checkmagic
34 parse = _inst.parse