Show
Ignore:
Timestamp:
11/11/02 18:57:53 (6 years ago)
Author:
sholloway
Message:

*** empty log message ***

Files:

Legend:

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

    r366 r368  
    174174#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    175175 
    176 class LightwaveLWOLoader(object): 
     176class LightwaveLWOBLoader(object): 
    177177    #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
    178178    #~ Constants / Variables / Etc.  
     
    202202        if FORMChunk.getname() != 'FORM': 
    203203            raise ValueError, "File does not contain a FORM chunk to contain a Lightwave3D Object" 
    204         if FORMChunk.read(4) != 'LWOB': 
    205             raise ValueError, "File does not contain a Lightwave3D Object" 
     204 
     205        if TaskProgress:  
     206            TaskProgress = TaskProgress.NewSubtask('Load Lightwave Object', FORMChunk.tell(), FORMChunk.getsize()) 
     207        else: TaskProgress = None 
     208 
     209        FormType = FORMChunk.read(4) 
     210        if FormType == 'LWOB': 
     211            pass # This is what we're looking for 
     212        elif FormType != 'LWO2': 
     213            raise NotImplemented, "File contains a Lightwave3D 2 Object (LWO2), which is not (yet) supported." 
     214        else: raise ValueError, "File does not contain a Lightwave3D Object" 
     215 
    206216        try: 
    207217            while 1: 
     
    217227                else: 
    218228                    ex(NextChunk) 
     229                if TaskProgress:  
     230                    TaskProgress.Progress = FORMChunk.tell() 
    219231        except EOFError: 
    220232            pass # we're done