mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -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()
|
searchPath = getModelPath().getValue()
|
||||||
for dcFileName in dcFileNames:
|
for dcFileName in dcFileNames:
|
||||||
pathname = Filename(dcFileName)
|
pathname = Filename(dcFileName)
|
||||||
|
vfs = VirtualFileSystem.getGlobalPtr()
|
||||||
vfs.resolveFilename(pathname, searchPath)
|
vfs.resolveFilename(pathname, searchPath)
|
||||||
readResult = dcFile.read(pathname)
|
readResult = dcFile.read(pathname)
|
||||||
if not readResult:
|
if not readResult:
|
||||||
|
@ -225,6 +225,7 @@ class ServerRepository:
|
|||||||
searchPath = getModelPath().getValue()
|
searchPath = getModelPath().getValue()
|
||||||
for dcFileName in dcFileNames:
|
for dcFileName in dcFileNames:
|
||||||
pathname = Filename(dcFileName)
|
pathname = Filename(dcFileName)
|
||||||
|
vfs = VirtualFileSystem.getGlobalPtr()
|
||||||
vfs.resolveFilename(pathname, searchPath)
|
vfs.resolveFilename(pathname, searchPath)
|
||||||
readResult = dcFile.read(pathname)
|
readResult = dcFile.read(pathname)
|
||||||
if not readResult:
|
if not readResult:
|
||||||
|
@ -201,6 +201,7 @@ class ParticleEffect(NodePath):
|
|||||||
f.write('self.addForceGroup(%s)\n' % target)
|
f.write('self.addForceGroup(%s)\n' % target)
|
||||||
|
|
||||||
def loadConfig(self, filename):
|
def loadConfig(self, filename):
|
||||||
|
vfs = VirtualFileSystem.getGlobalPtr()
|
||||||
data = vfs.readFile(filename, 1)
|
data = vfs.readFile(filename, 1)
|
||||||
data = data.replace(b'\r', b'')
|
data = data.replace(b'\r', b'')
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user