You all probably know that a typical ppython run looks like this:
DirectStart: Starting the game.
Warning: DirectNotify: category 'Interval' already exists
Known pipe types:
glxGraphicsPipe
(all display modules loaded.)
:util(warning): Adjusting global clock's real time by x.xxxxx seconds.
:util(warning): Adjusting global clock's real time by -x.xxxxx seconds.
Well, I found some ways to suppress part of the unneccessary messages.
First of all, what is that DirectStart:starting the game. doing there?
Well, there are two ways to solve that.
(recommended) By not calling this:
import direct.directbase.DirectStart
so leave that line away, and instead use:
from direct.showbase import ShowBase
ShowBase.ShowBase()
This works excactly the same, except for the message then.
2. You could easily change it in the source of Panda3D, because ShowBase is a python module. To do that, comment out (or remove) the first line in PandaRoot/direct/src/directbase/DirectStart.py
Now, the “interval” thing. The only way to solve that by commenting out lines 54-56 in PandaRoot/direct/src/directnotify/DirectNotify.py.
So, the code should now look like:
The console output can be tailored to whatever your needs are, by setting a notification level for particular channels, either in the config file or directly in the code like this:
from pandac.PandaModules import loadPrcFileData
loadPrcFileData( '', 'notify-level-util error' )
...
Level “error” should be enough to get rid of most warnings. To see what channels Panda3D offset you can use the following line (about thirty, without counting them):
“DirectStart: Starting the game.”
–> panda3d-1.3.2\direct\src\directbase\DirectStart.py, line 1
“Warning: DirectNotify: category ‘Interval’ already exists”
–> panda3d-1.3.2\direct\src\directnotify\DirectNotify.py, line 55
You don’t need to re-compile Panda3D after editing Python-files, so this is not exactly what you have been asking for, but it is a way to get rid of these messages.
“Known pipe types:…”
This is C++ again. I don’t know a solution, only a workaround: send the notify output to a file using the config option “notify-output foo.txt”.
Is there any way I can suppress the error resulting form not having dx9? I can’t install it due to admins but my game runs fine without it. The window that pops up is annoying.
Sorry to wake up this ancient thread.
I still found the DirectNotify error rather annoying. People easily get confused by it and think there is something wrong while it’s actually quite innocent.
Problem with this error is that the Interval category gets added multiple times. Once in direct/src/interval/Interval (correct), but also in extensions/CInterval-extensions.py and extensions_native/CInterval_extensions.py.
It should be possible to eliminate the error by changing these few lines in both locations:
notify = directNotify.addCategory("Interval")
to:
if directNotify.hasCategory("Interval"):
notify = directNotify.getCategory("Interval")
else:
notify = directNotify.addCategory("Interval")