mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
*** empty log message ***
This commit is contained in:
parent
9b751ba6a2
commit
632b212bd6
@ -1404,12 +1404,15 @@ class LevelEditor(NodePath, PandaObject):
|
|||||||
|
|
||||||
# Reset last Code (for autoPositionGrid)
|
# Reset last Code (for autoPositionGrid)
|
||||||
if DNAClassEqual(dnaNode, DNA_STREET):
|
if DNAClassEqual(dnaNode, DNA_STREET):
|
||||||
self.snapList = OBJECT_SNAP_POINTS[dnaNode.getCode()]
|
self.snapList = self.getSnapPoint(dnaNode.getCode())
|
||||||
# Select the instance
|
# Select the instance
|
||||||
direct.select(newNodePath)
|
direct.select(newNodePath)
|
||||||
# Update grid to get ready for the next object
|
# Update grid to get ready for the next object
|
||||||
self.autoPositionGrid()
|
self.autoPositionGrid()
|
||||||
|
|
||||||
|
def getSnapPoint(self, code):
|
||||||
|
return OBJECT_SNAP_POINTS.get(code, [(Vec3(0.0,0,0), Vec3(0)), (Vec3(0), Vec3(0))])
|
||||||
|
|
||||||
def addGroup(self, nodePath):
|
def addGroup(self, nodePath):
|
||||||
""" Add a new DNA Node Group to the specified Node Path """
|
""" Add a new DNA Node Group to the specified Node Path """
|
||||||
# Set the node path as the current parent
|
# Set the node path as the current parent
|
||||||
@ -1949,7 +1952,7 @@ class LevelEditor(NodePath, PandaObject):
|
|||||||
self.toggleShowLandmarkBlock()
|
self.toggleShowLandmarkBlock()
|
||||||
# Reset last Code (for autoPositionGrid)
|
# Reset last Code (for autoPositionGrid)
|
||||||
if DNAClassEqual(dnaNode, DNA_STREET):
|
if DNAClassEqual(dnaNode, DNA_STREET):
|
||||||
self.snapList = OBJECT_SNAP_POINTS[dnaNode.getCode()]
|
self.snapList = self.getSnapPoint(dnaNode.getCode())
|
||||||
else:
|
else:
|
||||||
pointOrCell, type = self.findPointOrCell(nodePath)
|
pointOrCell, type = self.findPointOrCell(nodePath)
|
||||||
if pointOrCell and (type == 'suitPointMarker'):
|
if pointOrCell and (type == 'suitPointMarker'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user