diff --git a/direct/src/directnotify/DirectNotify.py b/direct/src/directnotify/DirectNotify.py index 8e25033530..eb96c0e33c 100644 --- a/direct/src/directnotify/DirectNotify.py +++ b/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__) diff --git a/direct/src/directnotify/DirectNotifyGlobal.py b/direct/src/directnotify/DirectNotifyGlobal.py index e37e1f2c4e..7159b066af 100644 --- a/direct/src/directnotify/DirectNotifyGlobal.py +++ b/direct/src/directnotify/DirectNotifyGlobal.py @@ -3,4 +3,4 @@ import DirectNotify directNotify = DirectNotify.DirectNotify() - +giveNotify = directNotify.giveNotify diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 5a31e5a235..6c59aad70b 100644 --- a/direct/src/showbase/ShowBase.py +++ b/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()