Merge branch 'release/1.10.x'

This commit is contained in:
rdb 2021-12-04 21:57:35 +01:00
commit 5de31c6293
9 changed files with 36 additions and 13 deletions

View File

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

View File

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

View File

@ -107,7 +107,9 @@ class OnscreenImage(DirectObject, NodePath):
tex = image tex = image
else: else:
# It's a Texture file name # 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 = CardMaker('OnscreenImage')
cm.setFrame(-1, 1, -1, 1) cm.setFrame(-1, 1, -1, 1)
self.assign(parent.attachNewNode(cm.generate(), sort)) self.assign(parent.attachNewNode(cm.generate(), sort))

View File

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

View File

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

View File

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

View File

@ -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 " "in seconds, that is imposed on every asynchronous load attempt "
"(within the thread). Its purpose is to help debug errors that " "(within the thread). Its purpose is to help debug errors that "
"may occur when an asynchronous load is delayed. The " "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 " "up behind the delay--it is as if the time it takes to read a "
"file is increased by this amount per read.")); "file is increased by this amount per read."));

View File

@ -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";
}
}
/** /**
* *
*/ */

View File

@ -30,11 +30,17 @@ protected:
INLINE bool attachStream(Assimp::LogStream*, unsigned int) { INLINE bool attachStream(Assimp::LogStream*, unsigned int) {
return false; 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) { INLINE bool detatchStream(Assimp::LogStream*, unsigned int) {
return false; return false;
}; };
void OnDebug(const char *message); void OnDebug(const char *message);
void OnVerboseDebug(const char *message);
void OnError(const char *message); void OnError(const char *message);
void OnInfo(const char *message); void OnInfo(const char *message);
void OnWarn(const char *message); void OnWarn(const char *message);