Added grid snapping support for drag/drop object creation
This commit is contained in:
parent
06167a0ec7
commit
36956aed7b
|
|
@ -79,6 +79,11 @@ class PandaTextDropTarget(wx.TextDropTarget):
|
|||
# create a temp nodePath to get the position
|
||||
np = NodePath('temp')
|
||||
np.setPos(self.view.camera, hitPt)
|
||||
|
||||
if base.direct.manipulationControl.fGridSnap:
|
||||
snappedPos = self.view.grid.computeSnapPoint(np.getPos())
|
||||
np.setPos(snappedPos)
|
||||
|
||||
# update temp nodePath's HPR and scale with newobj's
|
||||
np.setHpr(newobj.getHpr())
|
||||
np.setScale(newobj.getScale())
|
||||
|
|
|
|||
Loading…
Reference in New Issue