Browse Source

import ShowBase, helpful sample

Darren Ranalli 22 years ago
parent
commit
7f8b3683ee
1 changed files with 8 additions and 0 deletions
  1. 8 0
      direct/src/level/SpecUtil.py

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

@@ -1,5 +1,6 @@
 """SpecUtil module: contains utility functions for creating and managing level specs"""
 
+from ShowBaseGlobal import *
 import LevelSpec
 import LevelConstants
 import LevelUtil
@@ -14,6 +15,13 @@ def makeNewSpec(filename, modelPath, entTypeModule=EntityTypes):
     privUpdateSpec(spec, modelPath, entTypeModule)
     spec.saveToDisk(filename, makeBackup=0)
 
+"""
+import SpecUtil
+import SellbotLegFactorySpec
+import FactoryEntityTypes
+SpecUtil.updateSpec(SellbotLegFactorySpec, FactoryEntityTypes, 'phase_9/models/cogHQ/newModel')
+"""
+
 def updateSpec(specModule, entTypeModule=EntityTypes, modelPath=None):
     """Call this to update an existing levelSpec to work with a new level
     model. If the level model has a new path, pass it in as 'modelPath'.