Pārlūkot izejas kodu

Merge branch 'release/1.10.x'

rdb 4 gadi atpakaļ
vecāks
revīzija
5de31c6293

+ 2 - 2
direct/src/actor/Actor.py

@@ -1,7 +1,7 @@
 """Actor module: contains the Actor class.
 
-See the :ref:`models-and-actors` page in the Programming Guide to learn
-more about loading models and animated actors.
+See the :ref:`loading-actors-and-animations` page in the Programming Guide
+to learn more about loading animated models.
 """
 
 __all__ = ['Actor']

+ 2 - 2
direct/src/actor/__init__.py

@@ -5,6 +5,6 @@ the lower-level :class:`panda3d.core.Character` implementation.
 It loads and controls an animated character and manages the animations
 playing on it.
 
-See the :ref:`models-and-actors` page in the Programming Guide to learn
-more about loading models and animated actors.
+See the :ref:`loading-actors-and-animations` page in the Programming Guide
+to learn more about loading animated models.
 """

+ 3 - 1
direct/src/gui/OnscreenImage.py

@@ -107,7 +107,9 @@ class OnscreenImage(DirectObject, NodePath):
                 tex = image
             else:
                 # It's a Texture file name
-                tex = base.loader.loadTexture(image)
+                tex = TexturePool.loadTexture(image)
+                if not tex:
+                    raise IOError('Could not load texture: %s' % (image))
             cm = CardMaker('OnscreenImage')
             cm.setFrame(-1, 1, -1, 1)
             self.assign(parent.attachNewNode(cm.generate(), sort))

+ 1 - 1
makepanda/makepanda.py

@@ -6121,7 +6121,7 @@ def ParallelMake(tasklist):
     # Create the workers
     for slave in range(THREADCOUNT):
         th = threading.Thread(target=BuildWorker, args=[taskqueue, donequeue])
-        th.setDaemon(1)
+        th.daemon = True
         th.start()
     # Feed tasks to the workers.
     tasksqueued = 0

+ 9 - 6
makepanda/makepandacore.py

@@ -28,7 +28,7 @@ SUFFIX_LIB = [".lib",".ilb"]
 VCS_DIRS = set(["CVS", "CVSROOT", ".git", ".hg", "__pycache__"])
 VCS_FILES = set([".cvsignore", ".gitignore", ".gitmodules", ".hgignore"])
 STARTTIME = time.time()
-MAINTHREAD = threading.currentThread()
+MAINTHREAD = threading.current_thread()
 OUTPUTDIR = "built"
 CUSTOM_OUTPUTDIR = False
 THIRDPARTYBASE = None
@@ -242,7 +242,7 @@ def ProgressOutput(progress, msg, target = None):
     sys.stdout.flush()
     sys.stderr.flush()
     prefix = ""
-    thisthread = threading.currentThread()
+    thisthread = threading.current_thread()
     if thisthread is MAINTHREAD:
         if progress is None:
             prefix = ""
@@ -272,7 +272,7 @@ def ProgressOutput(progress, msg, target = None):
 def exit(msg = ""):
     sys.stdout.flush()
     sys.stderr.flush()
-    if threading.currentThread() == MAINTHREAD:
+    if threading.current_thread() == MAINTHREAD:
         SaveDependencyCache()
         print("Elapsed Time: " + PrettyTime(time.time() - STARTTIME))
         print(msg)
@@ -1556,8 +1556,8 @@ def PkgConfigGetIncDirs(pkgname, tool = "pkg-config"):
     else:
         handle = os.popen(LocateBinary(tool) + " --cflags")
     result = handle.read().strip()
-    if len(result) == 0: return []
     handle.close()
+    if len(result) == 0: return []
     dirs = []
     for opt in result.split(" "):
         if (opt.startswith("-I")):
@@ -3484,7 +3484,8 @@ def UpdatePythonVersionInfoFile(new_info):
     json_data = []
     if os.path.isfile(json_file) and not PkgSkip("PYTHON"):
         try:
-            json_data = json.load(open(json_file, 'r'))
+            with open(json_file, 'r') as fh:
+                json_data = json.load(fh)
         except:
             json_data = []
 
@@ -3504,7 +3505,9 @@ def UpdatePythonVersionInfoFile(new_info):
 
     if VERBOSE:
         print("Writing %s" % (json_file))
-    json.dump(json_data, open(json_file, 'w'), indent=4)
+
+    with open(json_file, 'w') as fh:
+        json.dump(json_data, fh, indent=4)
 
 
 def ReadPythonVersionInfoFile():

+ 3 - 0
panda/src/event/buttonEvent.h

@@ -42,6 +42,9 @@ class DatagramIterator;
  * keyboard (and other buttons for which there is a corresponding ButtonHandle
  * object), while keystroke events are defined across the entire Unicode
  * character set.
+ *
+ * This API should not be considered stable and may change in a future version
+ * of Panda3D.
  */
 class EXPCL_PANDA_EVENT ButtonEvent {
 PUBLISHED:

+ 1 - 1
panda/src/gobj/config_gobj.cxx

@@ -520,7 +520,7 @@ PRC_DESC("If this is nonzero, it represents an artificial delay, "
          "in seconds, that is imposed on every asynchronous load attempt "
          "(within the thread).  Its purpose is to help debug errors that "
          "may occur when an asynchronous load is delayed.  The "
-         "delay is per-model, and all aync loads will be queued "
+         "delay is per-model, and all async loads will be queued "
          "up behind the delay--it is as if the time it takes to read a "
          "file is increased by this amount per read."));
 

+ 9 - 0
pandatool/src/assimp/pandaLogger.cxx

@@ -40,6 +40,15 @@ void PandaLogger::OnDebug(const char *message) {
   }
 }
 
+/**
+ *
+ */
+void PandaLogger::OnVerboseDebug(const char *message) {
+  if (assimp_cat.is_spam()) {
+    assimp_cat.spam() << message << "\n";
+  }
+}
+
 /**
  *
  */

+ 6 - 0
pandatool/src/assimp/pandaLogger.h

@@ -30,11 +30,17 @@ protected:
   INLINE bool attachStream(Assimp::LogStream*, unsigned int) {
     return false;
   };
+  INLINE bool detachStream(Assimp::LogStream*, unsigned int) {
+    return false;
+  };
+
+  // Kept for compatibility with Assimp 4.x
   INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {
     return false;
   };
 
   void OnDebug(const char *message);
+  void OnVerboseDebug(const char *message);
   void OnError(const char *message);
   void OnInfo(const char *message);
   void OnWarn(const char *message);