mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-29 08:15:18 -04:00
direct: don't rely on vfs being present in builtins
This commit is contained in:
parent
9c4cb28805
commit
8178fb21f3
@ -260,6 +260,7 @@ class ConnectionRepository(
|
||||
searchPath = getModelPath().getValue()
|
||||
for dcFileName in dcFileNames:
|
||||
pathname = Filename(dcFileName)
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
vfs.resolveFilename(pathname, searchPath)
|
||||
readResult = dcFile.read(pathname)
|
||||
if not readResult:
|
||||
|
@ -225,6 +225,7 @@ class ServerRepository:
|
||||
searchPath = getModelPath().getValue()
|
||||
for dcFileName in dcFileNames:
|
||||
pathname = Filename(dcFileName)
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
vfs.resolveFilename(pathname, searchPath)
|
||||
readResult = dcFile.read(pathname)
|
||||
if not readResult:
|
||||
|
@ -201,6 +201,7 @@ class ParticleEffect(NodePath):
|
||||
f.write('self.addForceGroup(%s)\n' % target)
|
||||
|
||||
def loadConfig(self, filename):
|
||||
vfs = VirtualFileSystem.getGlobalPtr()
|
||||
data = vfs.readFile(filename, 1)
|
||||
data = data.replace(b'\r', b'')
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user