Browse Source

pgraph stuff

David Rose 24 years ago
parent
commit
993af3debb
3 changed files with 8 additions and 4 deletions
  1. 2 0
      direct/src/ffi/FFIRename.py
  2. 5 3
      direct/src/showbase/Loader.py
  3. 1 1
      direct/src/showbase/qpShowBase.py

+ 2 - 0
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',

+ 5 - 3
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

+ 1 - 1
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()