From 993af3debb8cbb17de0d414f3c40b1f5897b438c Mon Sep 17 00:00:00 2001 From: David Rose Date: Wed, 13 Mar 2002 23:16:10 +0000 Subject: [PATCH] pgraph stuff --- direct/src/ffi/FFIRename.py | 2 ++ direct/src/showbase/Loader.py | 8 +++++--- direct/src/showbase/qpShowBase.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/direct/src/ffi/FFIRename.py b/direct/src/ffi/FFIRename.py index e45bd0b18a..bd13db076b 100644 --- a/direct/src/ffi/FFIRename.py +++ b/direct/src/ffi/FFIRename.py @@ -115,6 +115,7 @@ pgraphClassRenameDictionary = { 'NodePathCollection' : 'SpNodePathCollection', 'PartBundleNode' : 'SpPartBundleNode', 'SequenceNode' : 'SpSequenceNode', + 'TextNode' : 'SpTextNode', 'Trackball' : 'SpTrackball', 'TrackerNode' : 'SpTrackerNode', 'Transform2SG' : 'SpTransform2SG', @@ -142,6 +143,7 @@ pgraphClassRenameDictionary = { 'QpNodePathCollection' : 'NodePathCollection', 'QpPartBundleNode' : 'PartBundleNode', 'QpSequenceNode' : 'SequenceNode', + 'QpTextNode' : 'TextNode', 'QpTrackball' : 'Trackball', 'QpTrackerNode' : 'TrackerNode', 'QpTransform2SG' : 'Transform2SG', diff --git a/direct/src/showbase/Loader.py b/direct/src/showbase/Loader.py index 2ff4d4a789..96bcf95d61 100644 --- a/direct/src/showbase/Loader.py +++ b/direct/src/showbase/Loader.py @@ -113,15 +113,17 @@ class Loader: # static font. node = ModelPool.loadModel(modelPath) if node == None: - return StaticTextFont(Node()) + # If we couldn't load the model, at least return an + # empty font. + return StaticTextFont(PandaNode("empty")) # Create a temp node path so you can adjust priorities nodePath = hidden.attachNewNode(node) nodePath.adjustAllPriorities(priority) - # Now create text font from the node + # Now create the text font from the node font = StaticTextFont(node) - # And remove node path + # And remove the node path. nodePath.removeNode() else: # Otherwise, it must be a new-style, dynamic font. Maybe diff --git a/direct/src/showbase/qpShowBase.py b/direct/src/showbase/qpShowBase.py index 0b283263d2..c45c1d63da 100644 --- a/direct/src/showbase/qpShowBase.py +++ b/direct/src/showbase/qpShowBase.py @@ -342,7 +342,7 @@ class ShowBase: # The default is trackball mode, which is more convenient for # ad-hoc development in Python using ShowBase. Applications - # can expclitly call base.useDrive() if they prefer a drive + # can explicitly call base.useDrive() if they prefer a drive # interface. self.useTrackball()