FramePrimsCommand

class omni.usd.commands.FramePrimsCommand(prim_to_move: Union[str, Path], prims_to_frame: Optional[Sequence[Union[str, Path]]] = None, time_code: TimeCode = Usd.TimeCode.Default(), usd_context_name: str = '', aspect_ratio: float = 1, use_horizontal_fov: Optional[bool] = None, zoom: float = 0.45, horizontal_fov: float = 0.20656116130367255)

Bases: Command

Transform camera to encompass the bounds of a list of paths.

Methods

__init__(prim_to_move[, prims_to_frame, ...])

Constructor.

do()

undo()

__init__(prim_to_move: Union[str, Path], prims_to_frame: Optional[Sequence[Union[str, Path]]] = None, time_code: TimeCode = Usd.TimeCode.Default(), usd_context_name: str = '', aspect_ratio: float = 1, use_horizontal_fov: Optional[bool] = None, zoom: float = 0.45, horizontal_fov: float = 0.20656116130367255)

Constructor.

Parameters
  • prim_to_move (Union[str, Sdf.Path]) – Path to the camera primitive that is being moved.

  • prims_to_frame (Sequence[Union[str, Sdf.Path]], optional) – Sequence of primitives to use to calculate the bounds to frame. If it’s None, it means to calculate bound box for the whole stage. Default is None.

  • time_code (Usd.TimeCode, optional) – Timecode to set values at. Default is Usd.TimeCode.Default().

  • usd_context_name (str, optional) – Name of the usd context to work on. Default is None, which means the default UsdContext is used.

  • aspect_ratio (float, optional) – Width / Height of the final image. Default is 1.

  • use_horizontal_fov (bool, optional) – Whether to use a camera’s horizontal or vertical field of view for framing.

  • zoom (float, optional) – Final zoom in or out of the framed box. Values above 0.5 move further away and below 0.5 go closer. Default is 0.45.

  • horizontal_fov (float, optional) – Default horizontal field-of-view to use for framing if one cannot be calculated. Default is 0.20656116130367255.