pgraph stuff

This commit is contained in:
David Rose 2002-03-13 23:16:10 +00:00
parent 05b819809a
commit 993af3debb
3 changed files with 8 additions and 4 deletions

View File

@ -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',

View File

@ -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

View File

@ -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()