Macro Align Camera to Working Plane: Difference between revisions

From FreeCAD Documentation
m (date)
m (date)
Line 2: Line 2:


<!--T:1-->
<!--T:1-->
{{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=00/00/0000}}
{{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=16/03/2017}}


==Description== <!--T:2-->
==Description== <!--T:2-->

Revision as of 11:57, 27 September 2017

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