My panda3d doesn't respond to changes in config, either via file-edit or via code

Hello,

I can’t get panda3d to respond to changes in config, either via file-edit or via code.
For the file, I edit my Config.prc in \Panda3D-1.10.14-x64\etc (I’m on windows11), but panda3d doesn’t change its behaviour, eg screen width/height.

For the code version, I try this snippet at the top of my python file, before any Application is created:

from panda3d.core import loadPrcFileData
loadPrcFileData(‘’, ‘win-size: 1200 800’)
loadPrcFileData(‘’, ‘notify-level: warning’)
loadPrcFileData(‘’, ‘notify-level-glgsg: spam’)
loadPrcFileData(‘’, ‘default-directnotify-level: warning’)

and that code gives no error, but makes no difference.

Am I missing something obvious, like defining an env-var to point to the prc file?

Context: in the config I’d like to set screen attributes (w, h, or full-screen), and also set some logging options
eg
notify-level warning
notify-level-glgsg spam
default-directnotify-level warning
from
https://docs.panda3d.org/1.10/python/debugging/log-messages

I can assume that the problem may be caused by SDK duplication. For example, you have installed a new version of the SDK, but your project uses a later version. The problem is that the SDK libraries are searched through a registry entry, but it has been updated due to the installation of a new SDK.

Can you try to remove the : in your loadPrcFileData command and use ' or " ?

1 Like

Yes - that did it! Thank you.
(Obviously I was using an old/wrong code snippet).

This new code works perfectly
loadPrcFileData(“”, “win-size 1200 800”)
loadPrcFileData(“”, “notify-level warning”)
loadPrcFileData(“”, “notify-level-glgsg spam”)
loadPrcFileData(“”, “default-directnotify-level warning”)