ppackage: path of mounted files

Hello, I’m adding packages to my application, and I’m encountering a problem with ppackage (both 1.7.0 and daily build): I can’t find the mounted files. The following is a little example that shows my problem. I’ve this directory structure:


I’ve created the package with the command: ppackage -i myPackageUpload myPackage.pdef and have uploaded it to a hosting server. Later I’ve created the p3d file with packp3d -o itsatry.p3d -r myPackage,http://www.ya2.it/packs/itsatry.

This is the file myPackage.pdef:

packager.setHost( 'http://www.ya2.it/packs/itsatry' )

class myPackage( package ):
  dir( 'myPackage' )

This is the file main.py:

import direct.directbase.DirectStart
panda = loader.loadModel( ( 'MYPACKAGE_ROOT' if base.appRunner else '../myPackage' ) + '/panda-model' )
panda.reparentTo( render )

When I launch it from commandline it works, but if I launch it with panda3d itsatry.p3d it doesn’t work, and I receive:

IOError: Could not load model file(s): ['MYPACKAGE_ROOT/panda-model']

Where can I locate that file? (the package is downloaded correctly - I can find it in .panda3d and it contains the desired files - I’ve checked that with multify) Very thanks!

You can just load it relative to the base of the .p3d file, because it will automatically be added to the model-path.

Thank you! :slight_smile: