示例#1
0
文件: util.py 项目: svfgit/solex
 def _loader_(self, in_Q, out_Q):
     _alive = True
     # print("FART", self.fart_node)
     loader = Loader()
     while _alive:
         file_name = in_Q.get()
         if file_name == "close":
             model = None
             _alive = False
         else:
             model = loader.loadSync(file_name)
             geom = NodePath(model.getChildren()[0])
             geom = geom.__reduce_persist__(geom)
             ## mp = pickler.dumps(model)
             print("OUT:", model)
         out_Q.put((file_name, geom))
示例#2
0
from toontown.toonbase.ToontownModules import *
from panda3d.core import Loader as PandaLoader

if launcher.isDummy():
    # Create a dummy HTTPClient so we can get that stupid openSSL
    # random seed computed before we attempt to open the window.  (We
    # only need do this if we don't have a launcher.  If we do have a
    # launcher, it's already been created.)
    http = HTTPClient()
else:
    http = launcher.http

# Preload the background scene before the window is even created
tempLoader = PandaLoader()
backgroundNode = tempLoader.loadSync(
    Filename('phase_3/models/gui/loading-background'))

from direct.gui import DirectGuiGlobals
print('ToontownStart: setting default font')
from . import ToontownGlobals
DirectGuiGlobals.setDefaultFontFunc(ToontownGlobals.getInterfaceFont)

# First open a window so we can show the loading screen

# Set the error code indicating failure opening a window in case we
# crash while opening it (the GSG code will just exit if it fails to
# get the window open).
launcher.setPandaErrorCode(7)

# Make sure we create a ToonBase first
from . import ToonBase