A package that allows you to create skeleton animations
Project description
Scull
Scull is a package that allows you to create skeleton animations.
Creating a skeleton
To start making animation you need to create a skeleton. You can load a model:
from scull.models.<model_name> import *
simple_model = simple("<skeleton_name>")
complex_model = complex("<skeleton_name>")
Or create custom:
from scull import *
skeleton = Skeleton("<skeleton_name>")
backbone = Backbone(0, 0, 7, 90)
skeleton["right_leg"] = Bone(backbone, 0, 10, -45)
skeleton["right_arm"] = Bone(backbone, 90, 10, -90)
skeleton["backbone"] = backbone
skeleton["head"] = Bone(backbone, 100, 3, 180)
skeleton["left_leg"] = Bone(backbone, 0, 10, 45)
skeleton["left_arm"] = Bone(backbone, 90, 10, 90)
Applying poses
When you have a skeleton you can apply a pose to it:
from scull.models.<model_name> import *
<pose_name>.apply(skeleton)
You can also create poses:
from scull import *
<pose_name> = Pose(
left_upper_leg=-22.5,
left_lower_leg=135,
right_upper_leg=-56.25,
right_lower_leg=157.5,
left_upper_arm=22.5,
left_lower_arm=-45,
right_upper_arm=-22.5,
right_lower_arm=-22.5,
head=191.25
)
Animating the skeleton
Now you should animate the skeleton:
from scull.models.<model_name> import *
<animation_name>.play(skeleton)
Render
from scull.render.<render_type> import *
renderer = <renderer_name>()
renderer.render(skeleton, {
"head": {
"image": "head.png"
},
"left_upper_arm": {
"image": "base.png"
},
"left_lower_arm": {
"image": "lower_arm.png"
},
"left_upper_leg": {
"image": "base.png"
},
"left_lower_leg": {
"image": "lower_leg.png"
},
"backbone": {
"image": "base.png",
"effects": {
"shadow": 15
}
},
"right_upper_arm": {
"image": "base.png",
"effects": {
"shadow": 25
}
},
"right_lower_arm": {
"image": "lower_arm.png",
"effects": {
"shadow": 25
}
},
"right_upper_leg": {
"image": "base.png",
"effects": {
"shadow": 25
}
},
"right_lower_leg": {
"image": "lower_leg.png",
"effects": {
"shadow": 25
}
}
})
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
Scull-1.0.0.tar.gz
(5.5 kB
view details)
Built Distribution
Scull-1.0.0-py3-none-any.whl
(6.2 kB
view details)
File details
Details for the file Scull-1.0.0.tar.gz
.
File metadata
- Download URL: Scull-1.0.0.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6b55fc40a2ac66f890c265f9868f7b425cd371187c712c997dc6256941f2c50 |
|
MD5 | 969a25555c00ef28726999b6069ec3a4 |
|
BLAKE2b-256 | cff83fab5512a4071a141cda448fa8caaac3cb20978f7cd42d75fcd8809eb0e1 |
File details
Details for the file Scull-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: Scull-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82623978d3e7ea14b5d2d64ec11674c81d3b323d966f8fe6b01ed44a30a7ca9f |
|
MD5 | bd6ec7373434cec381da397288b318db |
|
BLAKE2b-256 | c94843dee85de482933b42b4ecb97849b95cbcb4c536e84c4532aed9eb7d35fb |