Draft: Small fix for malfuncioning pivy

This commit is contained in:
Yorik van Havre 2013-06-14 12:04:59 -03:00
parent 6a88bcd870
commit f0d9cdbc12

View File

@ -242,9 +242,12 @@ class DraftTool:
self.ui.sourceCmd = self
self.ui.setTitle(name)
self.ui.show()
rot = self.view.getCameraNode().getField("orientation").getValue()
upv = Vector(rot.multVec(coin.SbVec3f(0,1,0)).getValue())
plane.setup(DraftVecUtils.neg(self.view.getViewDirection()), Vector(0,0,0), upv)
try:
rot = self.view.getCameraNode().getField("orientation").getValue()
upv = Vector(rot.multVec(coin.SbVec3f(0,1,0)).getValue())
plane.setup(DraftVecUtils.neg(self.view.getViewDirection()), Vector(0,0,0), upv)
except:
pass
self.node = []
self.pos = []
self.constrain = None