mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
support old and new panda
This commit is contained in:
parent
0866bf9e51
commit
5ea6a359a4
@ -151,7 +151,11 @@ class Loader(DirectObject):
|
||||
cb = Loader.Callback(len(modelList), gotList, callback, extraArgs)
|
||||
i=0
|
||||
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.setPythonObject((cb, i))
|
||||
i+=1
|
||||
|
Loading…
x
Reference in New Issue
Block a user