Add a camera object to a Blender scene

add_camera(
  script,
  align = c("WORLD", "VIEW", "CURSOR"),
  location = c(0, 0, 0),
  rotation = c(0, 0, 0),
  convert_rotations = TRUE
)

Arguments

script

The Python script to append the generated code onto.

align

Character: alignment of the new camera object. Options include "WORLD" (align the new object to the world), "VIEW" (align the new object to the view), and "CURSOR" (use the 3D cursor orientation for the new object).

location

A numeric vector with length 3 specifying the x, y, and z grid coordinates for the new camera.

rotation

A numeric vector with length 3 specifying the x, y, and z rotation for the new camera.

convert_rotations

Logical: convert `rotation` to radians? Set to `FALSE` if `rotation` is already in radians.

Value

A length 1 character vector containing the Blender Python script with code to add a camera object added.