Browse Source

added global function 'giveNotify(cls)'

Josh Wilson 19 years ago
parent
commit
79d14e2fc8

+ 3 - 0
direct/src/directnotify/DirectNotify.py

@@ -120,3 +120,6 @@ class DirectNotify:
     def popupControls(self, tl = None):
         from direct.tkpanels import NotifyPanel
         NotifyPanel.NotifyPanel(self, tl)
+        
+    def giveNotify(self,cls):
+        cls.notify = self.newCategory(cls.__name__)

+ 1 - 1
direct/src/directnotify/DirectNotifyGlobal.py

@@ -3,4 +3,4 @@
 import DirectNotify
 
 directNotify = DirectNotify.DirectNotify()
-
+giveNotify = directNotify.giveNotify

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

@@ -249,6 +249,7 @@ class ShowBase(DirectObject.DirectObject):
         __builtins__["run"] = self.run
         __builtins__["ostream"] = Notify.out()
         __builtins__["directNotify"] = directNotify
+        __builtins__["giveNotify"] = giveNotify
         __builtins__["globalClock"] = globalClock
         __builtins__["vfs"] = vfs
         __builtins__["cpMgr"] = ConfigPageManager.getGlobalPtr()