mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
minor optimization features for async flatten
This commit is contained in:
parent
993fb111de
commit
55a789293a
@ -689,7 +689,7 @@ class Actor(DirectObject, NodePath):
|
|||||||
# add the switch distance info
|
# add the switch distance info
|
||||||
self.__LODNode.node().addSwitch(inDist, outDist)
|
self.__LODNode.node().addSwitch(inDist, outDist)
|
||||||
if center != None:
|
if center != None:
|
||||||
self.__LODNode.node().setCenter(center)
|
self.setCenter(center)
|
||||||
|
|
||||||
def setLOD(self, lodName, inDist=0, outDist=0):
|
def setLOD(self, lodName, inDist=0, outDist=0):
|
||||||
"""setLOD(self, string)
|
"""setLOD(self, string)
|
||||||
@ -1862,7 +1862,7 @@ class Actor(DirectObject, NodePath):
|
|||||||
return controls
|
return controls
|
||||||
|
|
||||||
def loadModel(self, modelPath, partName="modelRoot", lodName="lodRoot",
|
def loadModel(self, modelPath, partName="modelRoot", lodName="lodRoot",
|
||||||
copy = True, okMissing = None):
|
copy = True, okMissing = None, autoBindAnims = True):
|
||||||
"""Actor model loader. Takes a model name (ie file path), a part
|
"""Actor model loader. Takes a model name (ie file path), a part
|
||||||
name(defaults to "modelRoot") and an lod name(defaults to "lodRoot").
|
name(defaults to "modelRoot") and an lod name(defaults to "lodRoot").
|
||||||
"""
|
"""
|
||||||
@ -1907,9 +1907,12 @@ class Actor(DirectObject, NodePath):
|
|||||||
# Maybe the model file also included some animations. If
|
# Maybe the model file also included some animations. If
|
||||||
# so, try to bind them immediately and put them into the
|
# so, try to bind them immediately and put them into the
|
||||||
# animControlDict.
|
# animControlDict.
|
||||||
acc = AnimControlCollection()
|
if autoBindAnims:
|
||||||
autoBind(model.node(), acc, ~0)
|
acc = AnimControlCollection()
|
||||||
numAnims = acc.getNumAnims()
|
autoBind(model.node(), acc, ~0)
|
||||||
|
numAnims = acc.getNumAnims()
|
||||||
|
else:
|
||||||
|
numAnims = 0
|
||||||
|
|
||||||
# Now extract out the Character and integrate it with
|
# Now extract out the Character and integrate it with
|
||||||
# the Actor.
|
# the Actor.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user