Prechádzať zdrojové kódy

fix oobe() without camera model

David Rose 24 rokov pred
rodič
commit
b102477dcd
1 zmenil súbory, kde vykonal 2 pridanie a 1 odobranie
  1. 2 1
      direct/src/showbase/ShowBase.py

+ 2 - 1
direct/src/showbase/ShowBase.py

@@ -493,7 +493,8 @@ class ShowBase:
             self.oobeButtonEventsType = TypeRegistry.ptr().findType('ButtonEvents_ButtonEventDataTransition')
             self.oobeButtonEventsType = TypeRegistry.ptr().findType('ButtonEvents_ButtonEventDataTransition')
 
 
             self.oobeVis = loader.loadModelOnce('models/misc/camera')
             self.oobeVis = loader.loadModelOnce('models/misc/camera')
-            self.oobeVis.arc().setFinal(1)
+            if self.oobeVis:
+                self.oobeVis.arc().setFinal(1)
             self.oobeCullFrustum = None
             self.oobeCullFrustum = None
 
 
             # Make sure the MouseValve is monitoring the Control key.
             # Make sure the MouseValve is monitoring the Control key.