Merge remote-tracking branch 'upstream/master' into master

This commit is contained in:
Sam Edwards 2014-11-15 16:35:56 -08:00
commit 00150976f7
3 changed files with 13 additions and 5 deletions

View File

@ -101,11 +101,20 @@ def Dtool_PreloadDLL(module):
# Nowadays, we can compile libpandaexpress with libpanda into a
# .pyd file called panda3d/core.pyd which can be imported without
# any difficulty. Let's see if this is the case.
if Dtool_FindModule("panda3d.core"):
from panda3d.core import *
else:
# In order to support things like py2exe that play games with the
# physical python files on disk, we can't entirely rely on
# Dtool_FindModule to find our panda3d.core module. However, we
# should be able to import it. To differentiate the old-style Panda
# build (with .dll's) from the new-style Panda build (with .pyd's), we
# first try to import libpandaexpress directly; if it succeeds we're
# in an old-style build, and if it fails we must be in a new-style
# build.
try:
Dtool_PreloadDLL("libpandaexpress")
from libpandaexpress import *
except ImportError:
from panda3d.core import *
def Dtool_ObjectToDict(cls, name, obj):
cls.DtoolClassDict[name] = obj;

View File

@ -1383,7 +1383,7 @@ class PandaModuleFinder(modulefinder.ModuleFinder):
# A special case: map a reference to the "panda3d.blah"
# module into the appropriate Panda3D dll.
m = getattr(panda3d, partname, None)
if m:
if m and hasattr(m, '__libraries__'):
libname = m.__libraries__[-1]
partname = libname
fqname = libname

View File

@ -3901,7 +3901,6 @@ draw_linestrips(const GeomPrimitivePipelineReader *reader, bool force) {
_glPrimitiveRestartIndex(reader->get_strip_cut_index());
}
#endif // !OPENGLES
cerr << "yeahp\n";
int num_vertices = reader->get_num_vertices();
_vertices_other_pcollector.add_level(num_vertices);