Macro Align Camera to Working Plane

From FreeCAD Documentation
Revision as of 01:19, 16 March 2017 by Yorik (talk | contribs) (Marked this version for translation)

File:Text-x-python Macro Align Camera to Working Plane

Description
This macro aligns the camera to the current Draft Working Plane

Macro version: 0.1
Author: yorik
Author
yorik
Download
None
Links
Macro Version
0.1
Date last modified
None
FreeCAD Version(s)
None
Default shortcut
None
See also
None

Description

This macro aligns the camera to the current Draft Working Plane

How to use

Script

Macro Align Camera to Working Plane.FCMacro

import FreeCAD,FreeCADGui
c = FreeCADGui.ActiveDocument.ActiveView.getCameraNode()
r = FreeCAD.DraftWorkingPlane.getRotation().Rotation.Q
c.orientation.setValue(r)