| 1 | from pydantic import BaseModel, Field |
| 2 | from typing import List, Optional, Union, Dict, Tuple |
| 3 | |
| 4 | |
| 5 | |
| 6 | class Camera(BaseModel): |
| 7 | idx: int = Field( |
| 8 | description="The index of the camera in the scene, starting from 0.", |
| 9 | ) |
| 10 | |
| 11 | active_shot_idxs: List[int] = Field( |
| 12 | description="The indices of the shots that the camera can film.", |
| 13 | ) |
| 14 | |
| 15 | parent_cam_idx: Optional[int] = Field( |
| 16 | default=None, |
| 17 | description="The index of the parent camera. If the camera has no parent, set this to None.", |
| 18 | ) |
| 19 | |
| 20 | parent_shot_idx: Optional[int] = Field( |
| 21 | default=None, |
| 22 | description="The index of the dependent shot. If the camera has no parent, set this to None.", |
| 23 | ) |
| 24 | |
| 25 | reason: Optional[str] = Field( |
| 26 | default=None, |
| 27 | description="The reason for the selection of the parent camera. If the camera has no parent, set this to None.", |
| 28 | ) |
| 29 | |
| 30 | parent_shot_idx: Optional[int] = Field( |
| 31 | default=None, |
| 32 | description="The index of the dependent shot. If the camera has no parent, set this to None.", |
| 33 | ) |
| 34 | |
| 35 | is_parent_fully_covers_child: Optional[bool] = Field( |
| 36 | default=None, |
| 37 | description="Whether the parent camera fully covers the child camera's content. If the camera has no parent, set this to None.", |
| 38 | ) |
| 39 | |
| 40 | missing_info: Optional[str] = Field( |
| 41 | default=None, |
| 42 | description="The missing information in the child shot that is not covered by the parent shot. If the parent shot fully covers the child shot, set this to None.", |
| 43 | ) |
| 44 |