fusion_addin_framework.utils.set_camera_viewarea¶
- fusion_addin_framework.utils.set_camera_viewarea(plane='xy', horizontal_borders=(0, 10), vertical_borders=(0, 10), camera: Optional[adsk.core.Camera] = None, apply_camera: bool = False) → adsk.core.Camera¶
Returns a camera which is condifured so that the vieport certainly displays the area defioned by the horizonal and vertical extent parameters. The viewport is set to the minimum area that will still display all the area.
- Parameters
plane (str, optional) – The plane which shows the viewport. Defaults to “xy”.
horizontal_borders (tuple, optional) – The horizontal dimension which is diaplayed. Defaults to (0, 10).
vertical_borders (tuple, optional) – The vertical dimension which is diaplayed. Defaults to (0, 10).
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 an invalid name of a plane is provided.
- Returns
The adapted camera instance.
- Return type
adsk.core.Camera