Browse Source

formatting

Dave Schuyler 20 years ago
parent
commit
816e683b98

+ 10 - 10
direct/src/cluster/ClusterConfig.py

@@ -20,12 +20,12 @@ import string
 # generalize to non cluster situations
 # generalize to non cluster situations
 
 
 ClientConfigs = {
 ClientConfigs = {
-    'single-server'       : [{'display name': 'display0',
+    'single-server':       [{'display name': 'display0',
                               'display mode': 'client',
                               'display mode': 'client',
                               'pos': Vec3(0),
                               'pos': Vec3(0),
                               'hpr': Vec3(0)}
                               'hpr': Vec3(0)}
                              ],
                              ],
-    'two-server'          : [{'display name': 'master',
+    'two-server':          [{'display name': 'master',
                               'display mode': 'client',
                               'display mode': 'client',
                               'pos': Vec3(0),
                               'pos': Vec3(0),
                               #'hpr': Vec3(30,0,0)},
                               #'hpr': Vec3(30,0,0)},
@@ -36,7 +36,7 @@ ClientConfigs = {
                               'hpr': Vec3(0,0,0)
                               'hpr': Vec3(0,0,0)
                               }
                               }
                              ],
                              ],
-    'mono-cave'   : [{'display name': 'la',
+    'mono-cave':   [{'display name': 'la',
                       'pos': Vec3(-0.105, -0.020, 5.000),
                       'pos': Vec3(-0.105, -0.020, 5.000),
                       'hpr': Vec3(51.213, 0.000, 0.000),
                       'hpr': Vec3(51.213, 0.000, 0.000),
                       'focal length': 0.809,
                       'focal length': 0.809,
@@ -59,7 +59,7 @@ ClientConfigs = {
                       'film offset': (-0.000, 0.173),
                       'film offset': (-0.000, 0.173),
                       },
                       },
                      ],
                      ],
-    'seamless-cave'   : [{'display name': 'master',
+    'seamless-cave':   [{'display name': 'master',
                           'display mode': 'client',
                           'display mode': 'client',
                           'pos': Vec3(-0.105, -0.020, 5.000),
                           'pos': Vec3(-0.105, -0.020, 5.000),
                           'hpr': Vec3(-0.370, 0.000, 0.000),
                           'hpr': Vec3(-0.370, 0.000, 0.000),
@@ -110,7 +110,7 @@ ClientConfigs = {
                           'film offset': (-0.000, 0.173),
                           'film offset': (-0.000, 0.173),
                           },
                           },
                          ],
                          ],
-    'nemo-cave'        : [{'display name': 'master',
+    'nemo-cave':        [{'display name': 'master',
                            'display mode': 'client',
                            'display mode': 'client',
                            'pos': Vec3(-0.105, -0.020, 5.000),
                            'pos': Vec3(-0.105, -0.020, 5.000),
                            'hpr': Vec3(-0.370, 0.000, 0.000),
                            'hpr': Vec3(-0.370, 0.000, 0.000),
@@ -282,7 +282,7 @@ ClientConfigs = {
                            'film offset': (0.000, 0.173),
                            'film offset': (0.000, 0.173),
                            },
                            },
                           ],
                           ],
-    'fourd-cave'        : [{'display name': 'master',
+    'fourd-cave':        [{'display name': 'master',
                             'display mode': 'client',
                             'display mode': 'client',
                             'pos': Vec3(-0.105, -0.020, 5.000),
                             'pos': Vec3(-0.105, -0.020, 5.000),
                            'hpr': Vec3(-0.370, 0.000, 0.000),
                            'hpr': Vec3(-0.370, 0.000, 0.000),
@@ -361,7 +361,7 @@ ClientConfigs = {
                            'film offset': (0.000, 0.173),
                            'film offset': (0.000, 0.173),
                            },
                            },
                           ],
                           ],
-    'parallax-cave'        : [{'display name': 'master',
+    'parallax-cave':        [{'display name': 'master',
                               'display mode': 'client',
                               'display mode': 'client',
                               'pos': Vec3(0),
                               'pos': Vec3(0),
                               'hpr': Vec3(0),
                               'hpr': Vec3(0),
@@ -412,7 +412,7 @@ ClientConfigs = {
                               'film offset': (-0.000, 0.173),
                               'film offset': (-0.000, 0.173),
                               },
                               },
                              ],
                              ],
-    'carttest'            : [{'display name': 'master',
+    'carttest':            [{'display name': 'master',
                               'display mode': 'client',
                               'display mode': 'client',
                               'pos': Vec3(0),
                               'pos': Vec3(0),
                               'hpr': Vec3(0),
                               'hpr': Vec3(0),
@@ -424,7 +424,7 @@ ClientConfigs = {
                               'pos': Vec3(.105,0,0),
                               'pos': Vec3(.105,0,0),
                               'hpr': Vec3(0,0,0)}
                               'hpr': Vec3(0,0,0)}
                              ],
                              ],
-    'ursula'              : [{'display name': 'master',
+    'ursula':              [{'display name': 'master',
                               'display mode': 'client',
                               'display mode': 'client',
                               'pos': Vec3(0),
                               'pos': Vec3(0),
                               'hpr': Vec3(0),
                               'hpr': Vec3(0),
@@ -446,7 +446,7 @@ ClientConfigs = {
                               'film offset': (-0.105, -1),
                               'film offset': (-0.105, -1),
                               }
                               }
                              ],
                              ],
-    'composite'           : [{'display name': 'master',
+    'composite':           [{'display name': 'master',
                               'display mode': 'client',
                               'display mode': 'client',
                               'pos': Vec3(0),
                               'pos': Vec3(0),
                               },
                               },

+ 33 - 33
direct/src/directscripts/gendocs.py

@@ -601,38 +601,38 @@ class CodeDatabase:
 ########################################################################
 ########################################################################
 
 
 CLASS_RENAME_DICT = {
 CLASS_RENAME_DICT = {
- "Loader"                    : "PandaLoader",
- "String"                    : "CString",
- "LMatrix4f"                 : "Mat4",
- "LMatrix3f"                 : "Mat3",
- "LVecBase4f"                : "VBase4",
- "LVector4f"                 : "Vec4",
- "LPoint4f"                  : "Point4",
- "LVecBase3f"                : "VBase3",
- "LVector3f"                 : "Vec3",
- "LPoint3f"                  : "Point3",
- "LVecBase2f"                : "VBase2",
- "LVector2f"                 : "Vec2",
- "LPoint2f"                  : "Point2",
- "LQuaternionf"              : "Quat",
- "LMatrix4d"                 : "Mat4D",
- "LMatrix3d"                 : "Mat3D",
- "LVecBase4d"                : "VBase4D",
- "LVector4d"                 : "Vec4D",
- "LPoint4d"                  : "Point4D",
- "LVecBase3d"                : "VBase3D",
- "LVector3d"                 : "Vec3D",
- "LPoint3d"                  : "Point3D",
- "LVecBase2d"                : "VBase2D",
- "LVector2d"                 : "Vec2D",
- "LPoint2d"                  : "Point2D",
- "LQuaterniond"              : "QuatD",
- "Plane"                     : "PlaneBase",
- "Planef"                    : "Plane",
- "Planed"                    : "PlaneD",
- "Frustum"                   : "FrustumBase",
- "Frustumf"                  : "Frustum",
- "Frustumd"                  : "FrustumD" 
+ "Loader":                    "PandaLoader",
+ "String":                    "CString",
+ "LMatrix4f":                 "Mat4",
+ "LMatrix3f":                 "Mat3",
+ "LVecBase4f":                "VBase4",
+ "LVector4f":                 "Vec4",
+ "LPoint4f":                  "Point4",
+ "LVecBase3f":                "VBase3",
+ "LVector3f":                 "Vec3",
+ "LPoint3f":                  "Point3",
+ "LVecBase2f":                "VBase2",
+ "LVector2f":                 "Vec2",
+ "LPoint2f":                  "Point2",
+ "LQuaternionf":              "Quat",
+ "LMatrix4d":                 "Mat4D",
+ "LMatrix3d":                 "Mat3D",
+ "LVecBase4d":                "VBase4D",
+ "LVector4d":                 "Vec4D",
+ "LPoint4d":                  "Point4D",
+ "LVecBase3d":                "VBase3D",
+ "LVector3d":                 "Vec3D",
+ "LPoint3d":                  "Point3D",
+ "LVecBase2d":                "VBase2D",
+ "LVector2d":                 "Vec2D",
+ "LPoint2d":                  "Point2D",
+ "LQuaterniond":              "QuatD",
+ "Plane":                     "PlaneBase",
+ "Planef":                    "Plane",
+ "Planed":                    "PlaneD",
+ "Frustum":                   "FrustumBase",
+ "Frustumf":                  "Frustum",
+ "Frustumd":                  "FrustumD" 
 }
 }
 
 
 
 
@@ -702,7 +702,7 @@ def generate(pversion, indirlist, directdirlist, docdir, header, footer, urlpref
         inheritance = code.getInheritance(type)
         inheritance = code.getInheritance(type)
         body = body + "<h2>Inheritance:</h2>\n<ul>\n"
         body = body + "<h2>Inheritance:</h2>\n<ul>\n"
         for inh in inheritance:
         for inh in inheritance:
-            line = "  " + linkTo(urlprefix+inh+urlsuffix,inh) + " : "
+            line = "  " + linkTo(urlprefix+inh+urlsuffix,inh) + ": "
             for parent in code.getClassParents(inh):
             for parent in code.getClassParents(inh):
                 line = line + linkTo(urlprefix+parent+urlsuffix,parent) + " "
                 line = line + linkTo(urlprefix+parent+urlsuffix,parent) + " "
             body = body + line + "<br>\n"
             body = body + line + "<br>\n"

+ 2 - 2
direct/src/distributed/PyDatagramIterator.py

@@ -12,11 +12,11 @@ class PyDatagramIterator(DatagramIterator):
     # for trying to match up datagram subatomic types with add funtions
     # for trying to match up datagram subatomic types with add funtions
     # If Python had an O(1) "case" statement we would use that instead
     # If Python had an O(1) "case" statement we would use that instead
     FuncDict = {
     FuncDict = {
-        STInt8  : DatagramIterator.getInt8,
+        STInt8:  DatagramIterator.getInt8,
         STInt16: DatagramIterator.getInt16,
         STInt16: DatagramIterator.getInt16,
         STInt32: DatagramIterator.getInt32,
         STInt32: DatagramIterator.getInt32,
         STInt64: DatagramIterator.getInt64,
         STInt64: DatagramIterator.getInt64,
-        STUint8  : DatagramIterator.getUint8,
+        STUint8:  DatagramIterator.getUint8,
         STUint16: DatagramIterator.getUint16,
         STUint16: DatagramIterator.getUint16,
         STUint32: DatagramIterator.getUint32,
         STUint32: DatagramIterator.getUint32,
         STUint64: DatagramIterator.getUint64,
         STUint64: DatagramIterator.getUint64,

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

@@ -135,8 +135,8 @@
             return (
             return (
                 "%s = {"%(self.getName()) +
                 "%s = {"%(self.getName()) +
                 otherString + 
                 otherString + 
-                "  'Pos'  : (%s),\n" % pos.pPrintValues() +
-                "  'Hpr'  : (%s),\n" % hpr.pPrintValues() +
+                "  'Pos':   (%s),\n" % pos.pPrintValues() +
+                "  'Hpr':   (%s),\n" % hpr.pPrintValues() +
                 "  'Scale': (%s),\n" % scale.pPrintValues() +
                 "  'Scale': (%s),\n" % scale.pPrintValues() +
                 "  'Shear': (%s),\n" % shear.pPrintValues() +
                 "  'Shear': (%s),\n" % shear.pPrintValues() +
                 "}")
                 "}")

+ 2 - 2
direct/src/extensions_native/NodePath_extensions.py

@@ -192,8 +192,8 @@ def pPrintString(self, other = None):
             return (
             return (
                 "%s = {"%(self.getName()) +
                 "%s = {"%(self.getName()) +
                 otherString + 
                 otherString + 
-                "  'Pos'  : (%s),\n" % pos.pPrintValues() +
-                "  'Hpr'  : (%s),\n" % hpr.pPrintValues() +
+                "  'Pos':   (%s),\n" % pos.pPrintValues() +
+                "  'Hpr':   (%s),\n" % hpr.pPrintValues() +
                 "  'Scale': (%s),\n" % scale.pPrintValues() +
                 "  'Scale': (%s),\n" % scale.pPrintValues() +
                 "  'Shear': (%s),\n" % shear.pPrintValues() +
                 "  'Shear': (%s),\n" % shear.pPrintValues() +
                 "}")
                 "}")

+ 68 - 68
direct/src/ffi/FFIRename.py

@@ -6,80 +6,80 @@ pythonKeywords = ['and','del','for','is','raise','assert','elif','from','lambda'
 
 
 
 
 methodRenameDictionary = {
 methodRenameDictionary = {
-    'operator=='  : 'eq',
-    'operator!='  : 'ne',
-    'operator<<'  : '__lshift__',
-    'operator>>'  : '__rshift__',
-    'operator<'   : 'lessThan',
-    'operator>'   : 'greaterThan',
-    'operator<='  : 'lessThanOrEqual',
-    'operator>='  : 'greaterThanOrEqual',
-    'operator='   : 'assign',
-    'operator()'  : '__call__',
-    'operator[]'  : '__getitem__',
-    'operator++'  : 'increment',
-    'operator--'  : 'decrement',
-    'operator^'   : '__xor__',
-    'operator%'   : '__mod__',
-    'operator!'   : 'logicalNot',
-    'operator~'   : 'bitwiseNot',
-    'operator&'   : '__and__',
-    'operator&&'  : 'logicalAnd',
-    'operator|'   : '__or__',
-    'operator||'  : 'logicalOr',
-    'operator+'   : '__add__',
-    'operator-'   : '__sub__',
-    'operator*'   : '__mul__',
-    'operator/'   : '__div__',
-    'operator+='  : '__iadd__',
-    'operator-='  : '__isub__',
-    'operator*='  : '__imul__',
-    'operator/='  : '__idiv__',
-    'operator,'   : 'concatenate',
-    'operator|='  : '__ior__',
-    'operator&='  : '__iand__',
-    'operator^='  : '__ixor__',
-    'operator~='  : 'bitwiseNotEqual',
-    'operator->'  : 'dereference',
+    'operator==':  'eq',
+    'operator!=':  'ne',
+    'operator<<':  '__lshift__',
+    'operator>>':  '__rshift__',
+    'operator<':   'lessThan',
+    'operator>':   'greaterThan',
+    'operator<=':  'lessThanOrEqual',
+    'operator>=':  'greaterThanOrEqual',
+    'operator=':   'assign',
+    'operator()':  '__call__',
+    'operator[]':  '__getitem__',
+    'operator++':  'increment',
+    'operator--':  'decrement',
+    'operator^':   '__xor__',
+    'operator%':   '__mod__',
+    'operator!':   'logicalNot',
+    'operator~':   'bitwiseNot',
+    'operator&':   '__and__',
+    'operator&&':  'logicalAnd',
+    'operator|':   '__or__',
+    'operator||':  'logicalOr',
+    'operator+':   '__add__',
+    'operator-':   '__sub__',
+    'operator*':   '__mul__',
+    'operator/':   '__div__',
+    'operator+=':  '__iadd__',
+    'operator-=':  '__isub__',
+    'operator*=':  '__imul__',
+    'operator/=':  '__idiv__',
+    'operator,':   'concatenate',
+    'operator|=':  '__ior__',
+    'operator&=':  '__iand__',
+    'operator^=':  '__ixor__',
+    'operator~=':  'bitwiseNotEqual',
+    'operator->':  'dereference',
     'operator<<=': '__ilshift__',
     'operator<<=': '__ilshift__',
     'operator>>=': '__irshift__',
     'operator>>=': '__irshift__',
-    'print'       : 'Cprint',
+    'print':       'Cprint',
     'CInterval.setT': '_priv__cSetT',
     'CInterval.setT': '_priv__cSetT',
     }
     }
     
     
 classRenameDictionary = {
 classRenameDictionary = {
-    'Loader'                    : 'PandaLoader',
-    'String'                    : 'CString',
-    'LMatrix4f'                 : 'Mat4',
-    'LMatrix3f'                 : 'Mat3',
-    'LVecBase4f'                : 'VBase4',
-    'LVector4f'                 : 'Vec4',
-    'LPoint4f'                  : 'Point4',
-    'LVecBase3f'                : 'VBase3',
-    'LVector3f'                 : 'Vec3',
-    'LPoint3f'                  : 'Point3',
-    'LVecBase2f'                : 'VBase2',
-    'LVector2f'                 : 'Vec2',
-    'LPoint2f'                  : 'Point2',
-    'LQuaternionf'              : 'Quat',
-    'LMatrix4d'                 : 'Mat4D',
-    'LMatrix3d'                 : 'Mat3D',
-    'LVecBase4d'                : 'VBase4D',
-    'LVector4d'                 : 'Vec4D',
-    'LPoint4d'                  : 'Point4D',
-    'LVecBase3d'                : 'VBase3D',
-    'LVector3d'                 : 'Vec3D',
-    'LPoint3d'                  : 'Point3D',
-    'LVecBase2d'                : 'VBase2D',
-    'LVector2d'                 : 'Vec2D',
-    'LPoint2d'                  : 'Point2D',
-    'LQuaterniond'              : 'QuatD',
-    'Plane'                     : 'PlaneBase',
-    'Planef'                    : 'Plane',
-    'Planed'                    : 'PlaneD',
-    'Frustum'                   : 'FrustumBase',
-    'Frustumf'                  : 'Frustum',
-    'Frustumd'                  : 'FrustumD'
+    'Loader':                    'PandaLoader',
+    'String':                    'CString',
+    'LMatrix4f':                 'Mat4',
+    'LMatrix3f':                 'Mat3',
+    'LVecBase4f':                'VBase4',
+    'LVector4f':                 'Vec4',
+    'LPoint4f':                  'Point4',
+    'LVecBase3f':                'VBase3',
+    'LVector3f':                 'Vec3',
+    'LPoint3f':                  'Point3',
+    'LVecBase2f':                'VBase2',
+    'LVector2f':                 'Vec2',
+    'LPoint2f':                  'Point2',
+    'LQuaternionf':              'Quat',
+    'LMatrix4d':                 'Mat4D',
+    'LMatrix3d':                 'Mat3D',
+    'LVecBase4d':                'VBase4D',
+    'LVector4d':                 'Vec4D',
+    'LPoint4d':                  'Point4D',
+    'LVecBase3d':                'VBase3D',
+    'LVector3d':                 'Vec3D',
+    'LPoint3d':                  'Point3D',
+    'LVecBase2d':                'VBase2D',
+    'LVector2d':                 'Vec2D',
+    'LPoint2d':                  'Point2D',
+    'LQuaterniond':              'QuatD',
+    'Plane':                     'PlaneBase',
+    'Planef':                    'Plane',
+    'Planed':                    'PlaneD',
+    'Frustum':                   'FrustumBase',
+    'Frustumf':                  'Frustum',
+    'Frustumd':                  'FrustumD'
     }
     }
 
 
 
 

+ 5 - 5
direct/src/leveleditor/LevelEditor.py

@@ -3505,14 +3505,14 @@ class LevelEditor(NodePath, DirectObject):
             print curveOuterSideSts
             print curveOuterSideSts
 
 
             # return an ordered list
             # return an ordered list
-            for i in range(len(curvesInner) +1 ): #RAU don't forget, these curves are 1 based
+            for i in range(len(curvesInner) +1): #RAU don't forget, these curves are 1 based
                 curve = modelFile.find('**/*curve_inner_'+str(i))
                 curve = modelFile.find('**/*curve_inner_'+str(i))
                 if not curve.isEmpty():
                 if not curve.isEmpty():
                     # Mark whether it is a section of buildings or trees
                     # Mark whether it is a section of buildings or trees
                     curveType = curve.getName().split("_")[0]
                     curveType = curve.getName().split("_")[0]
                     curves['inner'].append([curve.node(),curveType])
                     curves['inner'].append([curve.node(),curveType])
                     
                     
-            for i in range(len(curvesOuter) +1 ):
+            for i in range(len(curvesOuter) +1):
                 curve = modelFile.find('**/*curve_outer_'+str(i))
                 curve = modelFile.find('**/*curve_outer_'+str(i))
                 if not curve.isEmpty():
                 if not curve.isEmpty():
                     # Mark whether it is a section of buildings or trees
                     # Mark whether it is a section of buildings or trees
@@ -3530,7 +3530,7 @@ class LevelEditor(NodePath, DirectObject):
             # curveside_outer_28_2 (two side streets closest to main building track 28)
             # curveside_outer_28_2 (two side streets closest to main building track 28)
             for i in range(maxNum):
             for i in range(maxNum):
                 for barricade in ['innerbarricade','outerbarricade']:
                 for barricade in ['innerbarricade','outerbarricade']:
-                    curve = modelFile.find('**/*curveside_inner_'+ barricade + '_' + str(i) )
+                    curve = modelFile.find('**/*curveside_inner_'+ barricade + '_' + str(i))
                     if not curve.isEmpty():
                     if not curve.isEmpty():
                         # Mark whether it is a section of buildings or trees
                         # Mark whether it is a section of buildings or trees
                         curveType = curve.getName().split("_")[0]
                         curveType = curve.getName().split("_")[0]
@@ -3539,7 +3539,7 @@ class LevelEditor(NodePath, DirectObject):
 
 
             for i in range(maxNum):
             for i in range(maxNum):
                 for barricade in ['innerbarricade','outerbarricade']:                
                 for barricade in ['innerbarricade','outerbarricade']:                
-                    curve = modelFile.find('**/*curveside_outer_'+ barricade + '_' + str(i) )
+                    curve = modelFile.find('**/*curveside_outer_'+ barricade + '_' + str(i))
                     if not curve.isEmpty():
                     if not curve.isEmpty():
                         # Mark whether it is a section of buildings or trees
                         # Mark whether it is a section of buildings or trees
                         curveType = curve.getName().split("_")[0]
                         curveType = curve.getName().split("_")[0]
@@ -3616,7 +3616,7 @@ class LevelEditor(NodePath, DirectObject):
         if barricadeDict[barricadeOrigNum][1] < curBldgGroupIndex:
         if barricadeDict[barricadeOrigNum][1] < curBldgGroupIndex:
             barricadeDict[barricadeOrigNum][1] = curBldgGroupIndex
             barricadeDict[barricadeOrigNum][1] = curBldgGroupIndex
         
         
-        print "---------- %s barricadeDict origNum=%d  data=(%d,%d)" %(side, barricadeOrigNum, barricadeDict[barricadeOrigNum][0], barricadeDict[barricadeOrigNum][1] )           
+        print "---------- %s barricadeDict origNum=%d  data=(%d,%d)" %(side, barricadeOrigNum, barricadeDict[barricadeOrigNum][0], barricadeDict[barricadeOrigNum][1])           
     
     
     def makeStreetAlongCurve(self):
     def makeStreetAlongCurve(self):
         curves = self.loadStreetCurve()
         curves = self.loadStreetCurve()