support old and new panda

This commit is contained in:
David Rose 2008-09-29 22:31:04 +00:00
parent 0866bf9e51
commit 5ea6a359a4

View File

@ -151,7 +151,11 @@ class Loader(DirectObject):
cb = Loader.Callback(len(modelList), gotList, callback, extraArgs) cb = Loader.Callback(len(modelList), gotList, callback, extraArgs)
i=0 i=0
for modelPath in modelList: for modelPath in modelList:
request = ModelLoadRequest(Filename(modelPath), loaderOptions, self.loader) # Temporary hasattr for old Pandas.
if hasattr(self.loader, 'makeAsyncRequest'):
request = self.loader.makeAsyncRequest(Filename(modelPath), loaderOptions)
else:
request = ModelLoadRequest(Filename(modelPath), loaderOptions)
request.setDoneEvent(self.hook) request.setDoneEvent(self.hook)
request.setPythonObject((cb, i)) request.setPythonObject((cb, i))
i+=1 i+=1