Skip to content

ProjectSound class

Bases: pytvpaint.sound.BaseSound['Project']

A Project sound.

Source code in pytvpaint/sound.py
256
257
258
259
260
261
262
263
264
def __init__(
    self,
    track_index: int,
    project: Project | None = None,
) -> None:
    from pytvpaint.project import Project

    project = project or Project.current_project()
    super().__init__(track_index, project)

project: Project property

The sound's project.

remove() -> None

Remove the sound from the project.

Source code in pytvpaint/sound.py
289
290
291
292
293
@set_as_current
def remove(self) -> None:
    """Remove the sound from the project."""
    george.tv_sound_project_remove(self.track_index)
    self.mark_removed()

reload() -> None

Reload the sound from file.

Source code in pytvpaint/sound.py
295
296
297
def reload(self) -> None:
    """Reload the sound from file."""
    george.tv_sound_project_reload(self.project.id, self.track_index)

make_current() -> None

Makes the sound project current.

Source code in pytvpaint/sound.py
299
300
301
def make_current(self) -> None:
    """Makes the sound project current."""
    self.project.make_current()