From d68bbae5b46b246f27d3796ac59dd48f302de7a9 Mon Sep 17 00:00:00 2001 From: rdb Date: Wed, 26 Aug 2015 14:57:30 +0200 Subject: [PATCH 1/4] Don't add "(not used)" to config decls when writing them, it makes it harder to write out a config.prc file --- dtool/src/prc/configDeclaration.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dtool/src/prc/configDeclaration.cxx b/dtool/src/prc/configDeclaration.cxx index 65cc4360d2..141c8d8adf 100644 --- a/dtool/src/prc/configDeclaration.cxx +++ b/dtool/src/prc/configDeclaration.cxx @@ -163,9 +163,9 @@ output(ostream &out) const { void ConfigDeclaration:: write(ostream &out) const { out << get_variable()->get_name() << " " << get_string_value(); - if (!get_variable()->is_used()) { - out << " (not used)"; - } + //if (!get_variable()->is_used()) { + // out << " (not used)"; + //} out << "\n"; } From 56b94eb8153984f2fbbe50e95ad5490ab458e26c Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Aug 2015 16:28:03 +0200 Subject: [PATCH 2/4] Don't raise exception in tp_traverse, instead silently passing case where object is already destructed --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index cf6434508b..1078582d53 100644 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -2237,8 +2237,7 @@ write_module_class(ostream &out, Object *obj) { out << " " << cClassName << " *local_this = NULL;\n"; out << " DTOOL_Call_ExtractThisPointerForType(self, &Dtool_" << ClassName << ", (void **) &local_this);\n"; out << " if (local_this == NULL) {\n"; - out << " PyErr_SetString(PyExc_AttributeError, \"C++ object is not yet constructed, or already destructed.\");\n"; - out << " return -1;\n"; + out << " return 0;\n"; out << " }\n\n"; // Find the remap. There should be only one. From 838589ef0ffb5b835ee731b304902c5aeef0faeb Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Aug 2015 20:14:05 +0200 Subject: [PATCH 3/4] Fix bug: excluded modules in one package would be implicitly excluded from packages that depend on it This fixes the lack of 'xml' package in the 'morepy' package. --- direct/src/p3d/Packager.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/direct/src/p3d/Packager.py b/direct/src/p3d/Packager.py index 2ab09422f0..ef0ee784b9 100644 --- a/direct/src/p3d/Packager.py +++ b/direct/src/p3d/Packager.py @@ -2196,8 +2196,10 @@ class Packager: ext = Filename(lowerName).getExtension() if ext not in self.packager.nonuniqueExtensions: self.skipFilenames[lowerName] = True + for moduleName, mdef in package.moduleNames.items(): - self.skipModules[moduleName] = mdef + if not mdef.exclude: + self.skipModules[moduleName] = mdef # Packager constructor def __init__(self, platform = None): From 9053999889d1deb6d3ab9dc3751fa5539c496b82 Mon Sep 17 00:00:00 2001 From: rdb Date: Fri, 28 Aug 2015 21:40:08 +0200 Subject: [PATCH 4/4] Don't put important code in an assert - fixes media player sample in runtime environment --- samples/media-player/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/samples/media-player/main.py b/samples/media-player/main.py index 838cb54961..4fc487544e 100755 --- a/samples/media-player/main.py +++ b/samples/media-player/main.py @@ -38,7 +38,8 @@ class MediaPlayer(ShowBase): # but we want to make sure we get a MovieTexture, since it # implements synchronizeTo. self.tex = MovieTexture("name") - assert self.tex.read(media_file), "Failed to load video!" + success = self.tex.read(media_file) + assert success, "Failed to load video!" # Set up a fullscreen card to set the video texture on. cm = CardMaker("My Fullscreen Card")