Returns or sets the camera and target positions of the specified view.
rhinoscriptsyntax.ViewCameraTarget ( view=None, camera=None, target=None )
rhinoscript.view.ViewCameraTarget ( view=None, camera=None, target=None )
view |
Optional. String or Guid. The title or identifier of the view. If omitted, the current active view is used. |
camera |
Optional. Array or Point3d. A 3-D point identifying the new camera location. If both camera and target are not specified, the current camera and target locations are returned. |
target |
Optional. Array or Point3d. A 3-D point identifying the new target location. If both camera and target are not specified, the current camera and target locations are returned. |
Point3d list |
If both camera and target are not specified, then the 3-D points containing the current camera and target locations is returned. |
Point3d list |
If either camera or target are specified, then the 3-D points containing the previous camera and target locations is returned. |
import rhinoscriptsyntax as rs
view = rs.CurrentView()
camera = rs.GetPoint("Select new camera location")
target = rs.GetPoint("Select new target location")
if camera and target:
rs.ViewCameraTarget( view, camera, target )