Show
Ignore:
Timestamp:
11/04/02 13:57:16 (6 years ago)
Author:
sholloway
Message:

*** empty log message ***

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/RBRapier/RBRapier/Formats/Wavefront/Loader.py

    r345 r355  
    7474            } 
    7575 
    76         LineNumber =
    77         for Line in WavefrontOBJFile: 
     76        Line, LineNumber = '',
     77        for PartialLine in WavefrontOBJFile: 
    7878            LineNumber += 1 
    79             Line = Line.strip() 
     79            Line += PartialLine.strip() 
    8080            if not Line or Line[0] == '#':  
     81                Line = '' 
    8182                continue # Comment -- move on 
     83            if Line[-1] == '\\': 
     84                Line = Line[:-1] 
     85                continue # line continuation -- get the rest of it 
    8286            Line = Line.split() 
    8387            Command, Args = Line[0], Line[1:] 
     
    8690            except KeyError: 
    8791                if self.RaiseMissingElements: 
    88                     raise KeyError, "Unknown Wavefront command %r (%s<%d>)" % (' '.join(Line), WavefrontOBJFile.name, LineNumber) 
     92                    raise NotImplemented, "Unknown Wavefront command %r (%s<%d>)" % (' '.join(Line), WavefrontOBJFile.name, LineNumber) 
    8993                elif self.WarnMissingElements: 
    9094                    print "%s<%d>: Wavefront command not supported: %r" % (WavefrontOBJFile.name, LineNumber, ' '.join(Line)) 
    9195            else: 
    9296                ex(Args) 
     97            Line = '' 
    9398 
    9499    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~