Browse Source

changed comments.

Dave Schuyler 22 years ago
parent
commit
3573ccb9aa

+ 14 - 17
direct/src/actor/Actor.py

@@ -4,15 +4,13 @@ from PandaObject import *
 import LODNode
 import LODNode
 
 
 class Actor(PandaObject, NodePath):
 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")
     notify = directNotify.newCategory("Actor")
     partPrefix = "__Actor_"
     partPrefix = "__Actor_"
     
     
-    #special methods
-    
     def __init__(self, models=None, anims=None, other=None):
     def __init__(self, models=None, anims=None, other=None):
         """__init__(self, string | string:string{}, string:string{} |
         """__init__(self, string | string:string{}, string:string{} |
         string:(string:string{}){}, Actor=None)
         string:(string:string{}){}, Actor=None)
@@ -69,9 +67,7 @@ class Actor(PandaObject, NodePath):
             #fix bounding volumes - this must be done after drawing
             #fix bounding volumes - this must be done after drawing
             #the actor for a few frames, otherwise it has no effect
             #the actor for a few frames, otherwise it has no effect
             a.fixBounds()
             a.fixBounds()
-            
         """
         """
-
         try:
         try:
             self.Actor_initialized
             self.Actor_initialized
             return
             return
@@ -231,13 +227,14 @@ class Actor(PandaObject, NodePath):
             return 1
             return 1
 
 
     def __str__(self):
     def __str__(self):
-        """__str__(self)
-        Actor print function"""
+        """
+        Actor print function
+        """
         return "Actor: partBundleDict = %s,\n animControlDict = %s" % \
         return "Actor: partBundleDict = %s,\n animControlDict = %s" % \
                (self.__partBundleDict, self.__animControlDict)
                (self.__partBundleDict, self.__animControlDict)
 
 
     def getActorInfo(self):
     def getActorInfo(self):
-        """getActorInfo(self)
+        """
         Utility function to create a list of information about a actor.
         Utility function to create a list of information about a actor.
         Useful for iterating over details of an actor.
         Useful for iterating over details of an actor.
         """
         """
@@ -267,7 +264,7 @@ class Actor(PandaObject, NodePath):
         return animNames
         return animNames
 
 
     def pprint(self):
     def pprint(self):
-        """pprint(self)
+        """
         Pretty print actor's details
         Pretty print actor's details
         """
         """
         for lodName, lodInfo in self.getActorInfo():
         for lodName, lodInfo in self.getActorInfo():
@@ -286,7 +283,7 @@ class Actor(PandaObject, NodePath):
                                 animControl.getPlayRate()))
                                 animControl.getPlayRate()))
 
 
     def cleanup(self):
     def cleanup(self):
-        """cleanup(self)
+        """
         Actor cleanup function
         Actor cleanup function
         """
         """
         self.stop()
         self.stop()
@@ -332,17 +329,17 @@ class Actor(PandaObject, NodePath):
         return self.__geomNode
         return self.__geomNode
 
 
     def setGeomNode(self, node):
     def setGeomNode(self, node):
-        """setGeomNode(self, node)
+        """
         Set the node that contains all actor geometry"""
         Set the node that contains all actor geometry"""
         self.__geomNode = node
         self.__geomNode = node
 
 
     def getLODNode(self):
     def getLODNode(self):
-        """getLODNode(self)
+        """
         Return the node that switches actor geometry in and out"""
         Return the node that switches actor geometry in and out"""
         return self.__LODNode.node()
         return self.__LODNode.node()
 
 
     def setLODNode(self, node=None):
     def setLODNode(self, node=None):
-        """setLODNode(self, LODNode=None)
+        """
         Set the node that switches actor geometry in and out.
         Set the node that switches actor geometry in and out.
         If one is not supplied as an argument, make one"""
         If one is not supplied as an argument, make one"""
         if (node == None):
         if (node == None):
@@ -386,7 +383,7 @@ class Actor(PandaObject, NodePath):
                                                         
                                                         
             
             
     def resetLOD(self):
     def resetLOD(self):
-        """resetLOD(self)
+        """
         Restore all switch distance info (usually after a useLOD call)"""
         Restore all switch distance info (usually after a useLOD call)"""
         sortedKeys = self.switches.keys()
         sortedKeys = self.switches.keys()
         sortedKeys.sort()
         sortedKeys.sort()

+ 0 - 2
direct/src/actor/DistributedActor.py

@@ -16,8 +16,6 @@ class DistributedActor(DistributedNode.DistributedNode, Actor.Actor):
             # Since actors are probably fairly heavyweight, we'd
             # Since actors are probably fairly heavyweight, we'd
             # rather cache them than delete them if possible.
             # rather cache them than delete them if possible.
             self.setCacheable(1)
             self.setCacheable(1)
-            
-        return None
 
 
     def disable(self):
     def disable(self):
         # remove all anims, on all parts and all lods
         # remove all anims, on all parts and all lods

+ 2 - 2
direct/src/extensions/CInterval-extensions.py

@@ -38,8 +38,8 @@
                 func(t)
                 func(t)
 
 
     def popupControls(self, tl = None):
     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
         from TkGlobal import Toplevel, Frame, Button, LEFT, X, Pmw
         import math
         import math

+ 2 - 6
direct/src/interval/Interval.py

@@ -16,8 +16,6 @@ class Interval(DirectObject):
 
 
     # Class methods
     # Class methods
     def __init__(self, name, duration, openEnded=1):
     def __init__(self, name, duration, openEnded=1):
-        """__init__(name, duration, openEnded)
-        """
         self.name = name
         self.name = name
         self.duration = max(duration, 0.0)
         self.duration = max(duration, 0.0)
         self.state = CInterval.SInitial
         self.state = CInterval.SInitial
@@ -299,8 +297,6 @@ class Interval(DirectObject):
         return shouldContinue
         return shouldContinue
 
 
     def __repr__(self, indent=0):
     def __repr__(self, indent=0):
-        """ __repr__(indent)
-        """
         space = ''
         space = ''
         for l in range(indent):
         for l in range(indent):
             space = space + ' '
             space = space + ' '
@@ -359,8 +355,8 @@ class Interval(DirectObject):
             return Task.done
             return Task.done
 
 
     def popupControls(self, tl = None):
     def popupControls(self, tl = None):
-        """ popupControls()
-            Popup control panel for interval.
+        """
+        Popup control panel for interval.
         """
         """
         import TkGlobal
         import TkGlobal
         import math
         import math