set index angle from clicked face

This commit is contained in:
Stewart Allen 2022-10-29 18:43:22 -04:00
commit 7017bb5fb7
3 changed files with 14 additions and 6 deletions

View file

@ -1317,6 +1317,11 @@ CAM.init = function(kiri, api) {
api.event.emit('tool.mesh.face-up');
}
api.event.on('tool.mesh.face-normal', normal => {
poppedRec.degrees = (Math.atan2(normal.y, normal.z) * (180 / Math.PI)).round(2);
poppedRec.absolute = true;
});
createPopOp('index', {
degrees: 'camIndexAxis',
absolute: 'camIndexAbs'