mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
pgraph stuff
This commit is contained in:
parent
05b819809a
commit
993af3debb
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user