Package description.
Project description
qt-animation-timeline
A blender-style timeline widget for qt to edit animations.
Controls
| Action | Mouse/Key binding | Region |
|---|---|---|
| New Keyframe | Double click | Track |
| Select Keyframe | Click | Keyframe |
| Select multiple | Ctrl + Click | Keyframe |
| Select with box | Shift + Click | Tracks |
| Delete selected | Del | - |
| Move Selected Keyframes | Drag | Keyframe |
| Move whole track | Drag | Track Line |
| Change easing function | Right Click | Track Line or Keyframe |
| Scrub playhead | Drag | Header |
| Select play range | Shift + Drag | Header |
| Play/Pause animation | Space | - |
Usage
The widget takes a mapping of track names to python objects and attribute names, allowing automatic setting of the interpolated values of such object given the current state of the animation model.
The widget is designed to work with nested dataclass/pydantic style models, but will work just fine with anything else non-nested.
from pydantic import BaseModel
from qt_animation_timeline import AnimationTimelineWidget
class Circle(BaseModel):
color: tuple[int, int, int] = (255, 0, 0)
size: float = 10
filled: bool = True
other_stuff: str = "thing"
circle = Circle()
# mapping of names of tracks to a tuple of object/attribute
# any time a change in the animation occur, the object's attribute
# will be updated with the new interpolated value.
track_options = {
'color': (circle, 'color'),
'size': (circle, 'size')
}
timeline = AnimationTimelineWidget(track_options=track_options)
timeline.show()
This will allow to animate the color and size, updating the model accordingly when the playhead scrubs along the animation.
When a keyframe is created manually, it will inherit the current model value for the given attribute.
Note that this also works for nested models whenever possible:
class CircleSet(BaseModel):
circle1: Circle = Circle()
circle2: Circle = Circle()
circleset = CircleSet()
track_options = {
'circle 1': (circleset, 'circle1'),
'circle 2 size': (circleset, 'circle2.size') # or (circleset.circle2, size)
}
timeline = AnimationTimelineWidget(track_options=track_options)
timeline.show()
In this case, the whole model is considered the keyframe value, and all its elements will be interpolated.
Development
The easiest way to get started is to use the github cli and uv:
gh repo fork brisvag/qt-animation-timeline --clone
# or just
# gh repo clone brisvag/qt-animation-timeline
cd qt-animation-timeline
uv sync
Run tests:
uv run pytest
Lint files:
uv run pre-commit run --all-files
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qt_animation_timeline-0.1.2.tar.gz.
File metadata
- Download URL: qt_animation_timeline-0.1.2.tar.gz
- Upload date:
- Size: 30.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bb29c07ebc97922d7e449b6594ede251daeae2b708726687d1d06fe6b4c984e9
|
|
| MD5 |
805f003a9e79d09732a464ed5a5f80aa
|
|
| BLAKE2b-256 |
a08771e91d281fc0b60bb0401600a3a32956ff3b631b681e967ec2adf4594b4e
|
Provenance
The following attestation bundles were made for qt_animation_timeline-0.1.2.tar.gz:
Publisher:
ci.yml on brisvag/qt-animation-timeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qt_animation_timeline-0.1.2.tar.gz -
Subject digest:
bb29c07ebc97922d7e449b6594ede251daeae2b708726687d1d06fe6b4c984e9 - Sigstore transparency entry: 1328823301
- Sigstore integration time:
-
Permalink:
brisvag/qt-animation-timeline@be87fad08971ff2da72bc3922ae32e610594d610 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/brisvag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@be87fad08971ff2da72bc3922ae32e610594d610 -
Trigger Event:
push
-
Statement type:
File details
Details for the file qt_animation_timeline-0.1.2-py3-none-any.whl.
File metadata
- Download URL: qt_animation_timeline-0.1.2-py3-none-any.whl
- Upload date:
- Size: 22.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cff9563d7b08f3d9c025bf1fa5968ee84ddf4a18bb9040b2dee907d07d26be72
|
|
| MD5 |
5d84434b4cb36c7cae2d3764542ed43a
|
|
| BLAKE2b-256 |
db9e18d6dcea267297c499c8569be37d8886b14b8fa00cbdb4cfc4d5ff97f3dc
|
Provenance
The following attestation bundles were made for qt_animation_timeline-0.1.2-py3-none-any.whl:
Publisher:
ci.yml on brisvag/qt-animation-timeline
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qt_animation_timeline-0.1.2-py3-none-any.whl -
Subject digest:
cff9563d7b08f3d9c025bf1fa5968ee84ddf4a18bb9040b2dee907d07d26be72 - Sigstore transparency entry: 1328823373
- Sigstore integration time:
-
Permalink:
brisvag/qt-animation-timeline@be87fad08971ff2da72bc3922ae32e610594d610 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/brisvag
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@be87fad08971ff2da72bc3922ae32e610594d610 -
Trigger Event:
push
-
Statement type: