Macro Align Camera to Working Plane: Difference between revisions
m (icon) |
Tag: Undo |
||
(7 intermediate revisions by 5 users not shown) | |||
Line 5: | Line 5: | ||
{{Macro |
{{Macro |
||
|Name=Macro Align Camera to Working Plane |
|Name=Macro Align Camera to Working Plane |
||
|Icon=Macro_Align_Camera_to_Working_Plane.png |
|||
|Description=This macro aligns the camera to the current [[Draft SelectPlane|Draft Working Plane]] |
|Description=This macro aligns the camera to the current [[Draft SelectPlane|Draft Working Plane]] |
||
|Author=yorik |
|Author=yorik |
||
Line 14: | Line 15: | ||
}} |
}} |
||
==Description== <!--T: |
==Description== <!--T:5--> |
||
<!--T:2--> |
|||
This macro aligns the camera to the current [[Draft SelectPlane|Draft Working Plane]] |
This macro aligns the camera to the current [[Draft SelectPlane|Draft Working Plane]] |
||
== |
==Usage== <!--T:6--> |
||
⚫ | |||
<!--T:3--> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
==Script== <!--T:4--> |
==Script== <!--T:4--> |
||
<!--T:7--> |
|||
ToolBar Icon |
|||
</translate> |
</translate> |
||
[[Image:Macro_Align_Camera_to_Working_Plane.png]] |
|||
'''Macro_Align_Camera_to_Working_Plane.FCMacro''' |
'''Macro_Align_Camera_to_Working_Plane.FCMacro''' |
||
{{ |
{{MacroCode|code= |
||
import FreeCAD,FreeCADGui |
import FreeCAD,FreeCADGui |
||
c = FreeCADGui.ActiveDocument.ActiveView.getCameraNode() |
c = FreeCADGui.ActiveDocument.ActiveView.getCameraNode() |
Latest revision as of 10:07, 21 December 2021
Description |
---|
This macro aligns the camera to the current Draft Working Plane Macro version: 0.1 Last modified: 2017-03-16 FreeCAD version: All Download: ToolBar Icon Author: yorik |
Author |
yorik |
Download |
ToolBar Icon |
Links |
Macros recipes How to install macros How to customize toolbars |
Macro Version |
0.1 |
Date last modified |
2017-03-16 |
FreeCAD Version(s) |
All |
Default shortcut |
None |
See also |
Macro Align Working Plane to Camera |
Description
This macro aligns the camera to the current Draft Working Plane
Usage
- Set the Draft Working Plane to your liking.
- Run the macro.
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)