Panda3D 1.4 Samples

Hi there,

At least the standalone samples download won’t work out-of-the-box as far as I can tell (at least not on my system, where I did build Panda3d on my own).

Starting with 1.4. you have to explicitly name a models file ending (.egg, egg.pz, …), which was not necessary with previous versions. None of the samples seems to be ‘fixed’ regarding this. Do these samples expect a certain Config.prc setup to run?

Or am I missing something?


By “standalone samples,” do you mean:


Or do you mean some other samples?

I’m referring to ->

I only looked at samples/Basic-Tutorials–Lesson-1-Solar-System and loader.loadModel do not explicitly include the suffix (.egg.pz in the given case).

Shouldn’t also the Actor in the Greetings sample be given the full filename?

I didn’t check for others, I just stumbled across these two samples while doing something else.


Your Config.prc should contain this line:

default-model-extension .egg

you can alternatively add this to each script

from pandac.PandaModules import loadPrcFileData
loadPrcFileData("", "default-model-extension .egg")

I am sure the loadPrcFileData line works. The Config.pp should work as well but i have not tried it.

Another problem you might see is that no models can be found, in a script you can fix this with these lines, which adds the current working directory to the list of directories searched, i actually dont know to add this to Config.pp

# define model path
from pandac.PandaModules import getModelPath
from pandac.PandaModules import getTexturePath
from pandac.PandaModules import getSoundPath 
getModelPath( ).appendPath( os.getcwd( ) )
getTexturePath( ).appendPath( os.getcwd( ) )
getSoundPath( ).appendPath( os.getcwd( ) )

Yes, thanks. I was aware of efault-model-extension (though for the samples it needs to say .egg.pz).

It’s only that if you build Panda3D from Source on your own (e.g. on OS X) Config.prc does not exists.

And I believe it would be better when the samples would work out-of-the-box for newbies, who can’t figure such things out. The fixes are trivial and would also help to promote the new code.