Forgot to check in this file

This commit is contained in:
rdb 2009-12-11 18:08:25 +00:00
parent 9a519539dd
commit 0f723e4cb8

View File

@ -570,7 +570,7 @@ class AppRunner(DirectObject):
initAppForGui() initAppForGui()
def setP3DFilename(self, p3dFilename, tokens, argv, instanceId, def setP3DFilename(self, p3dFilename, tokens, argv, instanceId,
interactiveConsole): interactiveConsole, p3dOffset = 0):
""" Called by the browser to specify the p3d file that """ Called by the browser to specify the p3d file that
contains the application itself, along with the web tokens contains the application itself, along with the web tokens
and/or command-line arguments. Once this method has been and/or command-line arguments. Once this method has been
@ -612,8 +612,12 @@ class AppRunner(DirectObject):
fname.makeAbsolute() fname.makeAbsolute()
mf = Multifile() mf = Multifile()
if p3dOffset == 0:
if not mf.openRead(fname): if not mf.openRead(fname):
raise ArgumentError, "Not a Panda3D application: %s" % (p3dFilename) raise ArgumentError, "Not a Panda3D application: %s" % (p3dFilename)
else:
if not mf.openRead(fname, p3dOffset):
raise ArgumentError, "Not a Panda3D application: %s at offset: %s" % (p3dFilename, p3dOffset)
# Now load the p3dInfo file. # Now load the p3dInfo file.
self.p3dInfo = None self.p3dInfo = None