Browse Source

Merge branch 'master' into cmake

Sam Edwards 7 years ago
parent
commit
6efb07de93
100 changed files with 433 additions and 280 deletions
  1. 48 57
      direct/src/showbase/PythonUtil.py
  2. 4 1
      direct/src/showbase/ShowBase.py
  3. 75 8
      direct/src/showbase/Transitions.py
  4. 18 6
      dtool/src/cppparser/cppEnumType.cxx
  5. 4 4
      dtool/src/cppparser/cppExpression.cxx
  6. 5 0
      dtool/src/dtoolbase/dtoolbase_cc.h
  7. 1 1
      makepanda/installer.nsi
  8. 4 2
      makepanda/makepanda.py
  9. 4 4
      makepanda/makepanda.vcproj
  10. 1 1
      panda/metalibs/panda/panda.cxx
  11. 1 1
      panda/src/android/android_main.cxx
  12. 1 1
      panda/src/audio/audioManager.cxx
  13. 1 1
      panda/src/audiotraits/fmodAudioManager.cxx
  14. 1 1
      panda/src/audiotraits/milesAudioManager.cxx
  15. 1 1
      panda/src/audiotraits/openalAudioManager.cxx
  16. 6 1
      panda/src/bullet/bulletWorld.cxx
  17. 1 1
      panda/src/collada/load_collada_file.cxx
  18. 1 1
      panda/src/display/graphicsPipeSelection.cxx
  19. 1 1
      panda/src/display/graphicsStateGuardian.cxx
  20. 1 1
      panda/src/display/pStatGPUTimer.h
  21. 17 0
      panda/src/downloader/httpChannel.I
  22. 2 1
      panda/src/downloader/httpChannel.cxx
  23. 4 0
      panda/src/downloader/httpChannel.h
  24. 1 1
      panda/src/egg/eggData.cxx
  25. 1 1
      panda/src/egg2pg/load_egg_file.cxx
  26. 1 1
      panda/src/egg2pg/save_egg_file.cxx
  27. 1 0
      panda/src/event/asyncTask.h
  28. 5 1
      panda/src/event/asyncTaskChain.cxx
  29. 8 1
      panda/src/event/asyncTaskChain.h
  30. 3 0
      panda/src/event/pythonTask.cxx
  31. 2 2
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx
  32. 1 1
      panda/src/gobj/config_gobj.cxx
  33. 1 1
      panda/src/gobj/shader.cxx
  34. 1 1
      panda/src/gobj/texture.cxx
  35. 1 1
      panda/src/gobj/texturePool.cxx
  36. 1 1
      panda/src/iphonedisplay/iPhoneGraphicsWindow.mm
  37. 1 1
      panda/src/movies/movieTypeRegistry.cxx
  38. 1 1
      panda/src/osxdisplay/osxGraphicsWindow.mm
  39. 1 1
      panda/src/pgraph/bamFile.cxx
  40. 1 1
      panda/src/pgraph/loader.cxx
  41. 1 1
      panda/src/pgraph/shaderPool.cxx
  42. 1 1
      panda/src/physx/physxEnums.cxx
  43. 1 1
      panda/src/pnmtext/freetypeFont.cxx
  44. 4 4
      panda/src/pstatclient/config_pstatclient.cxx
  45. 50 0
      panda/src/pstatclient/config_pstatclient.h
  46. 2 50
      panda/src/pstatclient/config_pstats.h
  47. 1 1
      panda/src/pstatclient/p3pstatclient_composite1.cxx
  48. 1 1
      panda/src/pstatclient/pStatClient.cxx
  49. 1 1
      panda/src/pstatclient/pStatClientControlMessage.cxx
  50. 1 1
      panda/src/pstatclient/pStatClientImpl.cxx
  51. 1 1
      panda/src/pstatclient/pStatFrameData.cxx
  52. 1 1
      panda/src/pstatclient/pStatProperties.cxx
  53. 1 1
      panda/src/pstatclient/pStatServerControlMessage.cxx
  54. 1 1
      panda/src/pstatclient/test_client.cxx
  55. 1 1
      panda/src/putil/autoTextureScale.cxx
  56. 1 1
      panda/src/putil/bamCache.cxx
  57. 1 1
      panda/src/putil/bamCacheIndex.cxx
  58. 1 1
      panda/src/putil/bamCacheRecord.cxx
  59. 1 1
      panda/src/putil/bamEnums.cxx
  60. 1 1
      panda/src/putil/bamReader.cxx
  61. 1 1
      panda/src/putil/bamReader_ext.cxx
  62. 29 3
      panda/src/putil/bamWriter.cxx
  63. 2 1
      panda/src/putil/bamWriter.h
  64. 1 1
      panda/src/putil/buttonRegistry.cxx
  65. 1 1
      panda/src/putil/clockObject.cxx
  66. 1 1
      panda/src/putil/colorSpace.cxx
  67. 0 0
      panda/src/putil/config_putil.N
  68. 4 4
      panda/src/putil/config_putil.cxx
  69. 55 0
      panda/src/putil/config_putil.h
  70. 2 55
      panda/src/putil/config_util.h
  71. 1 1
      panda/src/putil/copyOnWritePointer.cxx
  72. 1 1
      panda/src/putil/datagramInputFile.cxx
  73. 1 1
      panda/src/putil/datagramOutputFile.h
  74. 1 1
      panda/src/putil/factoryBase.cxx
  75. 1 1
      panda/src/putil/globalPointerRegistry.cxx
  76. 1 1
      panda/src/putil/keyboardButton.cxx
  77. 1 1
      panda/src/putil/load_prc_file.cxx
  78. 2 2
      panda/src/putil/loaderOptions.cxx
  79. 1 1
      panda/src/putil/mouseButton.cxx
  80. 1 1
      panda/src/putil/p3putil_composite1.cxx
  81. 1 1
      panda/src/putil/pythonCallbackObject.cxx
  82. 1 1
      panda/src/putil/simpleHashMap.h
  83. 1 1
      panda/src/putil/test_filename.cxx
  84. 1 1
      panda/src/putil/weakKeyHashMap.h
  85. 1 1
      panda/src/speedtree/speedTreeNode.cxx
  86. 1 1
      panda/src/text/dynamicTextFont.cxx
  87. 1 1
      panda/src/text/fontPool.cxx
  88. 1 1
      panda/src/tinydisplay/tinyOsxGraphicsWindow.mm
  89. 1 1
      panda/src/windisplay/winGraphicsWindow.cxx
  90. 1 1
      pandatool/src/bam/eggToBam.cxx
  91. 1 1
      pandatool/src/bam/ptsToBam.cxx
  92. 1 1
      pandatool/src/converter/somethingToEggConverter.h
  93. 1 1
      pandatool/src/egg-palettize/txaFileFilter.cxx
  94. 1 1
      pandatool/src/eggbase/eggReader.cxx
  95. 1 1
      pandatool/src/eggbase/somethingToEgg.cxx
  96. 1 1
      pandatool/src/flt/fltTexture.cxx
  97. 1 1
      pandatool/src/gtk-stats/gtkStats.cxx
  98. 1 1
      pandatool/src/maxegg/maxToEggConverter.cxx
  99. 1 1
      pandatool/src/mayaprogs/mayaPview.cxx
  100. 1 1
      pandatool/src/pandatoolbase/pathReplace.cxx

+ 48 - 57
direct/src/showbase/PythonUtil.py

@@ -10,7 +10,7 @@ __all__ = ['indent',
 'bound', 'clamp', 'lerp', 'average', 'addListsByValue',
 'bound', 'clamp', 'lerp', 'average', 'addListsByValue',
 'boolEqual', 'lineupPos', 'formatElapsedSeconds', 'solveQuadratic',
 'boolEqual', 'lineupPos', 'formatElapsedSeconds', 'solveQuadratic',
 'findPythonModule', 'mostDerivedLast',
 'findPythonModule', 'mostDerivedLast',
-'weightedChoice', 'randFloat', 'normalDistrib',
+'clampScalar', 'weightedChoice', 'randFloat', 'normalDistrib',
 'weightedRand', 'randUint31', 'randInt32',
 'weightedRand', 'randUint31', 'randInt32',
 'SerialNumGen', 'serialNum', 'uniqueName', 'Enum', 'Singleton',
 'SerialNumGen', 'serialNum', 'uniqueName', 'Enum', 'Singleton',
 'SingletonError', 'printListEnum', 'safeRepr',
 'SingletonError', 'printListEnum', 'safeRepr',
@@ -178,27 +178,6 @@ class Queue:
     def __len__(self):
     def __len__(self):
         return len(self.__list)
         return len(self.__list)
 
 
-if __debug__ and __name__ == '__main__':
-    q = Queue()
-    assert q.isEmpty()
-    q.clear()
-    assert q.isEmpty()
-    q.push(10)
-    assert not q.isEmpty()
-    q.push(20)
-    assert not q.isEmpty()
-    assert len(q) == 2
-    assert q.front() == 10
-    assert q.back() == 20
-    assert q.top() == 10
-    assert q.top() == 10
-    assert q.pop() == 10
-    assert len(q) == 1
-    assert not q.isEmpty()
-    assert q.pop() == 20
-    assert len(q) == 0
-    assert q.isEmpty()
-
 
 
 def indent(stream, numIndents, str):
 def indent(stream, numIndents, str):
     """
     """
@@ -1130,6 +1109,23 @@ def findPythonModule(module):
 
 
     return None
     return None
 
 
+def clampScalar(value, a, b):
+    # calling this ought to be faster than calling both min and max
+    if a < b:
+        if value < a:
+            return a
+        elif value > b:
+            return b
+        else:
+            return value
+    else:
+        if value < b:
+            return b
+        elif value > a:
+            return a
+        else:
+            return value
+
 def weightedChoice(choiceList, rng=random.random, sum=None):
 def weightedChoice(choiceList, rng=random.random, sum=None):
     """given a list of (weight, item) pairs, chooses an item based on the
     """given a list of (weight, item) pairs, chooses an item based on the
     weights. rng must return 0..1. if you happen to have the sum of the
     weights. rng must return 0..1. if you happen to have the sum of the
@@ -2313,36 +2309,6 @@ def flywheel(*args, **kArgs):
         pass
         pass
     return flywheel
     return flywheel
 
 
-if __debug__ and __name__ == '__main__':
-    f = flywheel(['a','b','c','d'], countList=[11,20,3,4])
-    obj2count = {}
-    for obj in f:
-        obj2count.setdefault(obj, 0)
-        obj2count[obj] += 1
-    assert obj2count['a'] == 11
-    assert obj2count['b'] == 20
-    assert obj2count['c'] == 3
-    assert obj2count['d'] == 4
-
-    f = flywheel([1,2,3,4], countFunc=lambda x: x*2)
-    obj2count = {}
-    for obj in f:
-        obj2count.setdefault(obj, 0)
-        obj2count[obj] += 1
-    assert obj2count[1] == 2
-    assert obj2count[2] == 4
-    assert obj2count[3] == 6
-    assert obj2count[4] == 8
-
-    f = flywheel([1,2,3,4], countFunc=lambda x: x, scale = 3)
-    obj2count = {}
-    for obj in f:
-        obj2count.setdefault(obj, 0)
-        obj2count[obj] += 1
-    assert obj2count[1] == 1 * 3
-    assert obj2count[2] == 2 * 3
-    assert obj2count[3] == 3 * 3
-    assert obj2count[4] == 4 * 3
 
 
 if __debug__:
 if __debug__:
     def quickProfile(name="unnamed"):
     def quickProfile(name="unnamed"):
@@ -2687,11 +2653,36 @@ def unescapeHtmlString(s):
         result += char
         result += char
     return result
     return result
 
 
-if __debug__ and __name__ == '__main__':
-    assert unescapeHtmlString('asdf') == 'asdf'
-    assert unescapeHtmlString('as+df') == 'as df'
-    assert unescapeHtmlString('as%32df') == 'as2df'
-    assert unescapeHtmlString('asdf%32') == 'asdf2'
+class PriorityCallbacks:
+    """ manage a set of prioritized callbacks, and allow them to be invoked in order of priority """
+    def __init__(self):
+        self._callbacks = []
+
+    def clear(self):
+        del self._callbacks[:]
+
+    def add(self, callback, priority=None):
+        if priority is None:
+            priority = 0
+        callbacks = self._callbacks
+        lo = 0
+        hi = len(callbacks)
+        while lo < hi:
+            mid = (lo + hi) // 2
+            if priority < callbacks[mid][0]:
+                hi = mid
+            else:
+                lo = mid + 1
+        item = (priority, callback)
+        callbacks.insert(lo, item)
+        return item
+
+    def remove(self, item):
+        self._callbacks.remove(item)
+
+    def __call__(self):
+        for priority, callback in self._callbacks:
+            callback()
 
 
 builtins.Functor = Functor
 builtins.Functor = Functor
 builtins.Stack = Stack
 builtins.Stack = Stack

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

@@ -2672,15 +2672,18 @@ class ShowBase(DirectObject.DirectObject):
           output file name (e.g. if sd = 4, movie_0001.png)
           output file name (e.g. if sd = 4, movie_0001.png)
         - source is the Window, Buffer, DisplayRegion, or Texture from which
         - source is the Window, Buffer, DisplayRegion, or Texture from which
           to save the resulting images.  The default is the main window.
           to save the resulting images.  The default is the main window.
+
+        The task is returned, so that it can be awaited.
         """
         """
         globalClock.setMode(ClockObject.MNonRealTime)
         globalClock.setMode(ClockObject.MNonRealTime)
         globalClock.setDt(1.0/float(fps))
         globalClock.setDt(1.0/float(fps))
-        t = taskMgr.add(self._movieTask, namePrefix + '_task')
+        t = self.taskMgr.add(self._movieTask, namePrefix + '_task')
         t.frameIndex = 0  # Frame 0 is not captured.
         t.frameIndex = 0  # Frame 0 is not captured.
         t.numFrames = int(duration * fps)
         t.numFrames = int(duration * fps)
         t.source = source
         t.source = source
         t.outputString = namePrefix + '_%0' + repr(sd) + 'd.' + format
         t.outputString = namePrefix + '_%0' + repr(sd) + 'd.' + format
         t.setUponDeath(lambda state: globalClock.setMode(ClockObject.MNormal))
         t.setUponDeath(lambda state: globalClock.setMode(ClockObject.MNormal))
+        return t
 
 
     def _movieTask(self, state):
     def _movieTask(self, state):
         if state.frameIndex != 0:
         if state.frameIndex != 0:

+ 75 - 8
direct/src/showbase/Transitions.py

@@ -23,7 +23,9 @@ class Transitions:
                  scale=3.0,
                  scale=3.0,
                  pos=Vec3(0, 0, 0)):
                  pos=Vec3(0, 0, 0)):
         self.transitionIval = None
         self.transitionIval = None
+        self.__transitionFuture = None
         self.letterboxIval = None
         self.letterboxIval = None
+        self.__letterboxFuture = None
         self.iris = None
         self.iris = None
         self.fade = None
         self.fade = None
         self.letterbox = None
         self.letterbox = None
@@ -94,7 +96,9 @@ class Transitions:
         """
         """
         #self.noTransitions() masad: this creates a one frame pop, is it necessary?
         #self.noTransitions() masad: this creates a one frame pop, is it necessary?
         self.loadFade()
         self.loadFade()
-        transitionIval = Sequence(Func(self.fade.reparentTo, aspect2d, DGG.FADE_SORT_INDEX),
+
+        parent = aspect2d if self.fadeModel else render2d
+        transitionIval = Sequence(Func(self.fade.reparentTo, parent, DGG.FADE_SORT_INDEX),
                                   Func(self.fade.showThrough),  # in case aspect2d is hidden for some reason
                                   Func(self.fade.showThrough),  # in case aspect2d is hidden for some reason
                                   self.lerpFunc(self.fade, t,
                                   self.lerpFunc(self.fade, t,
                                                 self.alphaOff,
                                                 self.alphaOff,
@@ -115,7 +119,8 @@ class Transitions:
         self.noTransitions()
         self.noTransitions()
         self.loadFade()
         self.loadFade()
 
 
-        transitionIval = Sequence(Func(self.fade.reparentTo,aspect2d,DGG.FADE_SORT_INDEX),
+        parent = aspect2d if self.fadeModel else render2d
+        transitionIval = Sequence(Func(self.fade.reparentTo, parent, DGG.FADE_SORT_INDEX),
                                   Func(self.fade.showThrough),  # in case aspect2d is hidden for some reason
                                   Func(self.fade.showThrough),  # in case aspect2d is hidden for some reason
                                   self.lerpFunc(self.fade, t,
                                   self.lerpFunc(self.fade, t,
                                                 self.alphaOn,
                                                 self.alphaOn,
@@ -148,11 +153,17 @@ class Transitions:
             self.noTransitions()
             self.noTransitions()
             self.loadFade()
             self.loadFade()
             self.fade.detachNode()
             self.fade.detachNode()
+            fut = AsyncFuture()
+            fut.setResult(None)
+            return fut
         else:
         else:
             # Create a sequence that lerps the color out, then
             # Create a sequence that lerps the color out, then
             # parents the fade to hidden
             # parents the fade to hidden
             self.transitionIval = self.getFadeInIval(t, finishIval)
             self.transitionIval = self.getFadeInIval(t, finishIval)
+            self.transitionIval.append(Func(self.__finishTransition))
+            self.__transitionFuture = AsyncFuture()
             self.transitionIval.start()
             self.transitionIval.start()
+            return self.__transitionFuture
 
 
     def fadeOut(self, t=0.5, finishIval=None):
     def fadeOut(self, t=0.5, finishIval=None):
         """
         """
@@ -167,7 +178,9 @@ class Transitions:
             # Fade out immediately with no lerp
             # Fade out immediately with no lerp
             self.noTransitions()
             self.noTransitions()
             self.loadFade()
             self.loadFade()
-            self.fade.reparentTo(aspect2d, DGG.FADE_SORT_INDEX)
+
+            parent = aspect2d if self.fadeModel else render2d
+            self.fade.reparentTo(parent, DGG.FADE_SORT_INDEX)
             self.fade.setColor(self.alphaOn)
             self.fade.setColor(self.alphaOn)
         elif ConfigVariableBool('no-loading-screen', False):
         elif ConfigVariableBool('no-loading-screen', False):
             if finishIval:
             if finishIval:
@@ -176,8 +189,16 @@ class Transitions:
         else:
         else:
             # Create a sequence that lerps the color out, then
             # Create a sequence that lerps the color out, then
             # parents the fade to hidden
             # parents the fade to hidden
-            self.transitionIval = self.getFadeOutIval(t,finishIval)
+            self.transitionIval = self.getFadeOutIval(t, finishIval)
+            self.transitionIval.append(Func(self.__finishTransition))
+            self.__transitionFuture = AsyncFuture()
             self.transitionIval.start()
             self.transitionIval.start()
+            return self.__transitionFuture
+
+        # Immediately done, so return a dummy future.
+        fut = AsyncFuture()
+        fut.setResult(None)
+        return fut
 
 
     def fadeOutActive(self):
     def fadeOutActive(self):
         return self.fade and self.fade.getColor()[3] > 0
         return self.fade and self.fade.getColor()[3] > 0
@@ -191,7 +212,9 @@ class Transitions:
         #print "transitiosn: fadeScreen"
         #print "transitiosn: fadeScreen"
         self.noTransitions()
         self.noTransitions()
         self.loadFade()
         self.loadFade()
-        self.fade.reparentTo(aspect2d, DGG.FADE_SORT_INDEX)
+
+        parent = aspect2d if self.fadeModel else render2d
+        self.fade.reparentTo(parent, DGG.FADE_SORT_INDEX)
         self.fade.setColor(self.alphaOn[0],
         self.fade.setColor(self.alphaOn[0],
                            self.alphaOn[1],
                            self.alphaOn[1],
                            self.alphaOn[2],
                            self.alphaOn[2],
@@ -206,7 +229,9 @@ class Transitions:
         #print "transitiosn: fadeScreenColor"
         #print "transitiosn: fadeScreenColor"
         self.noTransitions()
         self.noTransitions()
         self.loadFade()
         self.loadFade()
-        self.fade.reparentTo(aspect2d, DGG.FADE_SORT_INDEX)
+
+        parent = aspect2d if self.fadeModel else render2d
+        self.fade.reparentTo(parent, DGG.FADE_SORT_INDEX)
         self.fade.setColor(color)
         self.fade.setColor(color)
 
 
     def noFade(self):
     def noFade(self):
@@ -217,6 +242,9 @@ class Transitions:
         if self.transitionIval:
         if self.transitionIval:
             self.transitionIval.pause()
             self.transitionIval.pause()
             self.transitionIval = None
             self.transitionIval = None
+        if self.__transitionFuture:
+            self.__transitionFuture.cancel()
+            self.__transitionFuture = None
         if self.fade:
         if self.fade:
             # Make sure to reset the color, since fadeOutActive() is looking at it
             # Make sure to reset the color, since fadeOutActive() is looking at it
             self.fade.setColor(self.alphaOff)
             self.fade.setColor(self.alphaOff)
@@ -247,18 +275,25 @@ class Transitions:
         self.loadIris()
         self.loadIris()
         if (t == 0):
         if (t == 0):
             self.iris.detachNode()
             self.iris.detachNode()
+            fut = AsyncFuture()
+            fut.setResult(None)
+            return fut
         else:
         else:
             self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX)
             self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX)
 
 
+            scale = 0.18 * max(base.a2dRight, base.a2dTop)
             self.transitionIval = Sequence(LerpScaleInterval(self.iris, t,
             self.transitionIval = Sequence(LerpScaleInterval(self.iris, t,
-                                                   scale = 0.18,
+                                                   scale = scale,
                                                    startScale = 0.01),
                                                    startScale = 0.01),
                                  Func(self.iris.detachNode),
                                  Func(self.iris.detachNode),
+                                 Func(self.__finishTransition),
                                  name = self.irisTaskName,
                                  name = self.irisTaskName,
                                  )
                                  )
+            self.__transitionFuture = AsyncFuture()
             if finishIval:
             if finishIval:
                 self.transitionIval.append(finishIval)
                 self.transitionIval.append(finishIval)
             self.transitionIval.start()
             self.transitionIval.start()
+            return self.__transitionFuture
 
 
     def irisOut(self, t=0.5, finishIval=None):
     def irisOut(self, t=0.5, finishIval=None):
         """
         """
@@ -274,20 +309,27 @@ class Transitions:
         if (t == 0):
         if (t == 0):
             self.iris.detachNode()
             self.iris.detachNode()
             self.fadeOut(0)
             self.fadeOut(0)
+            fut = AsyncFuture()
+            fut.setResult(None)
+            return fut
         else:
         else:
             self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX)
             self.iris.reparentTo(aspect2d, DGG.FADE_SORT_INDEX)
 
 
+            scale = 0.18 * max(base.a2dRight, base.a2dTop)
             self.transitionIval = Sequence(LerpScaleInterval(self.iris, t,
             self.transitionIval = Sequence(LerpScaleInterval(self.iris, t,
                                                    scale = 0.01,
                                                    scale = 0.01,
-                                                   startScale = 0.18),
+                                                   startScale = scale),
                                  Func(self.iris.detachNode),
                                  Func(self.iris.detachNode),
                                  # Use the fade to cover up the hole that the iris would leave
                                  # Use the fade to cover up the hole that the iris would leave
                                  Func(self.fadeOut, 0),
                                  Func(self.fadeOut, 0),
+                                 Func(self.__finishTransition),
                                  name = self.irisTaskName,
                                  name = self.irisTaskName,
                                  )
                                  )
+            self.__transitionFuture = AsyncFuture()
             if finishIval:
             if finishIval:
                 self.transitionIval.append(finishIval)
                 self.transitionIval.append(finishIval)
             self.transitionIval.start()
             self.transitionIval.start()
+            return self.__transitionFuture
 
 
     def noIris(self):
     def noIris(self):
         """
         """
@@ -311,6 +353,11 @@ class Transitions:
         # Letterbox is not really a transition, it is a screen overlay
         # Letterbox is not really a transition, it is a screen overlay
         # self.noLetterbox()
         # self.noLetterbox()
 
 
+    def __finishTransition(self):
+        if self.__transitionFuture:
+            self.__transitionFuture.setResult(None)
+            self.__transitionFuture = None
+
     ##################################################
     ##################################################
     # Letterbox
     # Letterbox
     ##################################################
     ##################################################
@@ -383,9 +430,17 @@ class Transitions:
         if self.letterboxIval:
         if self.letterboxIval:
             self.letterboxIval.pause()
             self.letterboxIval.pause()
             self.letterboxIval = None
             self.letterboxIval = None
+        if self.__letterboxFuture:
+            self.__letterboxFuture.cancel()
+            self.__letterboxFuture = None
         if self.letterbox:
         if self.letterbox:
             self.letterbox.stash()
             self.letterbox.stash()
 
 
+    def __finishLetterbox(self):
+        if self.__letterboxFuture:
+            self.__letterboxFuture.setResult(None)
+            self.__letterboxFuture = None
+
     def letterboxOn(self, t=0.25, finishIval=None):
     def letterboxOn(self, t=0.25, finishIval=None):
         """
         """
         Move black bars in over t seconds.
         Move black bars in over t seconds.
@@ -396,7 +451,11 @@ class Transitions:
         if (t == 0):
         if (t == 0):
             self.letterboxBottom.setPos(0, 0, -1)
             self.letterboxBottom.setPos(0, 0, -1)
             self.letterboxTop.setPos(0, 0, 0.8)
             self.letterboxTop.setPos(0, 0, 0.8)
+            fut = AsyncFuture()
+            fut.setResult(None)
+            return fut
         else:
         else:
+            self.__letterboxFuture = AsyncFuture()
             self.letterboxIval = Sequence(Parallel(
             self.letterboxIval = Sequence(Parallel(
                 LerpPosInterval(self.letterboxBottom,
                 LerpPosInterval(self.letterboxBottom,
                                 t,
                                 t,
@@ -409,11 +468,13 @@ class Transitions:
                                 # startPos = Vec3(0, 0, 1),
                                 # startPos = Vec3(0, 0, 1),
                                 ),
                                 ),
                 ),
                 ),
+                                          Func(self.__finishLetterbox),
                                           name = self.letterboxTaskName,
                                           name = self.letterboxTaskName,
                                           )
                                           )
             if finishIval:
             if finishIval:
                 self.letterboxIval.append(finishIval)
                 self.letterboxIval.append(finishIval)
             self.letterboxIval.start()
             self.letterboxIval.start()
+            return self.__letterboxFuture
 
 
     def letterboxOff(self, t=0.25, finishIval=None):
     def letterboxOff(self, t=0.25, finishIval=None):
         """
         """
@@ -424,7 +485,11 @@ class Transitions:
         self.letterbox.unstash()
         self.letterbox.unstash()
         if (t == 0):
         if (t == 0):
             self.letterbox.stash()
             self.letterbox.stash()
+            fut = AsyncFuture()
+            fut.setResult(None)
+            return fut
         else:
         else:
+            self.__letterboxFuture = AsyncFuture()
             self.letterboxIval = Sequence(Parallel(
             self.letterboxIval = Sequence(Parallel(
                 LerpPosInterval(self.letterboxBottom,
                 LerpPosInterval(self.letterboxBottom,
                                 t,
                                 t,
@@ -438,9 +503,11 @@ class Transitions:
                                 ),
                                 ),
                 ),
                 ),
                                           Func(self.letterbox.stash),
                                           Func(self.letterbox.stash),
+                                          Func(self.__finishLetterbox),
                                           Func(messenger.send,'letterboxOff'),
                                           Func(messenger.send,'letterboxOff'),
                                           name = self.letterboxTaskName,
                                           name = self.letterboxTaskName,
                                           )
                                           )
             if finishIval:
             if finishIval:
                 self.letterboxIval.append(finishIval)
                 self.letterboxIval.append(finishIval)
             self.letterboxIval.start()
             self.letterboxIval.start()
+            return self.__letterboxFuture

+ 18 - 6
dtool/src/cppparser/cppEnumType.cxx

@@ -224,12 +224,24 @@ substitute_decl(CPPDeclaration::SubstDecl &subst,
   bool any_changed = false;
   bool any_changed = false;
 
 
   for (size_t i = 0; i < _elements.size(); ++i) {
   for (size_t i = 0; i < _elements.size(); ++i) {
-    CPPInstance *elem_rep =
-      _elements[i]->substitute_decl(subst, current_scope, global_scope)
-      ->as_instance();
-
-    if (elem_rep != _elements[i]) {
-      rep->_elements[i] = elem_rep;
+    // We don't just do substitute_decl on the instance, which could lead to
+    // an infinite recursion.
+    CPPInstance *element = _elements[i];
+    CPPExpression *value = element->_initializer->
+      substitute_decl(subst, current_scope, global_scope)->as_expression();
+
+    if (is_scoped()) {
+      // For a strong enum, we consider the elements to be of this type.
+      if (value != element->_initializer) {
+        rep->_elements[i] = new CPPInstance(rep, element->_ident);
+        rep->_elements[i]->_initializer = value;
+        any_changed = true;
+      }
+    } else if (value != element->_initializer ||
+               rep->get_underlying_type() != get_underlying_type()) {
+      // In an unscoped enum, the elements are integers.
+      rep->_elements[i] = new CPPInstance(rep->get_underlying_type(), element->_ident);
+      rep->_elements[i]->_initializer = value;
       any_changed = true;
       any_changed = true;
     }
     }
   }
   }

+ 4 - 4
dtool/src/cppparser/cppExpression.cxx

@@ -81,7 +81,7 @@ as_integer() const {
 
 
   case RT_pointer:
   case RT_pointer:
     // We don't mind if this loses precision.
     // We don't mind if this loses precision.
-    return (int)reinterpret_cast<long>(_u._pointer);
+    return (int)(intptr_t)(_u._pointer);
 
 
   default:
   default:
     cerr << "Invalid type\n";
     cerr << "Invalid type\n";
@@ -104,7 +104,7 @@ as_real() const {
 
 
   case RT_pointer:
   case RT_pointer:
     // We don't mind if this loses precision.
     // We don't mind if this loses precision.
-    return (double)reinterpret_cast<long>(_u._pointer);
+    return (double)(uintptr_t)(_u._pointer);
 
 
   default:
   default:
     cerr << "Invalid type\n";
     cerr << "Invalid type\n";
@@ -120,10 +120,10 @@ void *CPPExpression::Result::
 as_pointer() const {
 as_pointer() const {
   switch (_type) {
   switch (_type) {
   case RT_integer:
   case RT_integer:
-    return reinterpret_cast<void*>((long)_u._integer);
+    return (void *)(intptr_t)_u._integer;
 
 
   case RT_real:
   case RT_real:
-    return reinterpret_cast<void*>((long)_u._real);
+    return (void *)(uintptr_t)_u._real;
 
 
   case RT_pointer:
   case RT_pointer:
     return _u._pointer;
     return _u._pointer;

+ 5 - 0
dtool/src/dtoolbase/dtoolbase_cc.h

@@ -122,6 +122,11 @@ typedef ios::seekdir ios_seekdir;
 // Apple has an outdated libstdc++.  Not all is lost, though, as we can fill
 // Apple has an outdated libstdc++.  Not all is lost, though, as we can fill
 // in some important missing functions.
 // in some important missing functions.
 #if defined(__GLIBCXX__) && __GLIBCXX__ <= 20070719
 #if defined(__GLIBCXX__) && __GLIBCXX__ <= 20070719
+#include <tr1/tuple>
+
+using std::tr1::tuple;
+using std::tr1::tie;
+
 typedef decltype(nullptr) nullptr_t;
 typedef decltype(nullptr) nullptr_t;
 
 
 template<class T> struct remove_reference      {typedef T type;};
 template<class T> struct remove_reference      {typedef T type;};

+ 1 - 1
makepanda/installer.nsi

@@ -368,7 +368,7 @@ SectionGroup "Python support"
         SetOutPath $INSTDIR\pandac\input
         SetOutPath $INSTDIR\pandac\input
         File /r "${BUILT}\pandac\input\*"
         File /r "${BUILT}\pandac\input\*"
         SetOutPath $INSTDIR\Pmw
         SetOutPath $INSTDIR\Pmw
-        File /r /x CVS "${BUILT}\Pmw\*"
+        File /nonfatal /r /x CVS "${BUILT}\Pmw\*"
 
 
         !ifdef REGVIEW
         !ifdef REGVIEW
         SetRegView ${REGVIEW}
         SetRegView ${REGVIEW}

+ 4 - 2
makepanda/makepanda.py

@@ -3668,6 +3668,7 @@ if (not RUNTIME):
   OPTS=['DIR:panda/src/putil', 'ZLIB', 'PYTHON']
   OPTS=['DIR:panda/src/putil', 'ZLIB', 'PYTHON']
   IGATEFILES=GetDirectoryContents('panda/src/putil', ["*.h", "*_composite*.cxx"])
   IGATEFILES=GetDirectoryContents('panda/src/putil', ["*.h", "*_composite*.cxx"])
   IGATEFILES.remove("test_bam.h")
   IGATEFILES.remove("test_bam.h")
+  IGATEFILES.remove("config_util.h")
   TargetAdd('libp3putil.in', opts=OPTS, input=IGATEFILES)
   TargetAdd('libp3putil.in', opts=OPTS, input=IGATEFILES)
   TargetAdd('libp3putil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3putil', 'SRCDIR:panda/src/putil'])
   TargetAdd('libp3putil.in', opts=['IMOD:panda3d.core', 'ILIB:libp3putil', 'SRCDIR:panda/src/putil'])
   TargetAdd('libp3putil_igate.obj', input='libp3putil.in', opts=["DEPENDENCYONLY"])
   TargetAdd('libp3putil_igate.obj', input='libp3putil.in', opts=["DEPENDENCYONLY"])
@@ -3794,6 +3795,7 @@ if (not RUNTIME):
 
 
   OPTS=['DIR:panda/src/pstatclient', 'PYTHON']
   OPTS=['DIR:panda/src/pstatclient', 'PYTHON']
   IGATEFILES=GetDirectoryContents('panda/src/pstatclient', ["*.h", "*_composite*.cxx"])
   IGATEFILES=GetDirectoryContents('panda/src/pstatclient', ["*.h", "*_composite*.cxx"])
+  IGATEFILES.remove("config_pstats.h")
   TargetAdd('libp3pstatclient.in', opts=OPTS, input=IGATEFILES)
   TargetAdd('libp3pstatclient.in', opts=OPTS, input=IGATEFILES)
   TargetAdd('libp3pstatclient.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pstatclient', 'SRCDIR:panda/src/pstatclient'])
   TargetAdd('libp3pstatclient.in', opts=['IMOD:panda3d.core', 'ILIB:libp3pstatclient', 'SRCDIR:panda/src/pstatclient'])
   TargetAdd('libp3pstatclient_igate.obj', input='libp3pstatclient.in', opts=["DEPENDENCYONLY"])
   TargetAdd('libp3pstatclient_igate.obj', input='libp3pstatclient.in', opts=["DEPENDENCYONLY"])
@@ -6110,9 +6112,9 @@ if not PkgSkip("PANDATOOL"):
   TargetAdd('pfm-trans.exe', opts=['ADVAPI'])
   TargetAdd('pfm-trans.exe', opts=['ADVAPI'])
 
 
   TargetAdd('pfm-bba_pfmBba.obj', opts=OPTS, input='pfmBba.cxx')
   TargetAdd('pfm-bba_pfmBba.obj', opts=OPTS, input='pfmBba.cxx')
-  TargetAdd('pfm-bba_config_pfm.obj', opts=OPTS, input='config_pfm.cxx')
+  TargetAdd('pfm-bba_config_pfmprogs.obj', opts=OPTS, input='config_pfmprogs.cxx')
   TargetAdd('pfm-bba.exe', input='pfm-bba_pfmBba.obj')
   TargetAdd('pfm-bba.exe', input='pfm-bba_pfmBba.obj')
-  TargetAdd('pfm-bba.exe', input='pfm-bba_config_pfm.obj')
+  TargetAdd('pfm-bba.exe', input='pfm-bba_config_pfmprogs.obj')
   TargetAdd('pfm-bba.exe', input='libp3progbase.lib')
   TargetAdd('pfm-bba.exe', input='libp3progbase.lib')
   TargetAdd('pfm-bba.exe', input='libp3pandatoolbase.lib')
   TargetAdd('pfm-bba.exe', input='libp3pandatoolbase.lib')
   TargetAdd('pfm-bba.exe', input=COMMON_PANDA_LIBS)
   TargetAdd('pfm-bba.exe', input=COMMON_PANDA_LIBS)

+ 4 - 4
makepanda/makepanda.vcproj

@@ -1228,7 +1228,7 @@
 				<File RelativePath="..\panda\src\putil\pta_double.h"></File>
 				<File RelativePath="..\panda\src\putil\pta_double.h"></File>
 				<File RelativePath="..\panda\src\putil\copyOnWritePointer.cxx"></File>
 				<File RelativePath="..\panda\src\putil\copyOnWritePointer.cxx"></File>
 				<File RelativePath="..\panda\src\putil\bitMask.cxx"></File>
 				<File RelativePath="..\panda\src\putil\bitMask.cxx"></File>
-				<File RelativePath="..\panda\src\putil\config_util.h"></File>
+				<File RelativePath="..\panda\src\putil\config_putil.h"></File>
 				<File RelativePath="..\panda\src\putil\clockObject.h"></File>
 				<File RelativePath="..\panda\src\putil\clockObject.h"></File>
 				<File RelativePath="..\panda\src\putil\lineStream.h"></File>
 				<File RelativePath="..\panda\src\putil\lineStream.h"></File>
 				<File RelativePath="..\panda\src\putil\datagramInputFile.cxx"></File>
 				<File RelativePath="..\panda\src\putil\datagramInputFile.cxx"></File>
@@ -1307,7 +1307,7 @@
 				<File RelativePath="..\panda\src\putil\bamCacheRecord.I"></File>
 				<File RelativePath="..\panda\src\putil\bamCacheRecord.I"></File>
 				<File RelativePath="..\panda\src\putil\animInterface.cxx"></File>
 				<File RelativePath="..\panda\src\putil\animInterface.cxx"></File>
 				<File RelativePath="..\panda\src\putil\lineStreamBuf.h"></File>
 				<File RelativePath="..\panda\src\putil\lineStreamBuf.h"></File>
-				<File RelativePath="..\panda\src\putil\config_util.cxx"></File>
+				<File RelativePath="..\panda\src\putil\config_putil.cxx"></File>
 				<File RelativePath="..\panda\src\putil\cachedTypedWritableReferenceCount.cxx"></File>
 				<File RelativePath="..\panda\src\putil\cachedTypedWritableReferenceCount.cxx"></File>
 				<File RelativePath="..\panda\src\putil\pythonCallbackObject.cxx"></File>
 				<File RelativePath="..\panda\src\putil\pythonCallbackObject.cxx"></File>
 				<File RelativePath="..\panda\src\putil\test_linestream.cxx"></File>
 				<File RelativePath="..\panda\src\putil\test_linestream.cxx"></File>
@@ -2322,8 +2322,8 @@
 				<File RelativePath="..\panda\src\pstatclient\pStatCollectorForward.h"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatCollectorForward.h"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatClientControlMessage.h"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatClientControlMessage.h"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatServerControlMessage.h"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatServerControlMessage.h"></File>
-				<File RelativePath="..\panda\src\pstatclient\config_pstats.h"></File>
-				<File RelativePath="..\panda\src\pstatclient\config_pstats.cxx"></File>
+				<File RelativePath="..\panda\src\pstatclient\config_pstatclient.h"></File>
+				<File RelativePath="..\panda\src\pstatclient\config_pstatclient.cxx"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatClient.cxx"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatClient.cxx"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatFrameData.I"></File>
 				<File RelativePath="..\panda\src\pstatclient\pStatFrameData.I"></File>
 				<File RelativePath="..\panda\src\pstatclient\test_client.cxx"></File>
 				<File RelativePath="..\panda\src\pstatclient\test_client.cxx"></File>

+ 1 - 1
panda/metalibs/panda/panda.cxx

@@ -11,7 +11,7 @@
 #include "config_display.h"
 #include "config_display.h"
 #include "config_pgraph.h"
 #include "config_pgraph.h"
 #ifdef DO_PSTATS
 #ifdef DO_PSTATS
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #endif
 #endif
 
 
 // By including checkPandaVersion.h, we guarantee that runtime attempts to
 // By including checkPandaVersion.h, we guarantee that runtime attempts to

+ 1 - 1
panda/src/android/android_main.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "config_android.h"
 #include "config_android.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "virtualFileMountAndroidAsset.h"
 #include "virtualFileMountAndroidAsset.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "filename.h"
 #include "filename.h"

+ 1 - 1
panda/src/audio/audioManager.cxx

@@ -18,7 +18,7 @@
 #include "nullAudioManager.h"
 #include "nullAudioManager.h"
 #include "windowsRegistry.h"
 #include "windowsRegistry.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "load_dso.h"
 #include "load_dso.h"
 
 
 #ifdef WIN32
 #ifdef WIN32

+ 1 - 1
panda/src/audiotraits/fmodAudioManager.cxx

@@ -20,7 +20,7 @@
 
 
 // Panda headers.
 // Panda headers.
 #include "config_audio.h"
 #include "config_audio.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "fmodAudioManager.h"
 #include "fmodAudioManager.h"
 #include "fmodAudioSound.h"
 #include "fmodAudioSound.h"
 #include "filename.h"
 #include "filename.h"

+ 1 - 1
panda/src/audiotraits/milesAudioManager.cxx

@@ -21,7 +21,7 @@
 #include "milesAudioStream.h"
 #include "milesAudioStream.h"
 #include "globalMilesManager.h"
 #include "globalMilesManager.h"
 #include "config_audio.h"
 #include "config_audio.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "nullAudioSound.h"
 #include "nullAudioSound.h"

+ 1 - 1
panda/src/audiotraits/openalAudioManager.cxx

@@ -14,7 +14,7 @@
 
 
 // Panda headers.
 // Panda headers.
 #include "config_audio.h"
 #include "config_audio.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "config_openalAudio.h"
 #include "config_openalAudio.h"
 #include "openalAudioManager.h"
 #include "openalAudioManager.h"

+ 6 - 1
panda/src/bullet/bulletWorld.cxx

@@ -1052,7 +1052,7 @@ BulletPersistentManifold *BulletWorld::
 get_manifold(int idx) const {
 get_manifold(int idx) const {
   LightMutexHolder holder(get_global_lock());
   LightMutexHolder holder(get_global_lock());
 
 
-  nassertr(idx < get_num_manifolds(), NULL);
+  nassertr(idx < _dispatcher->getNumManifolds(), NULL);
 
 
   btPersistentManifold *ptr = _dispatcher->getManifoldByIndexInternal(idx);
   btPersistentManifold *ptr = _dispatcher->getManifoldByIndexInternal(idx);
   return (ptr) ? new BulletPersistentManifold(ptr) : NULL;
   return (ptr) ? new BulletPersistentManifold(ptr) : NULL;
@@ -1186,7 +1186,12 @@ tick_callback(btDynamicsWorld *world, btScalar timestep) {
   CallbackObject *obj = w->_tick_callback_obj;
   CallbackObject *obj = w->_tick_callback_obj;
   if (obj) {
   if (obj) {
     BulletTickCallbackData cbdata(timestep);
     BulletTickCallbackData cbdata(timestep);
+    // Release the global lock that we are holding during the tick callback
+    // and allow interactions with bullet world in the user callback
+    get_global_lock().release();
     obj->do_callback(&cbdata);
     obj->do_callback(&cbdata);
+    // Acquire the global lock again and protect the execution
+    get_global_lock().acquire();
   }
   }
 }
 }
 
 

+ 1 - 1
panda/src/collada/load_collada_file.cxx

@@ -16,7 +16,7 @@
 #include "config_collada.h"
 #include "config_collada.h"
 #include "sceneGraphReducer.h"
 #include "sceneGraphReducer.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "bamCacheRecord.h"
 #include "bamCacheRecord.h"
 
 
 static PT(PandaNode)
 static PT(PandaNode)

+ 1 - 1
panda/src/display/graphicsPipeSelection.cxx

@@ -19,7 +19,7 @@
 #include "config_display.h"
 #include "config_display.h"
 #include "typeRegistry.h"
 #include "typeRegistry.h"
 #include "pset.h"
 #include "pset.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 #include <algorithm>
 #include <algorithm>
 
 

+ 1 - 1
panda/src/display/graphicsStateGuardian.cxx

@@ -58,7 +58,7 @@
 #include "colorScaleAttrib.h"
 #include "colorScaleAttrib.h"
 #include "clipPlaneAttrib.h"
 #include "clipPlaneAttrib.h"
 #include "fogAttrib.h"
 #include "fogAttrib.h"
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 
 
 #include <algorithm>
 #include <algorithm>
 #include <limits.h>
 #include <limits.h>

+ 1 - 1
panda/src/display/pStatGPUTimer.h

@@ -17,7 +17,7 @@
 #include "pandabase.h"
 #include "pandabase.h"
 #include "pStatTimer.h"
 #include "pStatTimer.h"
 #include "pStatCollector.h"
 #include "pStatCollector.h"
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #include "timerQueryContext.h"
 #include "timerQueryContext.h"
 
 
 class Thread;
 class Thread;

+ 17 - 0
panda/src/downloader/httpChannel.I

@@ -426,6 +426,23 @@ get_max_updates_per_second() const {
   return _max_updates_per_second;
   return _max_updates_per_second;
 }
 }
 
 
+/**
+ * Specifies the Content-Type header, useful for applications that require
+ * different types of content, such as JSON.
+ */
+INLINE void HTTPChannel::
+set_content_type(string content_type) {
+  _content_type = content_type;
+}
+
+/**
+ * Returns the value of the Content-Type header.
+ */
+INLINE string HTTPChannel::
+get_content_type() const {
+  return _content_type;
+}
+
 /**
 /**
  * This may be called immediately after a call to get_document() or some
  * This may be called immediately after a call to get_document() or some
  * related function to specify the expected size of the document we are
  * related function to specify the expected size of the document we are

+ 2 - 1
panda/src/downloader/httpChannel.cxx

@@ -100,6 +100,7 @@ HTTPChannel(HTTPClient *client) :
   _response_type = RT_none;
   _response_type = RT_none;
   _http_version = _client->get_http_version();
   _http_version = _client->get_http_version();
   _http_version_string = _client->get_http_version_string();
   _http_version_string = _client->get_http_version_string();
+  _content_type = "application/x-www-form-urlencoded";
   _state = S_new;
   _state = S_new;
   _done_state = S_new;
   _done_state = S_new;
   _started_download = false;
   _started_download = false;
@@ -3624,7 +3625,7 @@ make_header() {
 
 
   if (!_body.empty()) {
   if (!_body.empty()) {
     stream
     stream
-      << "Content-Type: application/x-www-form-urlencoded\r\n"
+      << "Content-Type: " << _content_type << "\r\n"
       << "Content-Length: " << _body.length() << "\r\n";
       << "Content-Length: " << _body.length() << "\r\n";
   }
   }
 
 

+ 4 - 0
panda/src/downloader/httpChannel.h

@@ -143,6 +143,9 @@ PUBLISHED:
   INLINE void set_max_updates_per_second(double max_updates_per_second);
   INLINE void set_max_updates_per_second(double max_updates_per_second);
   INLINE double get_max_updates_per_second() const;
   INLINE double get_max_updates_per_second() const;
 
 
+  INLINE void set_content_type(string content_type);
+  INLINE string get_content_type() const;
+
   INLINE void set_expected_file_size(size_t file_size);
   INLINE void set_expected_file_size(size_t file_size);
   streamsize get_file_size() const;
   streamsize get_file_size() const;
   INLINE bool is_file_size_known() const;
   INLINE bool is_file_size_known() const;
@@ -336,6 +339,7 @@ private:
   string request_path;
   string request_path;
   string _header;
   string _header;
   string _body;
   string _body;
+  string _content_type;
   bool _want_ssl;
   bool _want_ssl;
   bool _proxy_serves_document;
   bool _proxy_serves_document;
   bool _proxy_tunnel_now;
   bool _proxy_tunnel_now;

+ 1 - 1
panda/src/egg/eggData.cxx

@@ -18,7 +18,7 @@
 #include "eggComment.h"
 #include "eggComment.h"
 #include "eggPoolUniquifier.h"
 #include "eggPoolUniquifier.h"
 #include "config_egg.h"
 #include "config_egg.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "string_utils.h"
 #include "string_utils.h"
 #include "dSearchPath.h"
 #include "dSearchPath.h"

+ 1 - 1
panda/src/egg2pg/load_egg_file.cxx

@@ -16,7 +16,7 @@
 #include "config_egg2pg.h"
 #include "config_egg2pg.h"
 #include "sceneGraphReducer.h"
 #include "sceneGraphReducer.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "bamCacheRecord.h"
 #include "bamCacheRecord.h"
 
 
 static PT(PandaNode)
 static PT(PandaNode)

+ 1 - 1
panda/src/egg2pg/save_egg_file.cxx

@@ -17,7 +17,7 @@
 #include "modelRoot.h"
 #include "modelRoot.h"
 #include "sceneGraphReducer.h"
 #include "sceneGraphReducer.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 /**
 /**
  * A convenience function; converts the indicated scene graph to an egg file
  * A convenience function; converts the indicated scene graph to an egg file

+ 1 - 0
panda/src/event/asyncTask.h

@@ -119,6 +119,7 @@ protected:
   double _wake_time;
   double _wake_time;
   int _sort;
   int _sort;
   int _priority;
   int _priority;
+  unsigned int _implicit_sort;
 
 
   State _state;
   State _state;
   Thread *_servicing_thread;
   Thread *_servicing_thread;

+ 5 - 1
panda/src/event/asyncTaskChain.cxx

@@ -51,7 +51,8 @@ AsyncTaskChain(AsyncTaskManager *manager, const string &name) :
   _needs_cleanup(false),
   _needs_cleanup(false),
   _current_frame(0),
   _current_frame(0),
   _time_in_frame(0.0),
   _time_in_frame(0.0),
-  _block_till_next_frame(false)
+  _block_till_next_frame(false),
+  _next_implicit_sort(0)
 {
 {
 }
 }
 
 
@@ -418,6 +419,9 @@ do_add(AsyncTask *task) {
   task->_start_time = now;
   task->_start_time = now;
   task->_start_frame = _manager->_clock->get_frame_count();
   task->_start_frame = _manager->_clock->get_frame_count();
 
 
+  // Remember the order in which tasks were added to the chain.
+  task->_implicit_sort = _next_implicit_sort++;
+
   _manager->add_task_by_name(task);
   _manager->add_task_by_name(task);
 
 
   if (task->has_delay()) {
   if (task->has_delay()) {

+ 8 - 1
panda/src/event/asyncTaskChain.h

@@ -146,7 +146,12 @@ protected:
       if (a->get_priority() != b->get_priority()) {
       if (a->get_priority() != b->get_priority()) {
         return a->get_priority() < b->get_priority();
         return a->get_priority() < b->get_priority();
       }
       }
-      return a->get_start_time() > b->get_start_time();
+      if (a->get_start_time() != b->get_start_time()) {
+        return a->get_start_time() > b->get_start_time();
+      }
+      // Failing any other ordering criteria, we sort the tasks based on the
+      // order in which they were added to the task chain.
+      return a->_implicit_sort > b->_implicit_sort;
     }
     }
   };
   };
 
 
@@ -186,6 +191,8 @@ protected:
   double _time_in_frame;
   double _time_in_frame;
   bool _block_till_next_frame;
   bool _block_till_next_frame;
 
 
+  unsigned int _next_implicit_sort;
+
   static PStatCollector _task_pcollector;
   static PStatCollector _task_pcollector;
   static PStatCollector _wait_pcollector;
   static PStatCollector _wait_pcollector;
 
 

+ 3 - 0
panda/src/event/pythonTask.cxx

@@ -94,6 +94,9 @@ PythonTask::
     PyErr_Restore(_exception, _exc_value, _exc_traceback);
     PyErr_Restore(_exception, _exc_value, _exc_traceback);
     PyErr_Print();
     PyErr_Print();
     PyErr_Restore(nullptr, nullptr, nullptr);
     PyErr_Restore(nullptr, nullptr, nullptr);
+    _exception = nullptr;
+    _exc_value = nullptr;
+    _exc_traceback = nullptr;
   }
   }
 #endif
 #endif
 
 

+ 2 - 2
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -14,7 +14,7 @@
  *   get_supports_cg_profile)
  *   get_supports_cg_profile)
  */
  */
 
 
-#include "config_util.h"
+#include "config_putil.h"
 #include "displayRegion.h"
 #include "displayRegion.h"
 #include "renderBuffer.h"
 #include "renderBuffer.h"
 #include "geom.h"
 #include "geom.h"
@@ -12647,7 +12647,7 @@ upload_texture_image(CLP(TextureContext) *gtc, bool needs_reload,
   int depth = tex->get_expected_mipmap_z_size(mipmap_bias);
   int depth = tex->get_expected_mipmap_z_size(mipmap_bias);
 
 
   // Determine the number of images to upload.
   // Determine the number of images to upload.
-  int num_levels = 1;
+  int num_levels = mipmap_bias + 1;
   if (uses_mipmaps) {
   if (uses_mipmaps) {
     num_levels = tex->get_expected_num_mipmap_levels();
     num_levels = tex->get_expected_num_mipmap_levels();
   }
   }

+ 1 - 1
panda/src/gobj/config_gobj.cxx

@@ -13,7 +13,7 @@
 
 
 #include "animateVerticesRequest.h"
 #include "animateVerticesRequest.h"
 #include "bufferContext.h"
 #include "bufferContext.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_gobj.h"
 #include "config_gobj.h"
 #include "geom.h"
 #include "geom.h"
 #include "geomCacheEntry.h"
 #include "geomCacheEntry.h"

+ 1 - 1
panda/src/gobj/shader.cxx

@@ -19,7 +19,7 @@
 #include "shader.h"
 #include "shader.h"
 #include "preparedGraphicsObjects.h"
 #include "preparedGraphicsObjects.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "bamCache.h"
 #include "bamCache.h"
 #include "string_utils.h"
 #include "string_utils.h"
 
 

+ 1 - 1
panda/src/gobj/texture.cxx

@@ -16,7 +16,7 @@
 #include "pandabase.h"
 #include "pandabase.h"
 #include "texture.h"
 #include "texture.h"
 #include "config_gobj.h"
 #include "config_gobj.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "texturePool.h"
 #include "texturePool.h"
 #include "textureContext.h"
 #include "textureContext.h"
 #include "bamCache.h"
 #include "bamCache.h"

+ 1 - 1
panda/src/gobj/texturePool.cxx

@@ -15,7 +15,7 @@
 
 
 #include "texturePool.h"
 #include "texturePool.h"
 #include "config_gobj.h"
 #include "config_gobj.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "string_utils.h"
 #include "string_utils.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"

+ 1 - 1
panda/src/iphonedisplay/iPhoneGraphicsWindow.mm

@@ -31,7 +31,7 @@
 #include "throw_event.h"
 #include "throw_event.h"
 #include "pnmImage.h"
 #include "pnmImage.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "pset.h"
 #include "pset.h"
 #include "pmutex.h"
 #include "pmutex.h"
 
 

+ 1 - 1
panda/src/movies/movieTypeRegistry.cxx

@@ -14,7 +14,7 @@
 #include "movieTypeRegistry.h"
 #include "movieTypeRegistry.h"
 #include "string_utils.h"
 #include "string_utils.h"
 #include "config_movies.h"
 #include "config_movies.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "load_dso.h"
 #include "load_dso.h"
 
 
 MovieTypeRegistry *MovieTypeRegistry::_global_ptr = NULL;
 MovieTypeRegistry *MovieTypeRegistry::_global_ptr = NULL;

+ 1 - 1
panda/src/osxdisplay/osxGraphicsWindow.mm

@@ -36,7 +36,7 @@
 #include "throw_event.h"
 #include "throw_event.h"
 #include "pnmImage.h"
 #include "pnmImage.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "pset.h"
 #include "pset.h"
 #include "pmutex.h"
 #include "pmutex.h"
 
 

+ 1 - 1
panda/src/pgraph/bamFile.cxx

@@ -16,7 +16,7 @@
 
 
 #include "bam.h"
 #include "bam.h"
 #include "bamCacheRecord.h"
 #include "bamCacheRecord.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "bamReader.h"
 #include "bamReader.h"
 #include "bamWriter.h"
 #include "bamWriter.h"
 #include "filename.h"
 #include "filename.h"

+ 1 - 1
panda/src/pgraph/loader.cxx

@@ -19,7 +19,7 @@
 #include "modelLoadRequest.h"
 #include "modelLoadRequest.h"
 #include "modelSaveRequest.h"
 #include "modelSaveRequest.h"
 #include "config_express.h"
 #include "config_express.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "filename.h"
 #include "filename.h"
 #include "load_dso.h"
 #include "load_dso.h"

+ 1 - 1
panda/src/pgraph/shaderPool.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "shaderPool.h"
 #include "shaderPool.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "loader.h"
 #include "loader.h"

+ 1 - 1
panda/src/physx/physxEnums.cxx

@@ -14,7 +14,7 @@
 #include "physxEnums.h"
 #include "physxEnums.h"
 
 
 #include "string_utils.h"
 #include "string_utils.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 ostream &
 ostream &
 operator << (ostream &out, PhysxEnums::PhysxUpAxis axis) {
 operator << (ostream &out, PhysxEnums::PhysxUpAxis axis) {

+ 1 - 1
panda/src/pnmtext/freetypeFont.cxx

@@ -16,7 +16,7 @@
 #ifdef HAVE_FREETYPE
 #ifdef HAVE_FREETYPE
 
 
 #include "config_pnmtext.h"
 #include "config_pnmtext.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "nurbsCurveEvaluator.h"
 #include "nurbsCurveEvaluator.h"

+ 4 - 4
panda/src/pstatclient/config_pstats.cxx → panda/src/pstatclient/config_pstatclient.cxx

@@ -6,12 +6,12 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file config_pstats.cxx
+ * @file config_pstatclient.cxx
  * @author drose
  * @author drose
  * @date 2000-07-09
  * @date 2000-07-09
  */
  */
 
 
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 
 
 #include "dconfig.h"
 #include "dconfig.h"
 
 
@@ -19,10 +19,10 @@
   #error Buildsystem error: BUILDING_PANDA_PSTATCLIENT not defined
   #error Buildsystem error: BUILDING_PANDA_PSTATCLIENT not defined
 #endif
 #endif
 
 
-ConfigureDef(config_pstats);
+ConfigureDef(config_pstatclient);
 NotifyCategoryDef(pstats, "");
 NotifyCategoryDef(pstats, "");
 
 
-ConfigureFn(config_pstats) {
+ConfigureFn(config_pstatclient) {
   init_libpstatclient();
   init_libpstatclient();
 }
 }
 
 

+ 50 - 0
panda/src/pstatclient/config_pstatclient.h

@@ -0,0 +1,50 @@
+/**
+ * PANDA 3D SOFTWARE
+ * Copyright (c) Carnegie Mellon University.  All rights reserved.
+ *
+ * All use of this software is subject to the terms of the revised BSD
+ * license.  You should have received a copy of this license along
+ * with this source code in a file named "LICENSE."
+ *
+ * @file config_pstatclient.h
+ * @author drose
+ * @date 2000-07-09
+ */
+
+#ifndef CONFIG_PSTATS_H
+#define CONFIG_PSTATS_H
+
+#include "pandabase.h"
+
+#include "notifyCategoryProxy.h"
+#include "dconfig.h"
+#include "configVariableString.h"
+#include "configVariableInt.h"
+#include "configVariableDouble.h"
+#include "configVariableBool.h"
+
+// Configure variables for pstats package.
+
+ConfigureDecl(config_pstatclient, EXPCL_PANDA_PSTATCLIENT, EXPTP_PANDA_PSTATCLIENT);
+NotifyCategoryDecl(pstats, EXPCL_PANDA_PSTATCLIENT, EXPTP_PANDA_PSTATCLIENT);
+
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableString pstats_name;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_max_rate;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_threaded_write;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableInt pstats_max_queue_size;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_tcp_ratio;
+
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableString pstats_host;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableInt pstats_port;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_target_frame_rate;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_gpu_timing;
+
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_scroll_mode;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_history;
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_average_time;
+
+extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_mem_other;
+
+extern EXPCL_PANDA_PSTATCLIENT void init_libpstatclient();
+
+#endif

+ 2 - 50
panda/src/pstatclient/config_pstats.h

@@ -1,50 +1,2 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University.  All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license.  You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file config_pstats.h
- * @author drose
- * @date 2000-07-09
- */
-
-#ifndef CONFIG_PSTATS_H
-#define CONFIG_PSTATS_H
-
-#include "pandabase.h"
-
-#include "notifyCategoryProxy.h"
-#include "dconfig.h"
-#include "configVariableString.h"
-#include "configVariableInt.h"
-#include "configVariableDouble.h"
-#include "configVariableBool.h"
-
-// Configure variables for pstats package.
-
-ConfigureDecl(config_pstats, EXPCL_PANDA_PSTATCLIENT, EXPTP_PANDA_PSTATCLIENT);
-NotifyCategoryDecl(pstats, EXPCL_PANDA_PSTATCLIENT, EXPTP_PANDA_PSTATCLIENT);
-
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableString pstats_name;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_max_rate;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_threaded_write;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableInt pstats_max_queue_size;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_tcp_ratio;
-
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableString pstats_host;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableInt pstats_port;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_target_frame_rate;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_gpu_timing;
-
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_scroll_mode;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_history;
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableDouble pstats_average_time;
-
-extern EXPCL_PANDA_PSTATCLIENT ConfigVariableBool pstats_mem_other;
-
-extern EXPCL_PANDA_PSTATCLIENT void init_libpstatclient();
-
-#endif
+// This file to remain during the whole 1.10.x cycle; remove after that.
+#error config_pstats.h has been renamed to config_pstatclient.h - please update your project.

+ 1 - 1
panda/src/pstatclient/p3pstatclient_composite1.cxx

@@ -1,5 +1,5 @@
 
 
-#include "config_pstats.cxx"
+#include "config_pstatclient.cxx"
 #include "pStatClient.cxx"
 #include "pStatClient.cxx"
 #include "pStatClientImpl.cxx"
 #include "pStatClientImpl.cxx"
 #include "pStatClientVersion.cxx"
 #include "pStatClientVersion.cxx"

+ 1 - 1
panda/src/pstatclient/pStatClient.cxx

@@ -21,7 +21,7 @@
 #include "pStatServerControlMessage.h"
 #include "pStatServerControlMessage.h"
 #include "pStatCollector.h"
 #include "pStatCollector.h"
 #include "pStatThread.h"
 #include "pStatThread.h"
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #include "pStatProperties.h"
 #include "pStatProperties.h"
 #include "thread.h"
 #include "thread.h"
 #include "clockObject.h"
 #include "clockObject.h"

+ 1 - 1
panda/src/pstatclient/pStatClientControlMessage.cxx

@@ -11,7 +11,7 @@
  * @date 2000-07-09
  * @date 2000-07-09
  */
  */
 
 
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #include "pStatClientControlMessage.h"
 #include "pStatClientControlMessage.h"
 #include "pStatClientVersion.h"
 #include "pStatClientVersion.h"
 
 

+ 1 - 1
panda/src/pstatclient/pStatClientImpl.cxx

@@ -21,7 +21,7 @@
 #include "pStatServerControlMessage.h"
 #include "pStatServerControlMessage.h"
 #include "pStatCollector.h"
 #include "pStatCollector.h"
 #include "pStatThread.h"
 #include "pStatThread.h"
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #include "pStatProperties.h"
 #include "pStatProperties.h"
 #include "cmath.h"
 #include "cmath.h"
 
 

+ 1 - 1
panda/src/pstatclient/pStatFrameData.cxx

@@ -13,7 +13,7 @@
 
 
 #include "pStatFrameData.h"
 #include "pStatFrameData.h"
 #include "pStatClientVersion.h"
 #include "pStatClientVersion.h"
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 
 
 #include "datagram.h"
 #include "datagram.h"
 #include "datagramIterator.h"
 #include "datagramIterator.h"

+ 1 - 1
panda/src/pstatclient/pStatProperties.cxx

@@ -14,7 +14,7 @@
 #include "pStatProperties.h"
 #include "pStatProperties.h"
 #include "pStatCollectorDef.h"
 #include "pStatCollectorDef.h"
 #include "pStatClient.h"
 #include "pStatClient.h"
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #include "configVariableBool.h"
 #include "configVariableBool.h"
 #include "configVariableColor.h"
 #include "configVariableColor.h"
 #include "configVariableDouble.h"
 #include "configVariableDouble.h"

+ 1 - 1
panda/src/pstatclient/pStatServerControlMessage.cxx

@@ -11,7 +11,7 @@
  * @date 2000-07-09
  * @date 2000-07-09
  */
  */
 
 
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #include "pStatServerControlMessage.h"
 #include "pStatServerControlMessage.h"
 
 
 #include "datagram.h"
 #include "datagram.h"

+ 1 - 1
panda/src/pstatclient/test_client.cxx

@@ -11,7 +11,7 @@
  * @date 2000-07-09
  * @date 2000-07-09
  */
  */
 
 
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 #include "pStatClient.h"
 #include "pStatClient.h"
 #include "pStatCollector.h"
 #include "pStatCollector.h"
 #include "thread.h"
 #include "thread.h"

+ 1 - 1
panda/src/putil/autoTextureScale.cxx

@@ -13,7 +13,7 @@
 
 
 #include "autoTextureScale.h"
 #include "autoTextureScale.h"
 #include "string_utils.h"
 #include "string_utils.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 ostream &
 ostream &
 operator << (ostream &out, AutoTextureScale ats) {
 operator << (ostream &out, AutoTextureScale ats) {

+ 1 - 1
panda/src/putil/bamCache.cxx

@@ -18,7 +18,7 @@
 #include "hashVal.h"
 #include "hashVal.h"
 #include "datagramInputFile.h"
 #include "datagramInputFile.h"
 #include "datagramOutputFile.h"
 #include "datagramOutputFile.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "bam.h"
 #include "bam.h"
 #include "typeRegistry.h"
 #include "typeRegistry.h"
 #include "string_utils.h"
 #include "string_utils.h"

+ 1 - 1
panda/src/putil/bamCacheIndex.cxx

@@ -14,7 +14,7 @@
 #include "bamCacheIndex.h"
 #include "bamCacheIndex.h"
 #include "bamReader.h"
 #include "bamReader.h"
 #include "bamWriter.h"
 #include "bamWriter.h"
-#include "config_util.h" // util_cat
+#include "config_putil.h" // util_cat
 #include "indent.h"
 #include "indent.h"
 #include <algorithm>
 #include <algorithm>
 
 

+ 1 - 1
panda/src/putil/bamCacheRecord.cxx

@@ -17,7 +17,7 @@
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "virtualFile.h"
 #include "virtualFile.h"
 #include "indent.h"
 #include "indent.h"
-#include "config_util.h" // util_cat
+#include "config_putil.h" // util_cat
 
 
 TypeHandle BamCacheRecord::_type_handle;
 TypeHandle BamCacheRecord::_type_handle;
 
 

+ 1 - 1
panda/src/putil/bamEnums.cxx

@@ -13,7 +13,7 @@
 
 
 #include "bamEnums.h"
 #include "bamEnums.h"
 #include "string_utils.h"
 #include "string_utils.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 ostream &
 ostream &
 operator << (ostream &out, BamEnums::BamEndian be) {
 operator << (ostream &out, BamEnums::BamEndian be) {

+ 1 - 1
panda/src/putil/bamReader.cxx

@@ -17,7 +17,7 @@
 #include "bam.h"
 #include "bam.h"
 #include "bamReader.h"
 #include "bamReader.h"
 #include "datagramIterator.h"
 #include "datagramIterator.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "pipelineCyclerBase.h"
 #include "pipelineCyclerBase.h"
 
 
 TypeHandle BamReaderAuxData::_type_handle;
 TypeHandle BamReaderAuxData::_type_handle;

+ 1 - 1
panda/src/putil/bamReader_ext.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "bamReader_ext.h"
 #include "bamReader_ext.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "pythonThread.h"
 #include "pythonThread.h"
 
 
 #ifdef HAVE_PYTHON
 #ifdef HAVE_PYTHON

+ 29 - 3
panda/src/putil/bamWriter.cxx

@@ -15,7 +15,7 @@
 #include "pnotify.h"
 #include "pnotify.h"
 
 
 #include "typedWritable.h"
 #include "typedWritable.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "bam.h"
 #include "bam.h"
 #include "bamWriter.h"
 #include "bamWriter.h"
 #include "bamReader.h"
 #include "bamReader.h"
@@ -94,6 +94,10 @@ BamWriter::
   for (si = _state_map.begin(); si != _state_map.end(); ++si) {
   for (si = _state_map.begin(); si != _state_map.end(); ++si) {
     TypedWritable *object = (TypedWritable *)(*si).first;
     TypedWritable *object = (TypedWritable *)(*si).first;
     object->remove_bam_writer(this);
     object->remove_bam_writer(this);
+
+    if ((*si).second._refcount != nullptr) {
+      unref_delete((*si).second._refcount);
+    }
   }
   }
 }
 }
 
 
@@ -529,6 +533,9 @@ object_destructs(TypedWritable *object) {
     // we're in trouble when we do write it out.
     // we're in trouble when we do write it out.
     nassertv(!(*si).second._written_seq.is_initial());
     nassertv(!(*si).second._written_seq.is_initial());
 
 
+    // This cannot be called if we are still holding a reference to it.
+    nassertv((*si).second._refcount == nullptr);
+
     int object_id = (*si).second._object_id;
     int object_id = (*si).second._object_id;
     _freed_object_ids.push_back(object_id);
     _freed_object_ids.push_back(object_id);
 
 
@@ -606,8 +613,10 @@ enqueue_object(const TypedWritable *object) {
     // No, it hasn't, so assign it the next number in sequence arbitrarily.
     // No, it hasn't, so assign it the next number in sequence arbitrarily.
     object_id = _next_object_id;
     object_id = _next_object_id;
 
 
-    bool inserted =
-      _state_map.insert(StateMap::value_type(object, StoreState(_next_object_id))).second;
+    StateMap::iterator si;
+    bool inserted;
+    tie(si, inserted) =
+      _state_map.insert(StateMap::value_type(object, StoreState(_next_object_id)));
     nassertr(inserted, false);
     nassertr(inserted, false);
 
 
     // Store ourselves on the TypedWritable so that we get notified when it
     // Store ourselves on the TypedWritable so that we get notified when it
@@ -615,6 +624,14 @@ enqueue_object(const TypedWritable *object) {
     (const_cast<TypedWritable*>(object))->add_bam_writer(this);
     (const_cast<TypedWritable*>(object))->add_bam_writer(this);
     _next_object_id++;
     _next_object_id++;
 
 
+    // Increase the reference count if this inherits from ReferenceCount,
+    // until we get a chance to write this object for the first time.
+    const ReferenceCount *rc = ((TypedWritable *)object)->as_reference_count();
+    if (rc != nullptr) {
+      rc->ref();
+      (*si).second._refcount = rc;
+    }
+
   } else {
   } else {
     // Yes, it has; get the object ID.
     // Yes, it has; get the object ID.
     object_id = (*si).second._object_id;
     object_id = (*si).second._object_id;
@@ -703,6 +720,15 @@ flush_queue() {
       (*si).second._written_seq = _writing_seq;
       (*si).second._written_seq = _writing_seq;
       (*si).second._modified = object->get_bam_modified();
       (*si).second._modified = object->get_bam_modified();
 
 
+      // Now release any reference we hold to it, so that it may destruct.
+      const ReferenceCount *rc = (*si).second._refcount;
+      if (rc != nullptr) {
+        // We need to assign this pointer to null before deleting the object,
+        // since that may end up calling object_destructs.
+        (*si).second._refcount = nullptr;
+        unref_delete(rc);
+      }
+
     } else {
     } else {
       // On subsequent times when we write a particular object, we write
       // On subsequent times when we write a particular object, we write
       // simply TypeHandle::none(), followed by the object ID. The occurrence
       // simply TypeHandle::none(), followed by the object ID. The occurrence

+ 2 - 1
panda/src/putil/bamWriter.h

@@ -140,8 +140,9 @@ private:
     int _object_id;
     int _object_id;
     UpdateSeq _written_seq;
     UpdateSeq _written_seq;
     UpdateSeq _modified;
     UpdateSeq _modified;
+    const ReferenceCount *_refcount;
 
 
-    StoreState(int object_id) : _object_id(object_id) {}
+    StoreState(int object_id) : _object_id(object_id), _refcount(nullptr) {}
   };
   };
   typedef phash_map<const TypedWritable *, StoreState, pointer_hash> StateMap;
   typedef phash_map<const TypedWritable *, StoreState, pointer_hash> StateMap;
   StateMap _state_map;
   StateMap _state_map;

+ 1 - 1
panda/src/putil/buttonRegistry.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "buttonRegistry.h"
 #include "buttonRegistry.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 #include <stdio.h>
 #include <stdio.h>
 
 

+ 1 - 1
panda/src/putil/clockObject.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "clockObject.h"
 #include "clockObject.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "configVariableEnum.h"
 #include "configVariableEnum.h"
 #include "string_utils.h"
 #include "string_utils.h"
 #include "thread.h"
 #include "thread.h"

+ 1 - 1
panda/src/putil/colorSpace.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "colorSpace.h"
 #include "colorSpace.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "configVariableEnum.h"
 #include "configVariableEnum.h"
 #include "string_utils.h"
 #include "string_utils.h"
 
 

+ 0 - 0
panda/src/putil/config_util.N → panda/src/putil/config_putil.N


+ 4 - 4
panda/src/putil/config_util.cxx → panda/src/putil/config_putil.cxx

@@ -6,12 +6,12 @@
  * license.  You should have received a copy of this license along
  * license.  You should have received a copy of this license along
  * with this source code in a file named "LICENSE."
  * with this source code in a file named "LICENSE."
  *
  *
- * @file config_util.cxx
+ * @file config_putil.cxx
  * @author cary
  * @author cary
  * @date 2000-01-04
  * @date 2000-01-04
  */
  */
 
 
-#include "config_util.h"
+#include "config_putil.h"
 #include "animInterface.h"
 #include "animInterface.h"
 #include "bamCacheIndex.h"
 #include "bamCacheIndex.h"
 #include "bamCacheRecord.h"
 #include "bamCacheRecord.h"
@@ -51,7 +51,7 @@
   #error Buildsystem error: BUILDING_PANDA_PUTIL not defined
   #error Buildsystem error: BUILDING_PANDA_PUTIL not defined
 #endif
 #endif
 
 
-ConfigureDef(config_util);
+ConfigureDef(config_putil);
 NotifyCategoryDef(util, "");
 NotifyCategoryDef(util, "");
 NotifyCategoryDef(bam, util_cat);
 NotifyCategoryDef(bam, util_cat);
 
 
@@ -88,7 +88,7 @@ ConfigVariableEnum<BamEnums::BamTextureMode> bam_texture_mode
  PRC_DESC("Set this to specify how textures should be written into Bam files."
  PRC_DESC("Set this to specify how textures should be written into Bam files."
           "See the panda source or documentation for available options."));
           "See the panda source or documentation for available options."));
 
 
-ConfigureFn(config_util) {
+ConfigureFn(config_putil) {
   init_libputil();
   init_libputil();
 }
 }
 
 

+ 55 - 0
panda/src/putil/config_putil.h

@@ -0,0 +1,55 @@
+/**
+ * PANDA 3D SOFTWARE
+ * Copyright (c) Carnegie Mellon University.  All rights reserved.
+ *
+ * All use of this software is subject to the terms of the revised BSD
+ * license.  You should have received a copy of this license along
+ * with this source code in a file named "LICENSE."
+ *
+ * @file config_putil.h
+ * @author cary
+ * @date 2000-01-04
+ */
+
+#ifndef __CONFIG_UTIL_H__
+#define __CONFIG_UTIL_H__
+
+#include "pandabase.h"
+#include "notifyCategoryProxy.h"
+#include "configVariableSearchPath.h"
+#include "configVariableEnum.h"
+#include "configVariableDouble.h"
+#include "bamEnums.h"
+#include "dconfig.h"
+
+class DSearchPath;
+
+ConfigureDecl(config_putil, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL);
+NotifyCategoryDecl(util, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL);
+NotifyCategoryDecl(bam, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL);
+
+// Actually, we can't determine this config variable the normal way, because
+// we must be able to access it at static init time.  Instead of declaring it
+// a global constant, we'll make it a member of MemoryUsage.  extern
+// EXPCL_PANDA_PUTIL const bool track_memory_usage;
+
+extern EXPCL_PANDA_PUTIL ConfigVariableInt bam_version;
+extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamEndian> bam_endian;
+extern EXPCL_PANDA_PUTIL ConfigVariableBool bam_stdfloat_double;
+extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamTextureMode> bam_texture_mode;
+
+BEGIN_PUBLISH
+EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_model_path();
+EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_plugin_path();
+END_PUBLISH
+
+extern ConfigVariableDouble sleep_precision;
+
+extern EXPCL_PANDA_PUTIL ConfigVariableBool preload_textures;
+extern EXPCL_PANDA_PUTIL ConfigVariableBool preload_simple_textures;
+extern EXPCL_PANDA_PUTIL ConfigVariableBool compressed_textures;
+extern EXPCL_PANDA_PUTIL ConfigVariableBool cache_check_timestamps;
+
+extern EXPCL_PANDA_PUTIL void init_libputil();
+
+#endif /* __CONFIG_UTIL_H__ */

+ 2 - 55
panda/src/putil/config_util.h

@@ -1,55 +1,2 @@
-/**
- * PANDA 3D SOFTWARE
- * Copyright (c) Carnegie Mellon University.  All rights reserved.
- *
- * All use of this software is subject to the terms of the revised BSD
- * license.  You should have received a copy of this license along
- * with this source code in a file named "LICENSE."
- *
- * @file config_util.h
- * @author cary
- * @date 2000-01-04
- */
-
-#ifndef __CONFIG_UTIL_H__
-#define __CONFIG_UTIL_H__
-
-#include "pandabase.h"
-#include "notifyCategoryProxy.h"
-#include "configVariableSearchPath.h"
-#include "configVariableEnum.h"
-#include "configVariableDouble.h"
-#include "bamEnums.h"
-#include "dconfig.h"
-
-class DSearchPath;
-
-ConfigureDecl(config_util, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL);
-NotifyCategoryDecl(util, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL);
-NotifyCategoryDecl(bam, EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL);
-
-// Actually, we can't determine this config variable the normal way, because
-// we must be able to access it at static init time.  Instead of declaring it
-// a global constant, we'll make it a member of MemoryUsage.  extern
-// EXPCL_PANDA_PUTIL const bool track_memory_usage;
-
-extern EXPCL_PANDA_PUTIL ConfigVariableInt bam_version;
-extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamEndian> bam_endian;
-extern EXPCL_PANDA_PUTIL ConfigVariableBool bam_stdfloat_double;
-extern EXPCL_PANDA_PUTIL ConfigVariableEnum<BamEnums::BamTextureMode> bam_texture_mode;
-
-BEGIN_PUBLISH
-EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_model_path();
-EXPCL_PANDA_PUTIL ConfigVariableSearchPath &get_plugin_path();
-END_PUBLISH
-
-extern ConfigVariableDouble sleep_precision;
-
-extern EXPCL_PANDA_PUTIL ConfigVariableBool preload_textures;
-extern EXPCL_PANDA_PUTIL ConfigVariableBool preload_simple_textures;
-extern EXPCL_PANDA_PUTIL ConfigVariableBool compressed_textures;
-extern EXPCL_PANDA_PUTIL ConfigVariableBool cache_check_timestamps;
-
-extern EXPCL_PANDA_PUTIL void init_libputil();
-
-#endif /* __CONFIG_UTIL_H__ */
+// This file to remain during the whole 1.10.x cycle; remove after that.
+#error config_util.h has been renamed to config_putil.h - please update your project.

+ 1 - 1
panda/src/putil/copyOnWritePointer.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "copyOnWritePointer.h"
 #include "copyOnWritePointer.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_pipeline.h"
 #include "config_pipeline.h"
 
 
 #ifdef COW_THREADED
 #ifdef COW_THREADED

+ 1 - 1
panda/src/putil/datagramInputFile.cxx

@@ -16,7 +16,7 @@
 #include "numeric_types.h"
 #include "numeric_types.h"
 #include "datagramIterator.h"
 #include "datagramIterator.h"
 #include "profileTimer.h"
 #include "profileTimer.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "streamReader.h"
 #include "streamReader.h"

+ 1 - 1
panda/src/putil/datagramOutputFile.h

@@ -21,7 +21,7 @@
 #include "fileReference.h"
 #include "fileReference.h"
 #include "virtualFile.h"
 #include "virtualFile.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 /**
 /**
  * This class can be used to write a binary file that consists of an arbitrary
  * This class can be used to write a binary file that consists of an arbitrary

+ 1 - 1
panda/src/putil/factoryBase.cxx

@@ -13,7 +13,7 @@
 
 
 #include "factoryBase.h"
 #include "factoryBase.h"
 #include "indent.h"
 #include "indent.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 /**
 /**
  *
  *

+ 1 - 1
panda/src/putil/globalPointerRegistry.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "globalPointerRegistry.h"
 #include "globalPointerRegistry.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 // In general, we use the util_cat->info() syntax in this file (instead of
 // In general, we use the util_cat->info() syntax in this file (instead of
 // util_cat.info()), because much of this work is done at static init time,
 // util_cat.info()), because much of this work is done at static init time,

+ 1 - 1
panda/src/putil/keyboardButton.cxx

@@ -84,7 +84,7 @@ DEFINE_KEYBD_BUTTON_HANDLE(rmeta)
 
 
 /**
 /**
  * This is intended to be called only once, by the static initialization
  * This is intended to be called only once, by the static initialization
- * performed in config_util.cxx.
+ * performed in config_putil.cxx.
  */
  */
 void KeyboardButton::
 void KeyboardButton::
 init_keyboard_buttons() {
 init_keyboard_buttons() {

+ 1 - 1
panda/src/putil/load_prc_file.cxx

@@ -16,7 +16,7 @@
 #include "configVariableManager.h"
 #include "configVariableManager.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "config_express.h"
 #include "config_express.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "hashVal.h"
 #include "hashVal.h"
 
 
 /**
 /**

+ 2 - 2
panda/src/putil/loaderOptions.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "loaderOptions.h"
 #include "loaderOptions.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "indent.h"
 #include "indent.h"
 
 
 /**
 /**
@@ -25,7 +25,7 @@ LoaderOptions(int flags) :
   _texture_num_views(0),
   _texture_num_views(0),
   _auto_texture_scale(ATS_unspecified)
   _auto_texture_scale(ATS_unspecified)
 {
 {
-  // Shadowing the variables in config_util for static init ordering issues.
+  // Shadowing the variables in config_putil for static init ordering issues.
   static ConfigVariableBool *preload_textures;
   static ConfigVariableBool *preload_textures;
   static ConfigVariableBool *preload_simple_textures;
   static ConfigVariableBool *preload_simple_textures;
   static ConfigVariableBool *compressed_textures;
   static ConfigVariableBool *compressed_textures;

+ 1 - 1
panda/src/putil/mouseButton.cxx

@@ -129,7 +129,7 @@ is_mouse_button(ButtonHandle button) {
 
 
 /**
 /**
  * This is intended to be called only once, by the static initialization
  * This is intended to be called only once, by the static initialization
- * performed in config_util.cxx.
+ * performed in config_putil.cxx.
  */
  */
 void MouseButton::
 void MouseButton::
 init_mouse_buttons() {
 init_mouse_buttons() {

+ 1 - 1
panda/src/putil/p3putil_composite1.cxx

@@ -17,7 +17,7 @@
 #include "callbackObject.cxx"
 #include "callbackObject.cxx"
 #include "clockObject.cxx"
 #include "clockObject.cxx"
 #include "colorSpace.cxx"
 #include "colorSpace.cxx"
-#include "config_util.cxx"
+#include "config_putil.cxx"
 #include "configurable.cxx"
 #include "configurable.cxx"
 #include "copyOnWriteObject.cxx"
 #include "copyOnWriteObject.cxx"
 #include "copyOnWritePointer.cxx"
 #include "copyOnWritePointer.cxx"

+ 1 - 1
panda/src/putil/pythonCallbackObject.cxx

@@ -18,7 +18,7 @@
 #include "py_panda.h"
 #include "py_panda.h"
 #include "pythonThread.h"
 #include "pythonThread.h"
 #include "callbackData.h"
 #include "callbackData.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 TypeHandle PythonCallbackObject::_type_handle;
 TypeHandle PythonCallbackObject::_type_handle;
 
 

+ 1 - 1
panda/src/putil/simpleHashMap.h

@@ -16,7 +16,7 @@
 
 
 #include "pandabase.h"
 #include "pandabase.h"
 #include "pvector.h"
 #include "pvector.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 /**
 /**
  * Entry in the SimpleHashMap.
  * Entry in the SimpleHashMap.

+ 1 - 1
panda/src/putil/test_filename.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "filename.h"
 #include "filename.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 #include "dSearchPath.h"
 #include "dSearchPath.h"
 
 

+ 1 - 1
panda/src/putil/weakKeyHashMap.h

@@ -16,7 +16,7 @@
 
 
 #include "pandabase.h"
 #include "pandabase.h"
 #include "pvector.h"
 #include "pvector.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "weakPointerTo.h"
 #include "weakPointerTo.h"
 
 
 /**
 /**

+ 1 - 1
panda/src/speedtree/speedTreeNode.cxx

@@ -15,7 +15,7 @@
 #include "speedTreeNode.h"
 #include "speedTreeNode.h"
 #include "stBasicTerrain.h"
 #include "stBasicTerrain.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "cullTraverser.h"
 #include "cullTraverser.h"
 #include "cullableObject.h"
 #include "cullableObject.h"
 #include "cullHandler.h"
 #include "cullHandler.h"

+ 1 - 1
panda/src/text/dynamicTextFont.cxx

@@ -28,7 +28,7 @@
 #endif
 #endif
 
 
 #include "config_text.h"
 #include "config_text.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "geomVertexData.h"
 #include "geomVertexData.h"

+ 1 - 1
panda/src/text/fontPool.cxx

@@ -14,7 +14,7 @@
 #include "fontPool.h"
 #include "fontPool.h"
 #include "staticTextFont.h"
 #include "staticTextFont.h"
 #include "dynamicTextFont.h"
 #include "dynamicTextFont.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_express.h"
 #include "config_express.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
 #include "nodePath.h"
 #include "nodePath.h"

+ 1 - 1
panda/src/tinydisplay/tinyOsxGraphicsWindow.mm

@@ -26,7 +26,7 @@
 #include "throw_event.h"
 #include "throw_event.h"
 #include "pnmImage.h"
 #include "pnmImage.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 #include <ApplicationServices/ApplicationServices.h>
 #include <ApplicationServices/ApplicationServices.h>
 
 

+ 1 - 1
panda/src/windisplay/winGraphicsWindow.cxx

@@ -19,7 +19,7 @@
 #include "keyboardButton.h"
 #include "keyboardButton.h"
 #include "mouseButton.h"
 #include "mouseButton.h"
 #include "clockObject.h"
 #include "clockObject.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "throw_event.h"
 #include "throw_event.h"
 #include "nativeWindowHandle.h"
 #include "nativeWindowHandle.h"
 
 

+ 1 - 1
pandatool/src/bam/eggToBam.cxx

@@ -13,7 +13,7 @@
 
 
 #include "eggToBam.h"
 #include "eggToBam.h"
 
 
-#include "config_util.h"
+#include "config_putil.h"
 #include "bamFile.h"
 #include "bamFile.h"
 #include "load_egg_file.h"
 #include "load_egg_file.h"
 #include "config_egg2pg.h"
 #include "config_egg2pg.h"

+ 1 - 1
pandatool/src/bam/ptsToBam.cxx

@@ -13,7 +13,7 @@
 
 
 #include "ptsToBam.h"
 #include "ptsToBam.h"
 
 
-#include "config_util.h"
+#include "config_putil.h"
 #include "geomPoints.h"
 #include "geomPoints.h"
 #include "bamFile.h"
 #include "bamFile.h"
 #include "pandaNode.h"
 #include "pandaNode.h"

+ 1 - 1
pandatool/src/converter/somethingToEggConverter.h

@@ -17,7 +17,7 @@
 #include "pandatoolbase.h"
 #include "pandatoolbase.h"
 
 
 #include "filename.h"
 #include "filename.h"
-#include "config_util.h"  // for get_model_path()
+#include "config_putil.h"  // for get_model_path()
 #include "animationConvert.h"
 #include "animationConvert.h"
 #include "pathReplace.h"
 #include "pathReplace.h"
 #include "pointerTo.h"
 #include "pointerTo.h"

+ 1 - 1
pandatool/src/egg-palettize/txaFileFilter.cxx

@@ -20,7 +20,7 @@
 #include "dconfig.h"
 #include "dconfig.h"
 #include "configVariableFilename.h"
 #include "configVariableFilename.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 NotifyCategoryDeclNoExport(txafile);
 NotifyCategoryDeclNoExport(txafile);
 NotifyCategoryDef(txafile, "");
 NotifyCategoryDef(txafile, "");

+ 1 - 1
pandatool/src/eggbase/eggReader.cxx

@@ -14,7 +14,7 @@
 #include "eggReader.h"
 #include "eggReader.h"
 
 
 #include "pnmImage.h"
 #include "pnmImage.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "eggTextureCollection.h"
 #include "eggTextureCollection.h"
 #include "eggGroup.h"
 #include "eggGroup.h"
 #include "eggGroupNode.h"
 #include "eggGroupNode.h"

+ 1 - 1
pandatool/src/eggbase/somethingToEgg.cxx

@@ -14,7 +14,7 @@
 #include "somethingToEgg.h"
 #include "somethingToEgg.h"
 #include "somethingToEggConverter.h"
 #include "somethingToEggConverter.h"
 
 
-#include "config_util.h"
+#include "config_putil.h"
 
 
 /**
 /**
  * The first parameter to the constructor should be the one-word name of the
  * The first parameter to the constructor should be the one-word name of the

+ 1 - 1
pandatool/src/flt/fltTexture.cxx

@@ -16,7 +16,7 @@
 #include "fltRecordWriter.h"
 #include "fltRecordWriter.h"
 #include "fltHeader.h"
 #include "fltHeader.h"
 #include "pathReplace.h"
 #include "pathReplace.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 TypeHandle FltTexture::_type_handle;
 TypeHandle FltTexture::_type_handle;
 
 

+ 1 - 1
pandatool/src/gtk-stats/gtkStats.cxx

@@ -14,7 +14,7 @@
 #include "pandatoolbase.h"
 #include "pandatoolbase.h"
 #include "gtkStats.h"
 #include "gtkStats.h"
 #include "gtkStatsServer.h"
 #include "gtkStatsServer.h"
-#include "config_pstats.h"
+#include "config_pstatclient.h"
 
 
 GtkWidget *main_window;
 GtkWidget *main_window;
 static GtkStatsServer *server = NULL;
 static GtkStatsServer *server = NULL;

+ 1 - 1
pandatool/src/maxegg/maxToEggConverter.cxx

@@ -25,7 +25,7 @@
  */
  */
 
 
 #include "maxEgg.h"
 #include "maxEgg.h"
-#include "config_util.h"
+#include "config_putil.h"
 
 
 /**
 /**
  *
  *

+ 1 - 1
pandatool/src/mayaprogs/mayaPview.cxx

@@ -19,7 +19,7 @@
 #include "mayaToEggConverter.h"
 #include "mayaToEggConverter.h"
 #include "eggData.h"
 #include "eggData.h"
 #include "load_egg_file.h"
 #include "load_egg_file.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_chan.h"
 #include "config_chan.h"
 #include "config_gobj.h"
 #include "config_gobj.h"
 #include "textNode.h"
 #include "textNode.h"

+ 1 - 1
pandatool/src/pandatoolbase/pathReplace.cxx

@@ -12,7 +12,7 @@
  */
  */
 
 
 #include "pathReplace.h"
 #include "pathReplace.h"
-#include "config_util.h"
+#include "config_putil.h"
 #include "config_pandatoolbase.h"
 #include "config_pandatoolbase.h"
 #include "indent.h"
 #include "indent.h"
 #include "virtualFileSystem.h"
 #include "virtualFileSystem.h"

Some files were not shown because too many files changed in this diff