Camera class¶
Camera related objects and classes.
Camera(clip: Clip, data: george.TVPCamera | None = None)
¶
Bases: pytvpaint.utils.Refreshable
The Camera class represents the camera in a TVPaint clip.
There's only one camera in the clip so instantiating multiple objects of this class won't create cameras.
Source code in pytvpaint/camera.py
26 27 28 29 30 |
|
clip: Clip
property
¶
The camera's clip.
points: Iterator[CameraPoint]
property
¶
Iterator for the CameraPoint
objects of the camera.
refresh() -> None
¶
Refreshed the camera data.
Source code in pytvpaint/camera.py
32 33 34 35 36 |
|
make_current() -> None
¶
Makes the parent clip the current one, thereby making sure the correct camera will be set.
Source code in pytvpaint/camera.py
47 48 49 |
|
anti_aliasing() -> int
¶
The antialiasing value of the camera.
Source code in pytvpaint/camera.py
106 107 108 109 110 |
|
insert_point(index: int, x: int, y: int, angle: int, scale: float) -> CameraPoint
¶
Insert a new point in the camera path.
Source code in pytvpaint/camera.py
123 124 125 126 127 128 129 130 131 132 133 |
|
get_point_data_at(position: float) -> george.TVPCameraPoint
¶
Get the points data interpolated at that position (between 0 and 1).
Source code in pytvpaint/camera.py
145 146 147 148 149 |
|
remove_point(index: int) -> None
¶
Remove a point at that index.
Source code in pytvpaint/camera.py
151 152 153 154 155 156 157 158 |
|
CameraPoint(index: int, camera: Camera, data: george.TVPCameraPoint | None = None)
¶
Bases: pytvpaint.utils.Removable
A CameraPoint is a point on the camera path.
You can use them to animate the camera movement.
Source code in pytvpaint/camera.py
167 168 169 170 171 172 173 174 175 176 |
|
data: george.TVPCameraPoint
property
¶
Returns the raw data of the point.
index: int
property
¶
The index of the point in the path.
camera: Camera
property
¶
The camera instance it belongs to.
refresh() -> None
¶
Refreshed the camera point data.
Source code in pytvpaint/camera.py
178 179 180 181 182 183 |
|
new(camera: Camera, index: int, x: int, y: int, angle: int, scale: float) -> CameraPoint
classmethod
¶
Create a new point and add it to the camera path at that index.
Source code in pytvpaint/camera.py
276 277 278 279 280 281 282 283 284 285 286 287 288 |
|
remove() -> None
¶
Remove the camera point.
Warning
the point instance won't be usable after that call
Source code in pytvpaint/camera.py
290 291 292 293 294 295 296 297 |
|