fusion_addin_framework.utils.set_camera_viewcube¶
- fusion_addin_framework.utils.set_camera_viewcube(view: Tuple[str], camera: Optional[adsk.core.Camera] = None, apply_camera: bool = False) → adsk.core.Camera¶
Creates a camera which is oriented in the same way as a click on a edge or corner of the viewcube would do. The camera is builfd from the passed camera or the currently active viewport camera if no camera got passed. Modifies the “eye”, “target”, “upVector” and “isFitView” properties of the camera.
- Parameters
view (Tuple[str]) – A Tuple containing one, two, or three unique keywords from {“back”, “front”, “right”, “left”, “top”, “bottom”} describing the face, edge or corner of the viewcube
camera (adsk.core.Camera, optional) – A camera instance which gets adapted. Defaults to the currently active camera.
apply_camera (bool, optional) – Defines whether the modified camera is set as the active camera. Defaults to False.
- Raises
ValueError – If the view arguments does not refer to a valid viewcue position. E.g.: (“top”, “bottom”), or (“top”, “top”, “right”) would be invalid.
- Returns
The adjusted camera.
- Return type
adsk.core.Camera