mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
pgraph stuff
This commit is contained in:
parent
05b819809a
commit
993af3debb
@ -115,6 +115,7 @@ pgraphClassRenameDictionary = {
|
|||||||
'NodePathCollection' : 'SpNodePathCollection',
|
'NodePathCollection' : 'SpNodePathCollection',
|
||||||
'PartBundleNode' : 'SpPartBundleNode',
|
'PartBundleNode' : 'SpPartBundleNode',
|
||||||
'SequenceNode' : 'SpSequenceNode',
|
'SequenceNode' : 'SpSequenceNode',
|
||||||
|
'TextNode' : 'SpTextNode',
|
||||||
'Trackball' : 'SpTrackball',
|
'Trackball' : 'SpTrackball',
|
||||||
'TrackerNode' : 'SpTrackerNode',
|
'TrackerNode' : 'SpTrackerNode',
|
||||||
'Transform2SG' : 'SpTransform2SG',
|
'Transform2SG' : 'SpTransform2SG',
|
||||||
@ -142,6 +143,7 @@ pgraphClassRenameDictionary = {
|
|||||||
'QpNodePathCollection' : 'NodePathCollection',
|
'QpNodePathCollection' : 'NodePathCollection',
|
||||||
'QpPartBundleNode' : 'PartBundleNode',
|
'QpPartBundleNode' : 'PartBundleNode',
|
||||||
'QpSequenceNode' : 'SequenceNode',
|
'QpSequenceNode' : 'SequenceNode',
|
||||||
|
'QpTextNode' : 'TextNode',
|
||||||
'QpTrackball' : 'Trackball',
|
'QpTrackball' : 'Trackball',
|
||||||
'QpTrackerNode' : 'TrackerNode',
|
'QpTrackerNode' : 'TrackerNode',
|
||||||
'QpTransform2SG' : 'Transform2SG',
|
'QpTransform2SG' : 'Transform2SG',
|
||||||
|
@ -113,15 +113,17 @@ class Loader:
|
|||||||
# static font.
|
# static font.
|
||||||
node = ModelPool.loadModel(modelPath)
|
node = ModelPool.loadModel(modelPath)
|
||||||
if node == None:
|
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
|
# Create a temp node path so you can adjust priorities
|
||||||
nodePath = hidden.attachNewNode(node)
|
nodePath = hidden.attachNewNode(node)
|
||||||
nodePath.adjustAllPriorities(priority)
|
nodePath.adjustAllPriorities(priority)
|
||||||
# Now create text font from the node
|
# Now create the text font from the node
|
||||||
font = StaticTextFont(node)
|
font = StaticTextFont(node)
|
||||||
|
|
||||||
# And remove node path
|
# And remove the node path.
|
||||||
nodePath.removeNode()
|
nodePath.removeNode()
|
||||||
else:
|
else:
|
||||||
# Otherwise, it must be a new-style, dynamic font. Maybe
|
# 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
|
# The default is trackball mode, which is more convenient for
|
||||||
# ad-hoc development in Python using ShowBase. Applications
|
# 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.
|
# interface.
|
||||||
self.useTrackball()
|
self.useTrackball()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user