formatting

This commit is contained in:
Dave Schuyler 2006-01-27 02:54:41 +00:00
parent ea53570eef
commit 71243aa874
24 changed files with 473 additions and 473 deletions

View File

@ -851,13 +851,13 @@ class Actor(DirectObject, NodePath):
if joint.getType().isDerivedFrom(MovingPartMatrix.getClassType()):
node.setMat(joint.getInitialValue())
# Store a dictionary of jointName : node to list the controls
# Store a dictionary of jointName: node to list the controls
# requested for joints. The controls will actually be applied
# later, when we load up the animations in bindAnim().
if self.__controlJoints.has_key(bundle.this):
self.__controlJoints[bundle.this][jointName] = node
else:
self.__controlJoints[bundle.this] = { jointName : node }
self.__controlJoints[bundle.this] = { jointName: node }
return node
@ -1538,7 +1538,7 @@ class Actor(DirectObject, NodePath):
return anim[1]
# fetch a copy from the modelPool, or if we weren't careful
# enough to preload, fetch from disk :(
# enough to preload, fetch from disk
animPath = anim[0]
if self.__autoCopy:
animNode = loader.loadModelOnce(animPath)

View File

@ -20,449 +20,449 @@ import string
# generalize to non cluster situations
ClientConfigs = {
'single-server' : [{'display name' : 'display0',
'display mode' : 'client',
'pos' : Vec3(0),
'hpr' : Vec3(0)}
'single-server' : [{'display name': 'display0',
'display mode': 'client',
'pos': Vec3(0),
'hpr': Vec3(0)}
],
'two-server' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(0),
#'hpr' : Vec3(30,0,0)},
'hpr' : Vec3(0,0,0)},
{'display name' : 'la',
'pos' : Vec3(0),
#'hpr' : Vec3(-30,0,0)
'hpr' : Vec3(0,0,0)
'two-server' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(0),
#'hpr': Vec3(30,0,0)},
'hpr': Vec3(0,0,0)},
{'display name': 'la',
'pos': Vec3(0),
#'hpr': Vec3(-30,0,0)
'hpr': Vec3(0,0,0)
}
],
'mono-cave' : [{'display name' : 'la',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'mono-cave' : [{'display name': 'la',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lb',
'display mode' : 'client',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lb',
'display mode': 'client',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lc',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (-0.000, 0.173),
{'display name': 'lc',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (-0.000, 0.173),
},
],
'seamless-cave' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'seamless-cave' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'la',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'la',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lb',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lb',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lc',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (-0.000, 0.173),
{'display name': 'lc',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (-0.000, 0.173),
},
{'display name' : 'ra',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
{'display name': 'ra',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
{'display name' : 'rb',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'rb',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rc',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(-51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (-0.000, 0.173),
{'display name': 'rc',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(-51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (-0.000, 0.173),
},
],
'nemo-cave' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'nemo-cave' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'la',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'la',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lb',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lb',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lc',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (-0.000, 0.173),
{'display name': 'lc',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (-0.000, 0.173),
},
{'display name' : 'ra',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
{'display name': 'ra',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
{'display name' : 'rb',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'rb',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rc',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(-51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (-0.000, 0.173),
{'display name': 'rc',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(-51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (-0.000, 0.173),
},
{'display name' : 'lAudienceL',
'pos' : Vec3(-4.895, -0.020, 5.000),
'hpr' : Vec3(51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lAudienceL',
'pos': Vec3(-4.895, -0.020, 5.000),
'hpr': Vec3(51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rAudienceL',
'pos' : Vec3(-5.105, -8.0, 5.000),
'hpr' : Vec3(51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
{'display name': 'rAudienceL',
'pos': Vec3(-5.105, -8.0, 5.000),
'hpr': Vec3(51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
{'display name' : 'lAudienceR',
'pos' : Vec3(5.105, -0.020, 5.000),
'hpr' : Vec3(-51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lAudienceR',
'pos': Vec3(5.105, -0.020, 5.000),
'hpr': Vec3(-51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rAudienceR',
'pos' : Vec3(4.895, -8.0, 5.000),
'hpr' : Vec3(-51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
{'display name': 'rAudienceR',
'pos': Vec3(4.895, -8.0, 5.000),
'hpr': Vec3(-51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
],
'nemo-cave-narrow' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'nemo-cave-narrow': [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'la',
'pos' : Vec3(-0.105, -19.890, 4.500),
'hpr' : Vec3(51.500, 0.000, 0.000),
'focal length' : 1.662,
'film size' : (1.000, 0.828),
'film offset' : (1.079, 0.207),
{'display name': 'la',
'pos': Vec3(-0.105, -19.890, 4.500),
'hpr': Vec3(51.500, 0.000, 0.000),
'focal length': 1.662,
'film size': (1.000, 0.828),
'film offset': (1.079, 0.207),
},
{'display name' : 'lb',
'pos' : Vec3(-0.105, -19.890, 4.500),
'hpr' : Vec3(0.000, 0.000, 0.000),
'focal length' : 2.186,
'film size' : (1.000, 0.828),
'film offset' : (0.007, 0.207),
{'display name': 'lb',
'pos': Vec3(-0.105, -19.890, 4.500),
'hpr': Vec3(0.000, 0.000, 0.000),
'focal length': 2.186,
'film size': (1.000, 0.828),
'film offset': (0.007, 0.207),
},
{'display name' : 'lc',
'pos' : Vec3(-0.105, -19.890, 4.500),
'hpr' : Vec3(-51.500, 0.000, 0.000),
'focal length' : 1.673,
'film size' : (1.000, 0.828),
'film offset' : (-1.070, 0.207),
{'display name': 'lc',
'pos': Vec3(-0.105, -19.890, 4.500),
'hpr': Vec3(-51.500, 0.000, 0.000),
'focal length': 1.673,
'film size': (1.000, 0.828),
'film offset': (-1.070, 0.207),
},
{'display name' : 'ra',
'pos' : Vec3(0.105, -19.890, 4.500),
'hpr' : Vec3(51.500, 0.000, 0.000),
'focal length' : 1.673,
'film size' : (1.000, 0.828),
'film offset' : (1.070, 0.207),
{'display name': 'ra',
'pos': Vec3(0.105, -19.890, 4.500),
'hpr': Vec3(51.500, 0.000, 0.000),
'focal length': 1.673,
'film size': (1.000, 0.828),
'film offset': (1.070, 0.207),
},
{'display name' : 'rb',
'pos' : Vec3(0.105, -19.890, 4.500),
'hpr' : Vec3(0.000, 0.000, 0.000),
'focal length' : 2.186,
'film size' : (1.000, 0.828),
'film offset' : (-0.007, 0.207),
{'display name': 'rb',
'pos': Vec3(0.105, -19.890, 4.500),
'hpr': Vec3(0.000, 0.000, 0.000),
'focal length': 2.186,
'film size': (1.000, 0.828),
'film offset': (-0.007, 0.207),
},
{'display name' : 'rc',
'pos' : Vec3(0.105, -19.890, 4.500),
'hpr' : Vec3(-51.500, 0.000, 0.000),
'focal length' : 1.662,
'film size' : (1.000, 0.828),
'film offset' : (-1.079, 0.207),
{'display name': 'rc',
'pos': Vec3(0.105, -19.890, 4.500),
'hpr': Vec3(-51.500, 0.000, 0.000),
'focal length': 1.662,
'film size': (1.000, 0.828),
'film offset': (-1.079, 0.207),
},
{'display name' : 'lAudienceL',
'pos' : Vec3(-0.105, -19.890, 4.500),
'hpr' : Vec3(49.038, 0.000, 0.000),
'focal length' : 1.452,
'film size' : (1.000, 0.797),
'film offset' : (-0.292, 0.149),
{'display name': 'lAudienceL',
'pos': Vec3(-0.105, -19.890, 4.500),
'hpr': Vec3(49.038, 0.000, 0.000),
'focal length': 1.452,
'film size': (1.000, 0.797),
'film offset': (-0.292, 0.149),
},
{'display name' : 'rAudienceL',
'pos' : Vec3(0.105, -19.890, 4.500),
'hpr' : Vec3(49.038, 0.000, 0.000),
'focal length' : 1.468,
'film size' : (1.000, 0.797),
'film offset' : (-0.306, 0.149),
{'display name': 'rAudienceL',
'pos': Vec3(0.105, -19.890, 4.500),
'hpr': Vec3(49.038, 0.000, 0.000),
'focal length': 1.468,
'film size': (1.000, 0.797),
'film offset': (-0.306, 0.149),
},
{'display name' : 'lAudienceR',
'pos' : Vec3(-0.105, -19.890, 4.500),
'hpr' : Vec3(-52.750, 0.000, 0.000),
'focal length' : 1.551,
'film size' : (1.000, 0.796),
'film offset' : (0.245, 0.149),
{'display name': 'lAudienceR',
'pos': Vec3(-0.105, -19.890, 4.500),
'hpr': Vec3(-52.750, 0.000, 0.000),
'focal length': 1.551,
'film size': (1.000, 0.796),
'film offset': (0.245, 0.149),
},
{'display name' : 'rAudienceR',
'pos' : Vec3(0.105, -19.890, 4.500),
'hpr' : Vec3(-52.750, 0.000, 0.000),
'focal length' : 1.534,
'film size' : (1.000, 0.796),
'film offset' : (0.232, 0.149),
{'display name': 'rAudienceR',
'pos': Vec3(0.105, -19.890, 4.500),
'hpr': Vec3(-52.750, 0.000, 0.000),
'focal length': 1.534,
'film size': (1.000, 0.796),
'film offset': (0.232, 0.149),
},
{'display name' : 'lCart',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lCart',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rCart',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'rCart',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
],
'fourd-cave' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'fourd-cave' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'la',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'la',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lb',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lb',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lc',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (-0.000, 0.173),
{'display name': 'lc',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (-0.000, 0.173),
},
{'display name' : 'ra',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(51.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
{'display name': 'ra',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(51.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
{'display name' : 'rb',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'rb',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rc',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(-51.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (-0.000, 0.173),
{'display name': 'rc',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(-51.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (-0.000, 0.173),
},
{'display name' : 'lAudienceL',
'pos' : Vec3(-4.895, -0.020, 5.000),
'hpr' : Vec3(65.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lAudienceL',
'pos': Vec3(-4.895, -0.020, 5.000),
'hpr': Vec3(65.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rAudienceL',
'pos' : Vec3(-5.105, -8.0, 5.000),
'hpr' : Vec3(65.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
{'display name': 'rAudienceL',
'pos': Vec3(-5.105, -8.0, 5.000),
'hpr': Vec3(65.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
{'display name' : 'lAudienceR',
'pos' : Vec3(5.105, -0.020, 5.000),
'hpr' : Vec3(-65.213, 0.000, 0.000),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'lAudienceR',
'pos': Vec3(5.105, -0.020, 5.000),
'hpr': Vec3(-65.213, 0.000, 0.000),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rAudienceR',
'pos' : Vec3(4.895, -8.0, 5.000),
'hpr' : Vec3(-65.675, 0.000, 0.000),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
{'display name': 'rAudienceR',
'pos': Vec3(4.895, -8.0, 5.000),
'hpr': Vec3(-65.675, 0.000, 0.000),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
],
'parallax-cave' : [{'display name' : 'master',
'display mode' : 'client',
'parallax-cave' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(0),
'hpr': Vec3(0),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'la',
{'display name': 'la',
'pos': Vec3(0),
'hpr': Vec3(0),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lb',
{'display name': 'lb',
'pos': Vec3(0),
'hpr': Vec3(0),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'lc',
{'display name': 'lc',
'pos': Vec3(0),
'hpr': Vec3(0),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (-0.000, 0.173),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (-0.000, 0.173),
},
{'display name' : 'ra',
{'display name': 'ra',
'pos': Vec3(0),
'hpr': Vec3(0),
'focal length' : 0.820,
'film size' : (1.000, 0.830),
'film offset' : (0.000, 0.173),
'focal length': 0.820,
'film size': (1.000, 0.830),
'film offset': (0.000, 0.173),
},
{'display name' : 'rb',
{'display name': 'rb',
'pos': Vec3(0),
'hpr': Vec3(0),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'rc',
{'display name': 'rc',
'pos': Vec3(0),
'hpr': Vec3(0),
'focal length' : 0.809,
'film size' : (1.000, 0.831),
'film offset' : (-0.000, 0.173),
'focal length': 0.809,
'film size': (1.000, 0.831),
'film offset': (-0.000, 0.173),
},
],
'carttest' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(0),
'hpr' : Vec3(0),
'carttest' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(0),
'hpr': Vec3(0),
},
{'display name' : 'left',
'pos' : Vec3(-.105,0,0),
'hpr' : Vec3(0,0,0)},
{'display name' : 'right',
'pos' : Vec3(.105,0,0),
'hpr' : Vec3(0,0,0)}
{'display name': 'left',
'pos': Vec3(-.105,0,0),
'hpr': Vec3(0,0,0)},
{'display name': 'right',
'pos': Vec3(.105,0,0),
'hpr': Vec3(0,0,0)}
],
'ursula' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(0),
'hpr' : Vec3(0),
'ursula' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(0),
'hpr': Vec3(0),
},
{'display name' : 'l',
'pos' : Vec3(-.105,0,0),
'hpr' : Vec3(0,0,0),
'focal length' : 15,
'film size' : (13.33, 10),
#'film offset' : (0.105, -2),
'film offset' : (0.105, -1),
{'display name': 'l',
'pos': Vec3(-.105,0,0),
'hpr': Vec3(0,0,0),
'focal length': 15,
'film size': (13.33, 10),
#'film offset': (0.105, -2),
'film offset': (0.105, -1),
},
{'display name' : 'r',
'pos' : Vec3(.105,0,0),
'hpr' : Vec3(0,0,0),
'focal length' : 15,
'film size' : (13.33, 10),
#'film offset' : (-0.105, -2),
'film offset' : (-0.105, -1),
{'display name': 'r',
'pos': Vec3(.105,0,0),
'hpr': Vec3(0,0,0),
'focal length': 15,
'film size': (13.33, 10),
#'film offset': (-0.105, -2),
'film offset': (-0.105, -1),
}
],
'composite' : [{'display name' : 'master',
'display mode' : 'client',
'pos' : Vec3(0),
'composite' : [{'display name': 'master',
'display mode': 'client',
'pos': Vec3(0),
},
{'display name' : 'left',
'pos' : Vec3(-0.105, -0.020, 5.000),
'hpr' : Vec3(-0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'left',
'pos': Vec3(-0.105, -0.020, 5.000),
'hpr': Vec3(-0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
},
{'display name' : 'right',
'pos' : Vec3(0.105, -0.020, 5.000),
'hpr' : Vec3(0.370, 0.000, 0.000),
'focal length' : 0.815,
'film size' : (1.000, 0.831),
'film offset' : (0.000, 0.173),
{'display name': 'right',
'pos': Vec3(0.105, -0.020, 5.000),
'hpr': Vec3(0.370, 0.000, 0.000),
'focal length': 0.815,
'film size': (1.000, 0.831),
'film offset': (0.000, 0.173),
}
],
}

View File

@ -10,7 +10,7 @@ class InputState(DirectObject.DirectObject):
The initial usage is to watch some keyboard keys so that another
task can poll the key states. By the way, in general polling is
not a good idea, but it is useful in some situations. Know when
to use it :) If in doubt, don't use this class and listen for
to use it:) If in doubt, don't use this class and listen for
events instead.
"""
@ -44,7 +44,7 @@ class InputState(DirectObject.DirectObject):
self.accept(eventOff, self.set, [name, 0])
self.state[name] = default
# self.watching is a dict of the form:
# {name : [(eventOn, eventOff), (eventOn, eventOff)...]}
# {name: [(eventOn, eventOff), (eventOn, eventOff)...]}
eventList = self.watching.get(name)
if eventList:
eventList.append((eventOn, eventOff))

View File

@ -4,17 +4,17 @@ BAD_CHANNEL_ID = 0 # 0xFFFFFFFFFFFFFFFF
class DoCollectionManager:
def __init__(self):
# Dict of {DistributedObject ids : DistributedObjects}
# Dict of {DistributedObject ids: DistributedObjects}
self.doId2do = {}
# (parentId, zoneId) to dict of doId->DistributedObjectAI
## self.zoneId2doIds={}
if self.hasOwnerView():
# Dict of {DistributedObject ids : DistributedObjects}
# Dict of {DistributedObject ids: DistributedObjects}
# for 'owner' views of objects
self.doId2ownerView = {}
# Dict of {
# parent DistributedObject id:
# { zoneIds : [child DistributedObject ids] }}
# { zoneIds: [child DistributedObject ids] }}
self.__doHierarchy = {}
def getDo(self, doId):

View File

@ -13,17 +13,17 @@ class PyDatagramIterator(DatagramIterator):
# If Python had an O(1) "case" statement we would use that instead
FuncDict = {
STInt8 : DatagramIterator.getInt8,
STInt16 : DatagramIterator.getInt16,
STInt32 : DatagramIterator.getInt32,
STInt64 : DatagramIterator.getInt64,
STInt16: DatagramIterator.getInt16,
STInt32: DatagramIterator.getInt32,
STInt64: DatagramIterator.getInt64,
STUint8 : DatagramIterator.getUint8,
STUint16 : DatagramIterator.getUint16,
STUint32 : DatagramIterator.getUint32,
STUint64 : DatagramIterator.getUint64,
STFloat64 : DatagramIterator.getFloat64,
STString : DatagramIterator.getString,
STBlob : DatagramIterator.getString,
STBlob32 : DatagramIterator.getString32,
STUint16: DatagramIterator.getUint16,
STUint32: DatagramIterator.getUint32,
STUint64: DatagramIterator.getUint64,
STFloat64: DatagramIterator.getFloat64,
STString: DatagramIterator.getString,
STBlob: DatagramIterator.getString,
STBlob32: DatagramIterator.getString32,
}
getChannel = DatagramIterator.getUint64

View File

@ -41,10 +41,10 @@ methodRenameDictionary = {
'operator^=' : '__ixor__',
'operator~=' : 'bitwiseNotEqual',
'operator->' : 'dereference',
'operator<<=' : '__ilshift__',
'operator>>=' : '__irshift__',
'operator<<=': '__ilshift__',
'operator>>=': '__irshift__',
'print' : 'Cprint',
'CInterval.setT' : '_priv__cSetT',
'CInterval.setT': '_priv__cSetT',
}
classRenameDictionary = {

View File

@ -341,7 +341,7 @@ class ClassTypeDescriptor(BaseTypeDescriptor):
"""
Record all class methods in a 2 level dictionary so we can go
through them and see which are overloaded
{ className : {methodName : [methodSpec, methodSpec, methodSpec]}}
{ className: {methodName: [methodSpec, methodSpec, methodSpec]}}
"""
methodList = self.overloadedClassMethods.setdefault(methodSpec.name, [])
methodList.append(methodSpec)
@ -351,7 +351,7 @@ class ClassTypeDescriptor(BaseTypeDescriptor):
"""
Record all instance methods in a 2 level dictionary so we can go
through them and see which are overloaded
{ className : {methodName : [methodSpec, methodSpec, methodSpec]}}
{ className: {methodName: [methodSpec, methodSpec, methodSpec]}}
"""
methodList = self.overloadedInstanceMethods.setdefault(methodSpec.name, [])
methodList.append(methodSpec)

View File

@ -160,7 +160,7 @@ class ClassicFSM(DirectObject):
if state:
return state
else:
ClassicFSM.notify.warning("[%s] : getStateNamed: %s, no such state" %
ClassicFSM.notify.warning("[%s]: getStateNamed: %s, no such state" %
(self.__name, stateName))

View File

@ -31,7 +31,7 @@ Code Overview:
2) DirectGuiBase.defineoptions is called. defineoption creates:
self._constructorKeywords = { keyword : [value, useFlag] }
self._constructorKeywords = { keyword: [value, useFlag] }
a dictionary of the keyword options specified as part of the constructor
keywords can be of the form 'component_option', where component is
the name of a widget's component, a component group or a component alias

View File

@ -191,19 +191,19 @@ class MetaInterval(CMetaInterval):
def __getslice__(self, i, j):
if isinstance(self.ivals, types.TupleType):
self.ivals = list(self.ivals)
return self.__class__(self.ivals[i : j])
return self.__class__(self.ivals[i: j])
def __setslice__(self, i, j, s):
if isinstance(self.ivals, types.TupleType):
self.ivals = list(self.ivals)
self.ivals[i : j] = s
self.ivals[i: j] = s
self.__ivalsDirty = 1
assert self.validateComponents(s)
def __delslice__(self, i, j):
if isinstance(self.ivals, types.TupleType):
self.ivals = list(self.ivals)
del self.ivals[i : j]
del self.ivals[i: j]
self.__ivalsDirty = 1
def __iadd__(self, other):

View File

@ -184,17 +184,17 @@ else:
hoods = string.split(hoodString)
# The list of neighborhoods to edit
hoodIds = {'TT' : 'toontown_central',
'DD' : 'donalds_dock',
'MM' : 'minnies_melody_land',
'BR' : 'the_burrrgh',
'DG' : 'daisys_garden',
'DL' : 'donalds_dreamland',
'CC' : 'cog_hq_bossbot',
'CL' : 'cog_hq_lawbot',
'CM' : 'cog_hq_cashbot',
'CS' : 'cog_hq_sellbot',
'GS' : 'goofy_speedway',
hoodIds = {'TT': 'toontown_central',
'DD': 'donalds_dock',
'MM': 'minnies_melody_land',
'BR': 'the_burrrgh',
'DG': 'daisys_garden',
'DL': 'donalds_dreamland',
'CC': 'cog_hq_bossbot',
'CL': 'cog_hq_lawbot',
'CM': 'cog_hq_cashbot',
'CS': 'cog_hq_sellbot',
'GS': 'goofy_speedway',
}
# Init neighborhood arrays
@ -3665,7 +3665,7 @@ class LevelEditor(NodePath, DirectObject):
bldg, bldgIndex = self.getBldg(bldgIndex, bldgs)
curve.getPoint(currT, currPoint)
if side == "inner" or side == "innersidest" :
if side == "inner" or side == "innersidest":
heading = 90
else:
heading = -90
@ -3835,7 +3835,7 @@ class LevelEditor(NodePath, DirectObject):
bldg, bldgIndex = self.getBldg(bldgIndex, bldgs, forceDuplicate = True)
curve.getPoint(currT, currPoint)
if side == "inner" or side == "innersidest" :
if side == "inner" or side == "innersidest":
heading = 90
else:
heading = -90

View File

@ -435,18 +435,18 @@ optdefaults = { 'type':'PYZ',
'destdir':'', # COLLECT
'pathprefix': '',
'trees': '',
'debug' : '0',
'support' : '1', # include python20.dll & exceptons.pyc at a minimum
'debug': '0',
'support': '1', # include python20.dll & exceptons.pyc at a minimum
'icon': '',
}
optcnvrts = { 'type':'',
'name' : 'getstring',
'name': 'getstring',
'exstdlib': 'getbool',
'console': 'getbool',
'analyze' : 'getbool',
'debug' : 'getbool',
'includetk' : 'getbool',
'analyze': 'getbool',
'debug': 'getbool',
'includetk': 'getbool',
'userunw': 'getbool',
'destdir': 'getstring',
'support': 'getbool',

View File

@ -85,7 +85,7 @@ class Archive:
return None
ispkg, code = rslt
if ispkg:
return ispkg, code, {'__path__' : []}
return ispkg, code, {'__path__': []}
return rslt
####### Core method - Override as needed #########

View File

@ -81,7 +81,7 @@ class Archive:
return None
ispkg, code = rslt
if ispkg:
return ispkg, code, {'__path__' : []}
return ispkg, code, {'__path__': []}
return rslt
####### Core method - Override as needed #########

View File

@ -420,7 +420,7 @@ class DirectoryImporter(Importer):
pathname = os.path.join(dir, modname)
if os.path.isdir(pathname):
values = { '__pkgdir__' : pathname }
values = { '__pkgdir__': pathname }
ispkg = 1
pathname = os.path.join(pathname, '__init__')
else:

View File

@ -10,9 +10,9 @@ class Messenger:
def __init__(self):
"""
One is keyed off the event name. It has the following structure:
{event1 : {object1: [method, extraArgs, persistent],
{event1: {object1: [method, extraArgs, persistent],
object2: [method, extraArgs, persistent]},
event2 : {object1: [method, extraArgs, persistent],
event2: {object1: [method, extraArgs, persistent],
object2: [method, extraArgs, persistent]}}
This dictionary allow for efficient callbacks when the messenger
@ -23,7 +23,7 @@ class Messenger:
Or, for an example with more real data:
{'mouseDown' : {avatar : [avatar.jump, [2.0], 1]}}
{'mouseDown': {avatar: [avatar.jump, [2.0], 1]}}
"""
self.__callbacks = {}
self.__objectEvents = {}
@ -381,7 +381,7 @@ class Messenger:
keys.sort()
for event in keys:
str += self.__eventRepr(event)
# Print out the object : event dictionary too
# Print out the object: event dictionary too
str += "="*64 + "\n"
for object, eventDict in self.__objectEvents.items():
str += "%s:\n" % object

View File

@ -1655,8 +1655,8 @@ def normalDistrib(a, b, gauss=random.gauss):
def weightedRand(valDict, rng=random.random):
"""
pass in a dictionary with a selection -> weight mapping. Eg.
{"Choice 1" : 10,
"Choice 2" : 30,
{"Choice 1": 10,
"Choice 2": 30,
"bear" : 100}
-Weights need not add up to any particular value.

View File

@ -74,7 +74,7 @@ class FSMInspector(AppShell):
menuBar.addcascademenu('States', 'Marker Size',
'Set state marker size', tearoff = 1)
for size in ('Small', 'Medium', 'Large'):
sizeDict = {'Small': '0.25i', 'Medium': '0.375i', 'Large' : '0.5i'}
sizeDict = {'Small': '0.25i', 'Medium': '0.375i', 'Large': '0.5i'}
menuBar.addmenuitem('Marker Size', 'command',
size + ' markers', label = size + ' Markers',
command = lambda s = self, sz = size, d = sizeDict:

View File

@ -34,31 +34,31 @@ def initializeInspectorMap():
notFinishedTypes = ['BufferType', 'EllipsisType', 'FrameType', 'TracebackType', 'XRangeType']
_InspectorMap = {
'Builtin_function_or_methodType' : 'FunctionInspector',
'BuiltinFunctionType' : 'FunctionInspector',
'BuiltinMethodType' : 'FunctionInspector',
'ClassType' : 'ClassInspector',
'CodeType' : 'CodeInspector',
'ComplexType' : 'Inspector',
'DictionaryType' : 'DictionaryInspector',
'DictType' : 'DictionaryInspector',
'FileType' : 'Inspector',
'FloatType' : 'Inspector',
'FunctionType' : 'FunctionInspector',
'Instance methodType' : 'InstanceMethodInspector',
'InstanceType' : 'InstanceInspector',
'IntType' : 'Inspector',
'LambdaType' : 'Inspector',
'ListType' : 'SequenceInspector',
'LongType' : 'Inspector',
'MethodType' : 'FunctionInspector',
'ModuleType' : 'ModuleInspector',
'NoneType' : 'Inspector',
'SliceType' : 'SliceInspector',
'StringType' : 'SequenceInspector',
'TupleType' : 'SequenceInspector',
'TypeType' : 'Inspector',
'UnboundMethodType' : 'FunctionInspector'}
'Builtin_function_or_methodType': 'FunctionInspector',
'BuiltinFunctionType': 'FunctionInspector',
'BuiltinMethodType': 'FunctionInspector',
'ClassType': 'ClassInspector',
'CodeType': 'CodeInspector',
'ComplexType': 'Inspector',
'DictionaryType': 'DictionaryInspector',
'DictType': 'DictionaryInspector',
'FileType': 'Inspector',
'FloatType': 'Inspector',
'FunctionType': 'FunctionInspector',
'Instance methodType': 'InstanceMethodInspector',
'InstanceType': 'InstanceInspector',
'IntType': 'Inspector',
'LambdaType': 'Inspector',
'ListType': 'SequenceInspector',
'LongType': 'Inspector',
'MethodType': 'FunctionInspector',
'ModuleType': 'ModuleInspector',
'NoneType': 'Inspector',
'SliceType': 'SliceInspector',
'StringType': 'SequenceInspector',
'TupleType': 'SequenceInspector',
'TypeType': 'Inspector',
'UnboundMethodType': 'FunctionInspector'}
for each in notFinishedTypes:
_InspectorMap[each] = 'Inspector'
@ -332,8 +332,8 @@ class InspectorWindow:
command = self.commandWidget.get(commandStart,
commandStart + ' lineend')
if command:
partDict = { 'this' : self.selectedPart(),
'object' : self.topInspector().object }
partDict = { 'this': self.selectedPart(),
'object': self.topInspector().object }
result = eval(command, partDict)
self.commandWidget.insert(INSERT, `result` + '\n>>> ')
self.commandWidget.see(INSERT)

View File

@ -66,19 +66,19 @@ class Dial(Valuator):
def addValuatorPropertiesToDialog(self):
self.addPropertyToDialog(
'base',
{ 'widget' : self._valuator,
'type' : 'real',
'help' : 'Dial value = base + delta * numRevs'})
{ 'widget': self._valuator,
'type': 'real',
'help': 'Dial value = base + delta * numRevs'})
self.addPropertyToDialog(
'delta',
{ 'widget' : self._valuator,
'type' : 'real',
'help' : 'Dial value = base + delta * numRevs'})
{ 'widget': self._valuator,
'type': 'real',
'help': 'Dial value = base + delta * numRevs'})
self.addPropertyToDialog(
'numSegments',
{ 'widget' : self._valuator,
'type' : 'integer',
'help' : 'Number of segments to divide dial into.'})
{ 'widget': self._valuator,
'type': 'integer',
'help': 'Number of segments to divide dial into.'})
def addValuatorMenuEntries(self):
# The popup menu

View File

@ -58,11 +58,11 @@ class EntryScale(Pmw.MegaWidget):
None,
Pmw.EntryField, self.labelFrame,
entry_width = 10,
validate = { 'validator' : 'real',
'min' : self['min'],
'max' : self['max'],
'minstrict' : 0,
'maxstrict' : 0},
validate = { 'validator': 'real',
'min': self['min'],
'max': self['max'],
'minstrict': 0,
'maxstrict': 0},
entry_justify = 'right',
entry_textvar = self.entryValue,
command = self._entryCommand)
@ -187,11 +187,11 @@ class EntryScale(Pmw.MegaWidget):
def _updateValidate(self):
self.configure(entryField_validate = {
'validator' : 'real',
'min' : self['min'],
'max' : self['max'],
'minstrict' : 0,
'maxstrict' : 0})
'validator': 'real',
'min': self['min'],
'max': self['max'],
'minstrict': 0,
'maxstrict': 0})
self.minLabel['text'] = self['min']
self.scale['from_'] = self['min']
self.scale['to'] = self['max']

View File

@ -122,7 +122,7 @@ class Valuator(Pmw.MegaWidget):
},
'min':
{ 'widget' : self,
{ 'widget': self,
'type': 'real',
'fNone': 1,
'help': 'Minimum allowable value. Enter None for no minimum.'},

View File

@ -155,11 +155,11 @@ class VectorEntry(Pmw.MegaWidget):
def _updateValidate(self):
# Update entry field to respect new limits
self.configure(Entry_validate = {
'validator' : 'real',
'min' : self['min'],
'max' : self['max'],
'minstrict' : 0,
'maxstrict' : 0})
'validator': 'real',
'min': self['min'],
'max': self['max'],
'minstrict': 0,
'maxstrict': 0})
# Reflect changes in floaters
self.configure(valuator_min = self['min'],
valuator_max = self['max'])

View File

@ -111,17 +111,17 @@ class WidgetPropertiesDialog(Toplevel):
if entryType == 'real':
# Only allow real numbers
if fAllowNone:
entry['validate'] = { 'validator' : self.realOrNone }
entry['validate'] = { 'validator': self.realOrNone }
else:
entry['validate'] = { 'validator' : 'real' }
entry['validate'] = { 'validator': 'real' }
if helpString is None:
helpString = 'Enter a floating point number' + extra + '.'
elif entryType == 'integer':
# Only allow integer values
if fAllowNone:
entry['validate'] = { 'validator' : self.intOrNone }
entry['validate'] = { 'validator': self.intOrNone }
else:
entry['validate'] = { 'validator' : 'integer' }
entry['validate'] = { 'validator': 'integer' }
if helpString is None:
helpString = 'Enter an integer' + extra + '.'
else: