LevelEditor

Inheritance:

Methods of LevelEditor:

__getitem__
def __getitem__(self, attribute)

Return top level entry in attribute dictionary

__init__
def __init__(self, hoods=hoods)

Undocumented function.

addFlatBuilding
def addFlatBuilding(self, buildingType)

Undocumented function.

addGroup
def addGroup(self, nodePath)

Add a new DNA Node Group to the specified Node Path

addLandmark
def addLandmark(self, landmarkType, specialType)

Undocumented function.

addProp
def addProp(self, propType)

Undocumented function.

addReplicationHooks
def addReplicationHooks(self, dnaNode)

Undocumented function.

addStreet
def addStreet(self, streetType)

Undocumented function.

addStreetUnits
def addStreetUnits(self, streetLength)

Undocumented function.

addToLandmarkBlock
def addToLandmarkBlock(self)

Undocumented function.

addVisGroup
def addVisGroup(self, nodePath)

Add a new DNA Group to the specified Node Path

adjustPropChildren
def adjustPropChildren(self, nodePath, maxPropOffset=-4)

Undocumented function.

appendColorToColorPaletteFile
def appendColorToColorPaletteFile(self, color)

Undocumented function.

autoPositionCleanup
def autoPositionCleanup(self, state)

Undocumented function.

autoPositionGrid
def autoPositionGrid(self, fLerp=1)

Undocumented function.

avatarAnimate
def avatarAnimate(self, task=None)

Undocumented function.

calcLongStreetLength
def calcLongStreetLength(self, bldgs)

Undocumented function.

clearPageUpDown
def clearPageUpDown(self)

Undocumented function.

clearPathHighlights
def clearPathHighlights(self)

Undocumented function.

clearZoneColors
def clearZoneColors(self)

Undocumented function.

clearZoneLabels
def clearZoneLabels(self)

Undocumented function.

collisionsOff
def collisionsOff(self)

Undocumented function.

collisionsOn
def collisionsOn(self)

Undocumented function.

colorZones
def colorZones(self)

Undocumented function.

computeWallNum
def computeWallNum(self, aDNAFlatBuilding, hitPt)

Given a hitPt, return wall number if cursor is over building Return -1 if cursor is outside of building

configureDriveModeCollisionData
def configureDriveModeCollisionData(self)

Set up the local avatar for collisions

consolidateStreetBuildings
def consolidateStreetBuildings(self)

Undocumented function.

convertToLandmarkBlocks
def convertToLandmarkBlocks(self, block, dnaRoot)

Find all the buildings without landmark blocks and assign them one.

createBattleCells
def createBattleCells(self)

Undocumented function.

createCornice
def createCornice(self)

Undocumented function.

createDoor
def createDoor(self, type)

Undocumented function.

createInsertionMarker
def createInsertionMarker(self)

Undocumented function.

createLevelMaps
def createLevelMaps(self)

Load up the various neighborhood maps

createMap
def createMap(self, neighborhood)

Undocumented function.

createNewGroup
def createNewGroup(self, type='dna')

Undocumented function.

createSign
def createSign(self)

Undocumented function.

createSuitPaths
def createSuitPaths(self)

Undocumented function.

createToplevel
def createToplevel(self, dnaNode, nodePath=None)

Undocumented function.

createWindows
def createWindows(self)

Undocumented function.

cvsAdd
def cvsAdd(self, filename)

Undocumented function.

cvsCommitAll
def cvsCommitAll(self)

Undocumented function.

cvsUpdate
def cvsUpdate(self, filename)

Undocumented function.

cvsUpdateAll
def cvsUpdateAll(self)

Undocumented function.

deleteToplevel
def deleteToplevel(self)

Undocumented function.

deselectedNodePathHook
def deselectedNodePathHook(self, nodePath)

Undocumented function.

destroy
def destroy(self)

Disable level editor and destroy node path

disable
def disable(self)

Disable level editing and hide level

disableMouse
def disableMouse(self)

Disable Pie Menu interaction

drawBattleCell
def drawBattleCell(self, cell, parent)

Undocumented function.

drawSuitEdge
def drawSuitEdge(self, edge, parent)

Undocumented function.

drawSuitPoint
def drawSuitPoint(self, suitPoint, pos, type, parent)

Undocumented function.

duplicateFlatBuilding
def duplicateFlatBuilding(self, oldDNANode)

Undocumented function.

editDNAVisGroups
def editDNAVisGroups(self)

Undocumented function.

enable
def enable(self)

Enable level editing and show level

enableMouse
def enableMouse(self)

Enable Pie Menu interaction (and disable player camera control)

enterZone
def enterZone(self, newZone)

Undocumented function.

extractGroupName
def extractGroupName(self, groupFullName)

Undocumented function.

findBldgEndPoint
def findBldgEndPoint(self, bldgWidth, curve, currT, currPoint, startT=None, endT=None, tolerance=0.1, rd=0)

Undocumented function.

findDNANode
def findDNANode(self, nodePath)

Find node path's DNA Object in DNAStorage (if any)

findDNAParent
def findDNAParent(self, nodePath)

Walk up a node path's ancestry looking for its DNA Root

findDNARoot
def findDNARoot(self, nodePath)

Walk up a node path's ancestry looking for its DNA Root

findHighestLandmarkBlock
def findHighestLandmarkBlock(self, dnaRoot, npRoot)

Undocumented function.

findParentVisGroup
def findParentVisGroup(self, nodePath)

Find the containing vis group

findPointOrCell
def findPointOrCell(self, nodePath)

Walk up a node path's ancestry to see if its a suit point marker or a battle cell marker

findSuitEdge
def findSuitEdge(self, nodePath)

Walk up a node path's ancestry looking for a suit edge

getAttribute
def getAttribute(self, attribute)

Return specified attribute for current neighborhood

getBattleCellFromNodePath
def getBattleCellFromNodePath(self, nodePath)

Given a node path, attempt to find the battle cell, nodePath pair in the cellDict. If it is there, return the cell. If we cannot find it, return None. TODO: a reverse lookup cellDict would speed this up quite a bit

getBldg
def getBldg(self, bldgIndex, bldgs, forceDuplicate=False)

Undocumented function.

getBlockFromName
def getBlockFromName(self, name)

Undocumented function.

getBuildingWidth
def getBuildingWidth(self, bldg)

Undocumented function.

getCurrent
def getCurrent(self, attribute)

Return neighborhood's current selection for specified attribute

getDict
def getDict(self, attribute)

Return neighborhood's Dictionary for specified attribute

getDNAData
def getDNAData(self)

Undocumented function.

getDNAParent
def getDNAParent(self)

Undocumented function.

getDNATarget
def getDNATarget(self)

Undocumented function.

getDNAToplevel
def getDNAToplevel(self)

Undocumented function.

getDNAVisGroups
def getDNAVisGroups(self, nodePath)

Find the highest level vis groups in the scene graph

getEditMode
def getEditMode(self)

Undocumented function.

getFlatBuildingMode
def getFlatBuildingMode(self, dnaObject, modifiers)

Undocumented function.

getGridIntersectionPoint
def getGridIntersectionPoint(self)

Return point of intersection between ground plane and line from cam through mouse. Return false, if nothing selected

getGridSnapIntersectionPoint
def getGridSnapIntersectionPoint(self)

Return point of intersection between ground plane and line from cam through mouse. Return false, if nothing selected. Snap to grid.

getGroupNum
def getGroupNum(self)

Undocumented function.

getLandmarkBuildingMode
def getLandmarkBuildingMode(self, dnaObject, modifiers)

Undocumented function.

getLastAngle
def getLastAngle(self)

Undocumented function.

getList
def getList(self, attribute)

Return neighborhood's List for specified attribute

getMenu
def getMenu(self, attribute)

Return neighborhood's Pie Menu object for specified attribute

getNextLandmarkBlock
def getNextLandmarkBlock(self)

Undocumented function.

getNextSnapPoint
def getNextSnapPoint(self)

Pull next pos hpr deltas off of snap list then rotate list

getNPParent
def getNPParent(self)

Undocumented function.

getNPToplevel
def getNPToplevel(self)

Undocumented function.

getRandomDictionaryEntry
def getRandomDictionaryEntry(self, dict)

Undocumented function.

getRandomHeightList
def getRandomHeightList(self, buildingHeight)

Undocumented function.

getRandomWallWidth
def getRandomWallWidth(self)

Undocumented function.

getRandomWindowCount
def getRandomWindowCount(self)

Undocumented function.

getSnapPoint
def getSnapPoint(self, code)

Undocumented function.

getSuitPointFromNodePath
def getSuitPointFromNodePath(self, nodePath)

Given a node path, attempt to find the point, nodePath pair in the pointDict. If it is there, return the point. If we cannot find it, return None. TODO: a reverse lookup pointDict would speed this up quite a bit

getWall
def getWall(self, dnaFlatBuilding, wallNum)

Undocumented function.

getWallIntersectionPoint
def getWallIntersectionPoint(self, selectedNode)

Return point of intersection between building's wall and line from cam through mouse.

getWindowCount
def getWindowCount(self, dnaWall)

Undocumented function.

hasAttribute
def hasAttribute(self, attribute)

Return specified attribute for current neighborhood

hideAllVisibles
def hideAllVisibles(self)

Undocumented function.

hideBattleCells
def hideBattleCells(self)

Undocumented function.

hideSuitPaths
def hideSuitPaths(self)

Undocumented function.

highlightConnected
def highlightConnected(self, nodePath=None, fReversePath=0)

Undocumented function.

highlightConnectedRec
def highlightConnectedRec(self, suitPoint, fReversePath)

Undocumented function.

initDNANode
def initDNANode(self, dnaNode)

This method adds a new DNA object to the scene and adds hooks that allow duplicate copies of this DNA node to be added using the space bar. For DNAFlatBuildings, a new copy with random style is generated by hitting the insert key.

initNodePath
def initNodePath(self, dnaNode, hotKey=None)

Update DNA to reflect latest style choices and then generate new node path and add it to the scene graph

initVisibilityData
def initVisibilityData(self)

Undocumented function.

insertionMarkerTask
def insertionMarkerTask(self, state)

Undocumented function.

jumpToInsertionPoint
def jumpToInsertionPoint(self)

Move selected object to insertion point

keyboardRotateSelected
def keyboardRotateSelected(self, arrowDirection)

Rotate selected objects using arrow keys

keyboardTranslateSelected
def keyboardTranslateSelected(self, arrowDirection)

Undocumented function.

keyboardXformSelected
def keyboardXformSelected(self, arrowDirection, mode)

Undocumented function.

labelZones
def labelZones(self)

Undocumented function.

landmarkBlockRemove
def landmarkBlockRemove(self, dna, nodePath)

Undocumented function.

lerpCameraP
def lerpCameraP(self, p, time)

lerp the camera P over time (used by the battle)

levelHandleMouse3
def levelHandleMouse3(self, modifiers)

Undocumented function.

levelHandleMouse3Up
def levelHandleMouse3Up(self)

Undocumented function.

loadDNAFromFile
def loadDNAFromFile(self, filename)

Undocumented function.

loadSpecifiedDNAFile
def loadSpecifiedDNAFile(self)

Undocumented function.

loadStreetCurve
def loadStreetCurve(self)

Undocumented function.

makeLongStreet
def makeLongStreet(self)

Undocumented function.

makeNewBuildingGroup
def makeNewBuildingGroup(self, sequenceNum, side, curveName)

Undocumented function.

makeSideStreets
def makeSideStreets(self, curves)

Each side in a sidestreet MUST be in 1 building group, otherwise the 2nd half of a building group could be very far away. This would cause the stashing and unstashing code to go off kilter.

makeStreetAlongCurve
def makeStreetAlongCurve(self)

Undocumented function.

outputDNA
def outputDNA(self, filename)

Undocumented function.

outputDNADefaultFile
def outputDNADefaultFile(self)

Undocumented function.

pageDown
def pageDown(self)

Undocumented function.

pageUp
def pageUp(self)

Undocumented function.

pdbBreak
def pdbBreak(self)

Undocumented function.

placeBattleCell
def placeBattleCell(self)

Undocumented function.

placeSuitPoint
def placeSuitPoint(self)

Undocumented function.

remove
def remove(self, dnaNode, nodePath)

Delete DNA and Node relation from DNA Store and remove the node path from the scene graph.

removeCornice
def removeCornice(self, cornice, parent)

Undocumented function.

removeDoor
def removeDoor(self, door, parent)

Undocumented function.

removeLandmarkDoor
def removeLandmarkDoor(self, door, parent)

Undocumented function.

removeNodePathHook
def removeNodePathHook(self, nodePath)

Undocumented function.

removeSign
def removeSign(self, sign, parent)

Undocumented function.

removeWindows
def removeWindows(self, windows, parent)

Undocumented function.

renameFloorPolys
def renameFloorPolys(self, nodeList)

Undocumented function.

reparent
def reparent(self, nodePath, oldParent, newParent)

Move node path (and its DNA) to active parent

reparentStreetBuildings
def reparentStreetBuildings(self, nodePath)

Undocumented function.

replace
def replace(self, nodePath, dnaNode)

Replace a node path with the results of a DNANode traversal

replaceSelected
def replaceSelected(self)

Undocumented function.

reset
def reset(self, fDeleteToplevel=1, fCreateToplevel=1, fUpdateExplorer=1)

Reset level and re-initialize main class variables Pass in the new top level group

resetBattleCellMarkers
def resetBattleCellMarkers(self)

Undocumented function.

resetPathMarkers
def resetPathMarkers(self)

Undocumented function.

revertLandmarkBlock
def revertLandmarkBlock(self, block)

un-block flat buildings (set them to block zero).

saveBaselineStyle
def saveBaselineStyle(self)

Undocumented function.

saveBuildingStyle
def saveBuildingStyle(self)

Undocumented function.

saveColor
def saveColor(self)

Undocumented function.

saveStyle
def saveStyle(self, filename, style)

Undocumented function.

saveToSpecifiedDNAFile
def saveToSpecifiedDNAFile(self)

Undocumented function.

saveWallStyle
def saveWallStyle(self)

Undocumented function.

selectedNodePathHook
def selectedNodePathHook(self, nodePath)

Hook called upon selection of a node path used to restrict selection to DNA Objects. Press control to select any type of DNA Object, with no control key pressed, hook selects only DNA Root objects

selectMap
def selectMap(self, neighborhood)

Undocumented function.

setActiveParent
def setActiveParent(self, nodePath=None)

Set NPParent and DNAParent to node path and its DNA

setBuildingStyle
def setBuildingStyle(self, style)

Undocumented function.

setBuildingType
def setBuildingType(self, type)

Undocumented function.

setBuildingWidth
def setBuildingWidth(self, width)

Undocumented function.

setColor
def setColor(self, nodePath, r, g, b, a)

This is used to set color of dnaNode subparts

setCurrent
def setCurrent(self, attribute, newCurrent)

Set neighborhood's current selection for specified attribute

setDNATargetCode
def setDNATargetCode(self, type, code)

Undocumented function.

setDNATargetColor
def setDNATargetColor(self, color)

Undocumented function.

setDNATargetOrientation
def setDNATargetOrientation(self, orientation)

Undocumented function.

setEditMode
def setEditMode(self, neighborhood)

Undocumented function.

setGroupNum
def setGroupNum(self, num)

Undocumented function.

setLastAngle
def setLastAngle(self, angle)

Undocumented function.

setName
def setName(self, nodePath, newName)

Set name of nodePath's DNA (if it exists)

setRandomBuildingStyle
def setRandomBuildingStyle(self, dnaNode, name='building')

Initialize a new DNA Flat building to a random building style

setWallStyle
def setWallStyle(self, style)

Undocumented function.

setWindowCount
def setWindowCount(self, count)

Undocumented function.

showAllVisibles
def showAllVisibles(self)

Undocumented function.

showBattleCells
def showBattleCells(self)

Undocumented function.

showGrid
def showGrid(self, flag)

toggle direct grid

showSuitPaths
def showSuitPaths(self)

Undocumented function.

spawnInsertionMarkerTask
def spawnInsertionMarkerTask(self)

Undocumented function.

switchToDriveMode
def switchToDriveMode(self, state)

Disable direct camera manipulation and enable player drive mode

toggleCollisions
def toggleCollisions(self)

Undocumented function.

toggleMapVis
def toggleMapVis(self, flag)

Undocumented function.

toggleShowLandmarkBlock
def toggleShowLandmarkBlock(self)

Undocumented function.

toggleVisibility
def toggleVisibility(self)

Undocumented function.

toggleZoneColors
def toggleZoneColors(self)

Undocumented function.

traversalOff
def traversalOff(self)

Undocumented function.

traversalOn
def traversalOn(self)

Undocumented function.

updateBarricadeDict
def updateBarricadeDict(self, side, barricadeOrigNum, curBldgGroupIndex)

Undocumented function.

updatePose
def updatePose(self, dnaObject, nodePath)

Update a DNA Object's pos, hpr, and scale based upon node path's current pose

updateSelectedPose
def updateSelectedPose(self, nodePathList)

Update the DNA database to reflect selected objects current positions

useDirectFly
def useDirectFly(self)

Disable player camera controls/enable direct camera control

useDriveMode
def useDriveMode(self)

Lerp down to eye level then switch to Drive mode

visibilityOff
def visibilityOff(self)

Undocumented function.

visibilityOn
def visibilityOn(self)

Undocumented function.