Browse Source

protect DirectSelection stuff from shipping

David Rose 21 years ago
parent
commit
1f23a24db3
1 changed files with 5 additions and 4 deletions
  1. 5 4
      direct/src/particles/Particles.py

+ 5 - 4
direct/src/particles/Particles.py

@@ -126,12 +126,13 @@ class Particles(ParticleSystem.ParticleSystem):
             self.renderer = LineParticleRenderer.LineParticleRenderer()
         elif (type == "GeomParticleRenderer"):
             self.renderer = GeomParticleRenderer.GeomParticleRenderer()
-            npath = NodePath('default-geom')
             # This was moved here because we do not want to download
             # the direct tools with toontown.
-            from direct.directtools import DirectSelection
-            bbox = DirectSelection.DirectBoundingBox(npath)
-            self.renderer.setGeomNode(bbox.lines.node())
+            if __dev__:
+                from direct.directtools import DirectSelection
+                npath = NodePath('default-geom')
+                bbox = DirectSelection.DirectBoundingBox(npath)
+                self.renderer.setGeomNode(bbox.lines.node())
         elif (type == "SparkleParticleRenderer"):
             self.renderer = SparkleParticleRenderer.SparkleParticleRenderer()
         elif (type == "SpriteParticleRenderer"):