Jelajahi Sumber

more efficient model load

Darren Ranalli 22 tahun lalu
induk
melakukan
7adb655231
1 mengubah file dengan 4 tambahan dan 0 penghapusan
  1. 4 0
      direct/src/level/SpecUtil.py

+ 4 - 0
direct/src/level/SpecUtil.py

@@ -52,7 +52,11 @@ def privUpdateSpec(spec, modelPath, entTypeModule):
                          'modelFilename', modelPath)
                          'modelFilename', modelPath)
 
 
     # load the model
     # load the model
+    # disable texture loading for speed
+    TexturePool.setFakeTextureImage(
+        '/i/alpha/player/install/ttmodels/src/fonts/ImpressBT.rgb')
     model = loader.loadModel(modelPath)
     model = loader.loadModel(modelPath)
+    TexturePool.clearFakeTextureImage()
     # get the model's zone info
     # get the model's zone info
     modelZoneNum2node = LevelUtil.getZoneNum2Node(model)
     modelZoneNum2node = LevelUtil.getZoneNum2Node(model)
     modelZoneNums = modelZoneNum2node.keys()
     modelZoneNums = modelZoneNum2node.keys()