changed comments.
This commit is contained in:
parent
7ecad88308
commit
3573ccb9aa
|
|
@ -4,15 +4,13 @@ from PandaObject import *
|
|||
import LODNode
|
||||
|
||||
class Actor(PandaObject, NodePath):
|
||||
"""Actor class: Contains methods for creating, manipulating
|
||||
and playing animations on characters"""
|
||||
|
||||
#create the Actor class globals (ewww!)
|
||||
"""
|
||||
Actor class: Contains methods for creating, manipulating
|
||||
and playing animations on characters
|
||||
"""
|
||||
notify = directNotify.newCategory("Actor")
|
||||
partPrefix = "__Actor_"
|
||||
|
||||
#special methods
|
||||
|
||||
def __init__(self, models=None, anims=None, other=None):
|
||||
"""__init__(self, string | string:string{}, string:string{} |
|
||||
string:(string:string{}){}, Actor=None)
|
||||
|
|
@ -69,9 +67,7 @@ class Actor(PandaObject, NodePath):
|
|||
#fix bounding volumes - this must be done after drawing
|
||||
#the actor for a few frames, otherwise it has no effect
|
||||
a.fixBounds()
|
||||
|
||||
"""
|
||||
|
||||
try:
|
||||
self.Actor_initialized
|
||||
return
|
||||
|
|
@ -231,13 +227,14 @@ class Actor(PandaObject, NodePath):
|
|||
return 1
|
||||
|
||||
def __str__(self):
|
||||
"""__str__(self)
|
||||
Actor print function"""
|
||||
"""
|
||||
Actor print function
|
||||
"""
|
||||
return "Actor: partBundleDict = %s,\n animControlDict = %s" % \
|
||||
(self.__partBundleDict, self.__animControlDict)
|
||||
|
||||
def getActorInfo(self):
|
||||
"""getActorInfo(self)
|
||||
"""
|
||||
Utility function to create a list of information about a actor.
|
||||
Useful for iterating over details of an actor.
|
||||
"""
|
||||
|
|
@ -267,7 +264,7 @@ class Actor(PandaObject, NodePath):
|
|||
return animNames
|
||||
|
||||
def pprint(self):
|
||||
"""pprint(self)
|
||||
"""
|
||||
Pretty print actor's details
|
||||
"""
|
||||
for lodName, lodInfo in self.getActorInfo():
|
||||
|
|
@ -286,7 +283,7 @@ class Actor(PandaObject, NodePath):
|
|||
animControl.getPlayRate()))
|
||||
|
||||
def cleanup(self):
|
||||
"""cleanup(self)
|
||||
"""
|
||||
Actor cleanup function
|
||||
"""
|
||||
self.stop()
|
||||
|
|
@ -332,17 +329,17 @@ class Actor(PandaObject, NodePath):
|
|||
return self.__geomNode
|
||||
|
||||
def setGeomNode(self, node):
|
||||
"""setGeomNode(self, node)
|
||||
"""
|
||||
Set the node that contains all actor geometry"""
|
||||
self.__geomNode = node
|
||||
|
||||
def getLODNode(self):
|
||||
"""getLODNode(self)
|
||||
"""
|
||||
Return the node that switches actor geometry in and out"""
|
||||
return self.__LODNode.node()
|
||||
|
||||
def setLODNode(self, node=None):
|
||||
"""setLODNode(self, LODNode=None)
|
||||
"""
|
||||
Set the node that switches actor geometry in and out.
|
||||
If one is not supplied as an argument, make one"""
|
||||
if (node == None):
|
||||
|
|
@ -386,7 +383,7 @@ class Actor(PandaObject, NodePath):
|
|||
|
||||
|
||||
def resetLOD(self):
|
||||
"""resetLOD(self)
|
||||
"""
|
||||
Restore all switch distance info (usually after a useLOD call)"""
|
||||
sortedKeys = self.switches.keys()
|
||||
sortedKeys.sort()
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ class DistributedActor(DistributedNode.DistributedNode, Actor.Actor):
|
|||
# Since actors are probably fairly heavyweight, we'd
|
||||
# rather cache them than delete them if possible.
|
||||
self.setCacheable(1)
|
||||
|
||||
return None
|
||||
|
||||
def disable(self):
|
||||
# remove all anims, on all parts and all lods
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@
|
|||
func(t)
|
||||
|
||||
def popupControls(self, tl = None):
|
||||
""" popupControls()
|
||||
Popup control panel for interval.
|
||||
"""
|
||||
Popup control panel for interval.
|
||||
"""
|
||||
from TkGlobal import Toplevel, Frame, Button, LEFT, X, Pmw
|
||||
import math
|
||||
|
|
|
|||
|
|
@ -16,8 +16,6 @@ class Interval(DirectObject):
|
|||
|
||||
# Class methods
|
||||
def __init__(self, name, duration, openEnded=1):
|
||||
"""__init__(name, duration, openEnded)
|
||||
"""
|
||||
self.name = name
|
||||
self.duration = max(duration, 0.0)
|
||||
self.state = CInterval.SInitial
|
||||
|
|
@ -299,8 +297,6 @@ class Interval(DirectObject):
|
|||
return shouldContinue
|
||||
|
||||
def __repr__(self, indent=0):
|
||||
""" __repr__(indent)
|
||||
"""
|
||||
space = ''
|
||||
for l in range(indent):
|
||||
space = space + ' '
|
||||
|
|
@ -359,8 +355,8 @@ class Interval(DirectObject):
|
|||
return Task.done
|
||||
|
||||
def popupControls(self, tl = None):
|
||||
""" popupControls()
|
||||
Popup control panel for interval.
|
||||
"""
|
||||
Popup control panel for interval.
|
||||
"""
|
||||
import TkGlobal
|
||||
import math
|
||||
|
|
|
|||
Loading…
Reference in New Issue