Macro Align Camera to Working Plane/en: Difference between revisions

From FreeCAD Documentation
(Updating to match new version of source page)
(Updating to match new version of source page)
Line 1: Line 1:
<languages/>
<languages/>


{{Macro
{{Macro|Icon=Text-x-python|Name=Macro Align Camera to Working Plane|Description=This macro aligns the camera to the current [[Draft SelectPlane|Draft Working Plane]] |Author=yorik|Version=0.1|Date=2017-03-16}}
|Name=Macro Align Camera to Working Plane
|Description=This macro aligns the camera to the current [[Draft SelectPlane|Draft Working Plane]]
|Author=yorik
|Version=0.1
|Date=2017-03-16
}}


==Description==
==Description==

Revision as of 15:31, 11 December 2018

Macro Align Camera to Working Plane

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

Macro version: 0.1
Last modified: 2017-03-16
Author: yorik
Author
yorik
Download
None
Links
Macro Version
0.1
Date last modified
2017-03-16
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)