From 231d582a862db17273b3405dbea74baa5882765c Mon Sep 17 00:00:00 2001 From: Dave Schuyler Date: Fri, 1 Jul 2005 01:29:36 +0000 Subject: [PATCH] formatting --- direct/src/actor/DistributedActor.py | 10 +------- direct/src/directtools/DirectGeometry.py | 18 +++++++------- direct/src/directtools/DirectSelection.py | 16 ++++++------- direct/src/distributed/ClientRepository.py | 16 ++++++------- .../src/distributed/ConnectionRepository.py | 2 +- direct/src/distributed/DistributedObjectAI.py | 2 +- direct/src/distributed/DoCollectionManager.py | 4 ++-- direct/src/distributed/DoInterestManager.py | 14 +++++------ direct/src/ffi/FFIExternalObject.py | 2 +- direct/src/ffi/FFIInterrogateDatabase.py | 2 +- direct/src/ffi/FFIOverload.py | 2 +- direct/src/ffi/FFITypes.py | 6 ++--- direct/src/ffi/jGenPyCode.py | 2 +- direct/src/gui/DirectEntry.py | 4 ++-- direct/src/leveleditor/LevelEditor.py | 16 ++++++------- direct/src/particles/Particles.py | 4 ++-- direct/src/showbase/ShowBase.py | 6 ++--- direct/src/tkwidgets/Valuator.py | 14 +++++------ doc/SceneEditor/dataHolder.py | 2 +- doc/SceneEditor/quad.py | 24 +++++++++---------- doc/SceneEditor/seFileSaver.py | 4 ++-- doc/SceneEditor/seMopathRecorder.py | 2 +- doc/makepanda/makepanda.py | 2 +- 23 files changed, 83 insertions(+), 91 deletions(-) diff --git a/direct/src/actor/DistributedActor.py b/direct/src/actor/DistributedActor.py index 4f4bcf4fed..525bff139d 100644 --- a/direct/src/actor/DistributedActor.py +++ b/direct/src/actor/DistributedActor.py @@ -5,10 +5,6 @@ from direct.distributed import DistributedNode import Actor class DistributedActor(DistributedNode.DistributedNode, Actor.Actor): - """Distributed Actor class:""" - -# Constructor for DistributedActor - def __init__(self, cr): try: self.DistributedActor_initialized @@ -20,16 +16,12 @@ class DistributedActor(DistributedNode.DistributedNode, Actor.Actor): # rather cache them than delete them if possible. self.setCacheable(1) -# Disable the DistributedActor - def disable(self): # remove all anims, on all parts and all lods if (not self.isEmpty()): Actor.Actor.unloadAnims(self, None, None, None) DistributedNode.DistributedNode.disable(self) -# Delete the DistributedActor - def delete(self): try: self.DistributedActor_deleted @@ -40,4 +32,4 @@ class DistributedActor(DistributedNode.DistributedNode, Actor.Actor): def loop(self, animName, restart=1, partName=None,fromFrame=None, toFrame=None): - return Actor.Actor.loop(self,animName,restart,partName,fromFrame,toFrame); + return Actor.Actor.loop(self,animName,restart,partName,fromFrame,toFrame) diff --git a/direct/src/directtools/DirectGeometry.py b/direct/src/directtools/DirectGeometry.py index 92de29f85d..9aceb937b1 100644 --- a/direct/src/directtools/DirectGeometry.py +++ b/direct/src/directtools/DirectGeometry.py @@ -47,24 +47,24 @@ class LineNodePath(NodePath): self.lineSegs.setThickness(thickness) def setColor(self, *_args): - apply( self.lineSegs.setColor, _args ) + apply(self.lineSegs.setColor, _args) - def setVertex( self, *_args): - apply( self.lineSegs.setVertex, _args ) + def setVertex(self, *_args): + apply(self.lineSegs.setVertex, _args) - def setVertexColor( self, vertex, *_args ): + def setVertexColor(self, vertex, *_args): apply( self.lineSegs.setVertexColor, (vertex,) + _args ) - def getCurrentPosition( self ): + def getCurrentPosition(self): return self.lineSegs.getCurrentPosition() - def getNumVertices( self ): + def getNumVertices(self): return self.lineSegs.getNumVertices() - def getVertex( self, index ): + def getVertex(self, index): return self.lineSegs.getVertex(index) - def getVertexColor( self ): + def getVertexColor(self): return self.lineSegs.getVertexColor() def drawArrow(self, sv, ev, arrowAngle, arrowLength): @@ -199,7 +199,7 @@ def qSlerp(startQuat, endQuat, t): # If the above dot product is negative, it would be better to # go between the negative of the initial and the final, so that # we take the shorter path. - if ( cosOmega < 0.0 ): + if cosOmega < 0.0: cosOmega *= -1 startQ.setI(-1 * startQ.getI()) startQ.setJ(-1 * startQ.getJ()) diff --git a/direct/src/directtools/DirectSelection.py b/direct/src/directtools/DirectSelection.py index 0f6c645e89..45ca78bbf7 100644 --- a/direct/src/directtools/DirectSelection.py +++ b/direct/src/directtools/DirectSelection.py @@ -504,7 +504,7 @@ class SelectionQueue(CollisionHandlerQueue): def findNextCollisionEntry(self, skipFlags = SKIP_NONE): return self.findCollisionEntry(skipFlags, self.index + 1) - def findCollisionEntry(self, skipFlags = SKIP_NONE, startIndex = 0 ): + def findCollisionEntry(self, skipFlags = SKIP_NONE, startIndex = 0): # Init self.index and self.entry self.setCurrentIndex(-1) self.setCurrentEntry(None) @@ -573,7 +573,7 @@ class SelectionRay(SelectionQueue): # Determine collision entry return self.findCollisionEntry(skipFlags) - def pickWidget(self, targetNodePath = render, skipFlags = SKIP_NONE ): + def pickWidget(self, targetNodePath = render, skipFlags = SKIP_NONE): self.collideWithWidget() self.pick(targetNodePath) # Determine collision entry @@ -588,7 +588,7 @@ class SelectionRay(SelectionQueue): def pickGeom3D(self, targetNodePath = render, origin = Point3(0), dir = Vec3(0,0,-1), - skipFlags = SKIP_HIDDEN | SKIP_CAMERA ): + skipFlags = SKIP_HIDDEN | SKIP_CAMERA): self.collideWithGeom() self.pick3D(targetNodePath, origin, dir) # Determine collision entry @@ -597,7 +597,7 @@ class SelectionRay(SelectionQueue): def pickBitMask3D(self, bitMask = BitMask32.allOff(), targetNodePath = render, origin = Point3(0), dir = Vec3(0,0,-1), - skipFlags = SKIP_ALL ): + skipFlags = SKIP_ALL): self.collideWithBitMask(bitMask) self.pick3D(targetNodePath, origin, dir) # Determine collision entry @@ -623,7 +623,7 @@ class SelectionSegment(SelectionQueue): self.numColliders += 1 def pickGeom(self, targetNodePath = render, endPointList = [], - skipFlags = SKIP_HIDDEN | SKIP_CAMERA ): + skipFlags = SKIP_HIDDEN | SKIP_CAMERA): self.collideWithGeom() for i in range(min(len(endPointList), self.numColliders)): pointA, pointB = endPointList[i] @@ -636,7 +636,7 @@ class SelectionSegment(SelectionQueue): def pickBitMask(self, bitMask = BitMask32.allOff(), targetNodePath = render, endPointList = [], - skipFlags = SKIP_HIDDEN | SKIP_CAMERA ): + skipFlags = SKIP_HIDDEN | SKIP_CAMERA): self.collideWithBitMask(bitMask) for i in range(min(len(endPointList), self.numColliders)): pointA, pointB = endPointList[i] @@ -700,13 +700,13 @@ class SelectionSphere(SelectionQueue): return self.findCollisionEntry(skipFlags) def pickGeom(self, targetNodePath = render, - skipFlags = SKIP_HIDDEN | SKIP_CAMERA ): + skipFlags = SKIP_HIDDEN | SKIP_CAMERA): self.collideWithGeom() return self.pick(targetNodePath, skipFlags) def pickBitMask(self, bitMask = BitMask32.allOff(), targetNodePath = render, - skipFlags = SKIP_HIDDEN | SKIP_CAMERA ): + skipFlags = SKIP_HIDDEN | SKIP_CAMERA): self.collideWithBitMask(bitMask) return self.pick(targetNodePath, skipFlags) diff --git a/direct/src/distributed/ClientRepository.py b/direct/src/distributed/ClientRepository.py index 23412b7a76..efd3bff52e 100644 --- a/direct/src/distributed/ClientRepository.py +++ b/direct/src/distributed/ClientRepository.py @@ -505,7 +505,7 @@ class ClientRepository(ConnectionRepository): # This method is only used in conjunction with the CMU LAN # server. - assert(self.DOIDnext < self.DOIDlast); + assert self.DOIDnext < self.DOIDlast zone = di.getUint32() for obj in self.doId2do.values(): if obj.zone == zone: @@ -672,16 +672,16 @@ class ClientRepository(ConnectionRepository): """ This Will Move The avatar and set an interest to that location .. """ - parentId = parentIdin; + parentId = parentIdin if parentId is None: - parentId = base.localAvatar.defaultShard; + parentId = base.localAvatar.defaultShard - MyAvID = base.localAvatar.doId; + MyAvID = base.localAvatar.doId # move thwe avatar.. - self.sendSetLocation(MyAvID,parentId,zoneId); + self.sendSetLocation(MyAvID,parentId,zoneId) # move the interest.. - InterestZones = zoneId; + InterestZones = zoneId if visibleZoneList is not None: InterestZones = visibleZoneList @@ -691,8 +691,8 @@ class ClientRepository(ConnectionRepository): self.alterInterest(self.old_setzone_interest_handle,parentId, InterestZones, "OldSetZone Imulator", event) def sendEmulateSetZoneOff(self): - MyAvID = base.localAvatar.doId; - self.sendSetLocation(MyAvID,0,0); + MyAvID = base.localAvatar.doId + self.sendSetLocation(MyAvID,0,0) if self.old_setzone_interest_handle is not None: self.removeInterest(self.old_setzone_interest_handle) self.old_setzone_interest_handle = None diff --git a/direct/src/distributed/ConnectionRepository.py b/direct/src/distributed/ConnectionRepository.py index 30c20e0481..fa7bd2bdd8 100644 --- a/direct/src/distributed/ConnectionRepository.py +++ b/direct/src/distributed/ConnectionRepository.py @@ -231,7 +231,7 @@ class ConnectionRepository( if hasProxy: self.notify.info("Connecting to gameserver via proxy list: %s" % (proxies)) else: - self.notify.info("Connecting to gameserver directly (no proxy)."); + self.notify.info("Connecting to gameserver directly (no proxy).") if self.connectMethod == 'http': self.connectHttp = 1 diff --git a/direct/src/distributed/DistributedObjectAI.py b/direct/src/distributed/DistributedObjectAI.py index 5d9a66aa6e..242d85fa37 100644 --- a/direct/src/distributed/DistributedObjectAI.py +++ b/direct/src/distributed/DistributedObjectAI.py @@ -283,7 +283,7 @@ class DistributedObjectAI(DirectObject): if wantOtpServer: def GetPuppetConnectionChannel(self, doId): - return doId + (1L << 32); + return doId + (1L << 32) def GetAccountIDFromChannelCode(self, channel): return channel >> 32 diff --git a/direct/src/distributed/DoCollectionManager.py b/direct/src/distributed/DoCollectionManager.py index 984c8a26b1..9b45480683 100755 --- a/direct/src/distributed/DoCollectionManager.py +++ b/direct/src/distributed/DoCollectionManager.py @@ -82,7 +82,7 @@ class DoCollectionManager: Counts the number of objects of the given type in the repository (for testing purposes) """ - count = 0; + count = 0 for dobj in self.doId2do.values(): if isinstance(dobj, classType): count += 1 @@ -293,7 +293,7 @@ class DoCollectionManager: # NON OTP def changeDOZoneInTables(self, do, newZoneId, oldZoneId): - ##print "changeDOZoneInTables:%s, dclass:%s, newZoneId:%s OldZoneId:%s"%(do.doId, do.dclass.getName(), newZoneId,oldZoneId); + ##print "changeDOZoneInTables:%s, dclass:%s, newZoneId:%s OldZoneId:%s"%(do.doId, do.dclass.getName(), newZoneId,oldZoneId) assert self.notify.debugStateCall(self) assert oldZoneId in self.zoneId2doIds diff --git a/direct/src/distributed/DoInterestManager.py b/direct/src/distributed/DoInterestManager.py index 3815d2eb09..3f79391fa6 100755 --- a/direct/src/distributed/DoInterestManager.py +++ b/direct/src/distributed/DoInterestManager.py @@ -22,8 +22,8 @@ class DoInterestManager(DirectObject.DirectObject): if __debug__: notify = DirectNotifyGlobal.directNotify.newCategory("DoInterestManager") - _interestIdAssign = 1; - _interestIdScopes = 100; + _interestIdAssign = 1 + _interestIdScopes = 100 _interests = {} if __debug__: _debug_currentInterests = [] @@ -85,11 +85,11 @@ class DoInterestManager(DirectObject.DirectObject): if event is not None: DoInterestManager._interestIdScopes += 1 - DoInterestManager._interests[contextId][1] = DoInterestManager._interestIdScopes; + DoInterestManager._interests[contextId][1] = DoInterestManager._interestIdScopes else: - DoInterestManager._interests[contextId][1] = 0; + DoInterestManager._interests[contextId][1] = 0 - DoInterestManager._interests[contextId][2] = event; + DoInterestManager._interests[contextId][2] = event self._sendAddInterest(contextId,DoInterestManager._interests[contextId][1], parentId, zoneIdList) answer = 1 assert self.printInterestsIfDebug() @@ -106,7 +106,7 @@ class DoInterestManager(DirectObject.DirectObject): assert self.notify.debugCall() answer = 0 if DoInterestManager._interests.has_key(contextId): - answer = DoInterestManager._interests[contextId][1]; + answer = DoInterestManager._interests[contextId][1] else: self.notify.warning("GetInterestScopeID: contextId not found: %s" % (contextId)) return answer @@ -119,7 +119,7 @@ class DoInterestManager(DirectObject.DirectObject): assert self.notify.debugCall() answer = None if DoInterestManager._interests.has_key(contextId): - answer = DoInterestManager._interests[contextId][2]; + answer = DoInterestManager._interests[contextId][2] else: self.notify.warning("GetInterestScopeEvent: contextId not found: %s" % (contextId)) return answer diff --git a/direct/src/ffi/FFIExternalObject.py b/direct/src/ffi/FFIExternalObject.py index e93fde9223..81c56ef205 100644 --- a/direct/src/ffi/FFIExternalObject.py +++ b/direct/src/ffi/FFIExternalObject.py @@ -37,7 +37,7 @@ def funcToMethod(func,clas,method_name=None): clas.__dict__[func.__name__]=func -def FFIInstance(classdef, this = 0, userManagesMemory = 0 ): +def FFIInstance(classdef, this = 0, userManagesMemory = 0): answer = instance(classdef) answer.this = this answer.userManagesMemory = userManagesMemory diff --git a/direct/src/ffi/FFIInterrogateDatabase.py b/direct/src/ffi/FFIInterrogateDatabase.py index d420e17108..b1cbc73faf 100644 --- a/direct/src/ffi/FFIInterrogateDatabase.py +++ b/direct/src/ffi/FFIInterrogateDatabase.py @@ -773,7 +773,7 @@ class FFIInterrogateDatabase: pandaSqueezeTool.squeeze(squeezedName, unsqueezedName, files, outputDir) - if( deleteSource ): + if deleteSource: # Remove the now-squeezed source files. for file in files: os.remove(file) diff --git a/direct/src/ffi/FFIOverload.py b/direct/src/ffi/FFIOverload.py index 867097c466..886c448393 100644 --- a/direct/src/ffi/FFIOverload.py +++ b/direct/src/ffi/FFIOverload.py @@ -246,7 +246,7 @@ class FFIMethodArgumentTreeCollection: (not isinstance(self.methodSpecList[0], FFISpecs.GlobalFunctionSpecification))): self.outputOverloadedStaticFooter(file, nesting) else: - if self.classTypeDesc : + if self.classTypeDesc: indent(file, nesting, "FFIExternalObject.funcToMethod("+methodName+','+ self.classTypeDesc.foreignTypeName+ ",'"+methodName+"')\n") indent(file, nesting, 'del '+methodName+'\n') indent(file, nesting, ' \n') diff --git a/direct/src/ffi/FFITypes.py b/direct/src/ffi/FFITypes.py index dacb19837d..b8ee865338 100644 --- a/direct/src/ffi/FFITypes.py +++ b/direct/src/ffi/FFITypes.py @@ -562,7 +562,7 @@ class ClassTypeDescriptor(BaseTypeDescriptor): ########################## ## Extension methods moved up locally - if extensionsDir : + if extensionsDir: self.copyExtensions(extensionsDir, file, 0) ########################## @@ -650,7 +650,7 @@ class ClassTypeDescriptor(BaseTypeDescriptor): # If you have no destructor, inherit one ########################## ## Extension methods moved up locally - if extensionsDir : + if extensionsDir: self.copyExtensions(extensionsDir, file, 0) @@ -978,7 +978,7 @@ class ClassTypeDescriptor(BaseTypeDescriptor): #indent(file, nesting, 'returnObject = ') #file.write('FFIExternalObject.FFIInstance('+ typeName + ',returnValue,'+str(userManagesMemory)+')\n') - #indent(file,nesting, 'returnObject.this = 0\n'); + #indent(file,nesting, 'returnObject.this = 0\n') #indent(file,nesting, 'returnObject.userManagesMemory = 0\n'); ## diff --git a/direct/src/ffi/jGenPyCode.py b/direct/src/ffi/jGenPyCode.py index 04b04b45b6..6982e9cb49 100755 --- a/direct/src/ffi/jGenPyCode.py +++ b/direct/src/ffi/jGenPyCode.py @@ -14,7 +14,7 @@ # ############################################################## -import sys,os; +import sys,os ############################################################## # diff --git a/direct/src/gui/DirectEntry.py b/direct/src/gui/DirectEntry.py index 04345ab5e4..da32c95e39 100644 --- a/direct/src/gui/DirectEntry.py +++ b/direct/src/gui/DirectEntry.py @@ -169,8 +169,8 @@ class DirectEntry(DirectFrame): lineHeight = self.onscreenText.textNode.getLineHeight() numLines = self['numLines'] width = self['width'] - self.ll.set(0.0, 0.0, -0.3 * lineHeight - (lineHeight * (numLines - 1))); - self.ur.set(width, 0.0, lineHeight * 1.3); + self.ll.set(0.0, 0.0, -0.3 * lineHeight - (lineHeight * (numLines - 1))) + self.ur.set(width, 0.0, lineHeight * 1.3) # Scale bounds to give a pad around graphics. We also want to # scale around the border width. diff --git a/direct/src/leveleditor/LevelEditor.py b/direct/src/leveleditor/LevelEditor.py index 4be131fdc5..db7633a669 100644 --- a/direct/src/leveleditor/LevelEditor.py +++ b/direct/src/leveleditor/LevelEditor.py @@ -397,7 +397,7 @@ def DNASetBaselineString(baseline, text): # replace each text item and then add or remove at the end. # This should allow inlined graphics to stay in place. # end of todo. - DNARemoveAllChildrenOfClass(baseline, DNA_SIGN_TEXT); + DNARemoveAllChildrenOfClass(baseline, DNA_SIGN_TEXT) # We can't just blindly iterate through the text, because it might # be utf-8 encoded, meaning some characters are represented using @@ -1528,7 +1528,7 @@ class LevelEditor(NodePath, PandaObject): newDNALandmarkBuilding.setPos(VBase3(0)) newDNALandmarkBuilding.setHpr(VBase3(0)) # Headquarters do not have doors - if (specialType not in [ 'hq', 'kartshop' ] ): + if specialType not in [ 'hq', 'kartshop' ]: newDNADoor = self.createDoor('landmark_door') newDNALandmarkBuilding.add(newDNADoor) # Now place new landmark building in the world @@ -1601,10 +1601,10 @@ class LevelEditor(NodePath, PandaObject): baseline = DNASignBaseline('baseline') baseline.setCode("humanist") baseline.setColor(VBase4(0.0, 0.0, 0.0, 1.0)) - #baseline.setKern(1.0); - #baseline.setWiggle(30.0); - #baseline.setStumble(1.0); - #baseline.setStomp(10.0); + #baseline.setKern(1.0) + #baseline.setWiggle(30.0) + #baseline.setStumble(1.0) + #baseline.setStomp(10.0) #baseline.setWidth(16.0) #baseline.setHeight(16.0) baseline.setScale(VBase3(0.7, 1.0, 0.7)) @@ -5568,7 +5568,7 @@ class LevelEditorPanel(Pmw.MegaToplevel): flags=settings['flags'] if flags != None: self.bigFirstLetterIntVar.set('b' in flags) - self.setBigFirstLetter(); + self.setBigFirstLetter() self.allCapsIntVar.set('c' in flags) self.setAllCaps() @@ -5606,7 +5606,7 @@ class LevelEditorPanel(Pmw.MegaToplevel): def setBaselineString(self, val): baseline=self.currentBaselineDNA if baseline: - DNASetBaselineString(baseline, val); + DNASetBaselineString(baseline, val) self.baselineMenu.delete(self.currentBaselineIndex) self.baselineMenu.insert(self.currentBaselineIndex, val) self.baselineMenu.selectitem(self.currentBaselineIndex) diff --git a/direct/src/particles/Particles.py b/direct/src/particles/Particles.py index be8cc5e605..0c55f20785 100644 --- a/direct/src/particles/Particles.py +++ b/direct/src/particles/Particles.py @@ -351,7 +351,7 @@ class Particles(ParticleSystem): segIdList = eval('['+cim.getSegmentIdList().replace(' ',', ')+']') for sid in segIdList: seg = cim.getSegment(sid) - if( seg.isEnabled() ): + if seg.isEnabled(): t_b = seg.getTimeBegin() t_e = seg.getTimeEnd() fun = seg.getFunction() @@ -440,7 +440,7 @@ class Particles(ParticleSystem): segIdList = eval('['+cim.getSegmentIdList().replace(' ',', ')+']') for sid in segIdList: seg = cim.getSegment(sid) - if( seg.isEnabled() ): + if seg.isEnabled(): t_b = seg.getTimeBegin() t_e = seg.getTimeEnd() fun = seg.getFunction() diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 33c85fc078..2deb691ec7 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -599,7 +599,7 @@ class ShowBase(DirectObject.DirectObject): # Temporary try..except for old pandas. try: - self.render.node().setAttrib(RescaleNormalAttrib.makeDefault()); + self.render.node().setAttrib(RescaleNormalAttrib.makeDefault()) except: pass @@ -1304,8 +1304,8 @@ class ShowBase(DirectObject.DirectObject): self.wireframeOn() def wireframeOn(self): - self.render.setRenderModeWireframe(100); - self.render.setTwoSided(1); + self.render.setRenderModeWireframe(100) + self.render.setTwoSided(1) self.wireframeEnabled = 1 def wireframeOff(self): diff --git a/direct/src/tkwidgets/Valuator.py b/direct/src/tkwidgets/Valuator.py index 640caa89a2..f98bfe2d7a 100644 --- a/direct/src/tkwidgets/Valuator.py +++ b/direct/src/tkwidgets/Valuator.py @@ -109,42 +109,42 @@ class Valuator(Pmw.MegaWidget): # A Dictionary of dictionaries for the popup property dialog self.propertyDict = { - 'state' : + 'state': {'widget': self, 'type': 'string', 'help': 'Enter state: normal or disabled.' }, - 'text' : + 'text': {'widget': self, 'type': 'string', 'help': 'Enter label text.' }, - 'min' : + 'min': { 'widget' : self, 'type': 'real', 'fNone': 1, 'help': 'Minimum allowable value. Enter None for no minimum.'}, - 'max' : + 'max': { 'widget': self, 'type': 'real', 'fNone': 1, 'help': 'Maximum allowable value. Enter None for no maximum.'}, - 'numDigits' : + 'numDigits': {'widget': self, 'type': 'integer', 'help': 'Number of digits after decimal point.' }, - 'resolution' : + 'resolution': {'widget': self, 'type': 'real', 'fNone': 1, 'help':'Widget resolution. Enter None for no resolution .' }, - 'resetValue' : + 'resetValue': { 'widget': self, 'type': 'real', 'help': 'Enter value to set widget to on reset.'} diff --git a/doc/SceneEditor/dataHolder.py b/doc/SceneEditor/dataHolder.py index 12578b34aa..6e39a91ed9 100644 --- a/doc/SceneEditor/dataHolder.py +++ b/doc/SceneEditor/dataHolder.py @@ -629,7 +629,7 @@ class dataHolder: if self.curveDict.has_key(name): index = None for curve in self.curveDict[name]: - if curve.getCurve(0).getName() == curveName : + if curve.getCurve(0).getName() == curveName: index = self.curveDict[name].index(curve) break del self.curveDict[name][index] diff --git a/doc/SceneEditor/quad.py b/doc/SceneEditor/quad.py index e5c9f19d76..d35a7453ef 100644 --- a/doc/SceneEditor/quad.py +++ b/doc/SceneEditor/quad.py @@ -327,8 +327,8 @@ class QuadView(DirectObject.DirectObject): def ToggleWire(self): if (self.CurrentQuad==1): # Front View if(self.FrontWire): # Wireframe is On so turn it off - self.FrontScene.setRenderModeWireframe(100); - self.FrontScene.setTwoSided(1); + self.FrontScene.setRenderModeWireframe(100) + self.FrontScene.setTwoSided(1) self.FrontScene.setTextureOff(100) self.FrontWire=0 else: @@ -339,8 +339,8 @@ class QuadView(DirectObject.DirectObject): self.FrontWire=1 elif (self.CurrentQuad==2): # Front View if(self.TopWire): # Wireframe is On so turn it off - self.TopScene.setRenderModeWireframe(100); - self.TopScene.setTwoSided(1); + self.TopScene.setRenderModeWireframe(100) + self.TopScene.setTwoSided(1) self.TopScene.setTextureOff(100) self.TopWire=0 else: @@ -351,8 +351,8 @@ class QuadView(DirectObject.DirectObject): self.TopWire=1 elif (self.CurrentQuad==3): # Front View if(self.LeftWire): # Wireframe is On so turn it off - self.LeftScene.setRenderModeWireframe(100); - self.LeftScene.setTwoSided(1); + self.LeftScene.setRenderModeWireframe(100) + self.LeftScene.setTwoSided(1) self.LeftScene.setTextureOff(100) self.LeftWire=0 else: @@ -363,8 +363,8 @@ class QuadView(DirectObject.DirectObject): self.LeftWire=1 elif (self.CurrentQuad==4): # Front View if(self.PerspectiveWire): # Wireframe is On so turn it off - self.PerspectiveScene.setRenderModeWireframe(100); - self.PerspectiveScene.setTwoSided(1); + self.PerspectiveScene.setRenderModeWireframe(100) + self.PerspectiveScene.setTwoSided(1) self.PerspectiveScene.setTextureOff(100) self.PerspectiveWire=0 else: @@ -379,28 +379,28 @@ class QuadView(DirectObject.DirectObject): if (self.CurrentQuad==1): # Front View if(self.FrontTexture): # Texture is on so turn it off self.FrontScene.setTextureOff(100) - self.FrontTexture=0; + self.FrontTexture=0 else: self.FrontScene.clearTexture() self.FrontTexture=1 elif (self.CurrentQuad==2): # Top View if(self.TopTexture): # Texture is on so turn it off self.TopScene.setTextureOff(100) - self.TopTexture=0; + self.TopTexture=0 else: self.TopScene.clearTexture() self.TopTexture=1 elif (self.CurrentQuad==3): # Left View if(self.LeftTexture): # Texture is on so turn it off self.LeftScene.setTextureOff(100) - self.LeftTexture=0; + self.LeftTexture=0 else: self.LeftScene.clearTexture() self.LeftTexture=1 elif (self.CurrentQuad==4): # Perspective View if(self.PerspectiveTexture): # Texture is on so turn it off self.PerspectiveScene.setTextureOff(100) - self.PerspectiveTexture=0; + self.PerspectiveTexture=0 else: self.PerspectiveScene.clearTexture() self.PerspectiveTexture=1 diff --git a/doc/SceneEditor/seFileSaver.py b/doc/SceneEditor/seFileSaver.py index ad71035382..6fec28658e 100644 --- a/doc/SceneEditor/seFileSaver.py +++ b/doc/SceneEditor/seFileSaver.py @@ -170,7 +170,7 @@ class FileSaver: if(not oldFilename.isRegularFile()): if(texfilename.resolveFilename(getTexturePath(),"")): oldFilename=texfilename - oldtexpath=oldFilename.toOsSpecific(); + oldtexpath=oldFilename.toOsSpecific() newtexpath=dirname + "/" + texfilename.getBasename() newtexpathF=Filename(newtexpath) @@ -299,7 +299,7 @@ class FileSaver: if(not oldFilename.isRegularFile()): if(texfilename.resolveFilename(getTexturePath(),"")): oldFilename=texfilename - oldtexpath=oldFilename.toOsSpecific(); + oldtexpath=oldFilename.toOsSpecific() newtexpath=dirname + "/" + texfilename.getBasename() diff --git a/doc/SceneEditor/seMopathRecorder.py b/doc/SceneEditor/seMopathRecorder.py index dd7ecacf40..1c549cf6ea 100644 --- a/doc/SceneEditor/seMopathRecorder.py +++ b/doc/SceneEditor/seMopathRecorder.py @@ -1996,7 +1996,7 @@ class MopathRecorder(AppShell, PandaObject): ''' print curveList self.ignore('curveListFor'+self.name) - if curveList != None : + if curveList != None: for collection in curveList: self.curveCollection = collection self.extractPointSetFromCurveCollection(curveName=self.curveCollection.getCurve(0).getName()) diff --git a/doc/makepanda/makepanda.py b/doc/makepanda/makepanda.py index d8b11db14f..9f6ddea064 100755 --- a/doc/makepanda/makepanda.py +++ b/doc/makepanda/makepanda.py @@ -641,7 +641,7 @@ if sys.platform == "win32" and DIRECTXSDK is None: MAYAVERSIONS=[("MAYA5", "SOFTWARE\\Alias|Wavefront\\Maya\\5.0\\Setup\\InstallPath"), ("MAYA6", "SOFTWARE\\Alias|Wavefront\\Maya\\6.0\\Setup\\InstallPath"), ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath") -]; +] for (ver,key) in MAYAVERSIONS: if (OMIT.count(ver)==0) and (MAYASDK.has_key(ver)==0):