https://github.com/rust-adventure/skein
Convert glTF extras to Bevy Components using reflection
https://github.com/rust-adventure/skein
Last synced: about 1 month ago
JSON representation
Convert glTF extras to Bevy Components using reflection
- Host: GitHub
- URL: https://github.com/rust-adventure/skein
- Owner: rust-adventure
- Created: 2025-02-15T15:45:18.000Z (2 months ago)
- Default Branch: main
- Last Pushed: 2025-03-13T04:45:28.000Z (about 1 month ago)
- Last Synced: 2025-03-13T05:28:16.413Z (about 1 month ago)
- Language: Python
- Size: 584 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-bevy - `skein`
README
> [!CAUTION]
> in-progress crate. bevy 0.15 compatible version is backported from main and published.# Skein
A Bevy Plugin and a Blender extension for improving the efficiency of Bevy/Blender workflows.
tldr:
1. Register components in Bevy
2. Apply Bevy Components to objects, meshes, or materials in Blender
3. Export to glTF
4. Components are instantiated when spawning in Bevy## Quickstart
Add the plugin and register components (`reflect(Component)` is important!)
```rust
use bevy::prelude::*;
use bevy_skein::SkeinPlugin;fn main() {
App::new()
.register_type::()
.add_plugins((
DefaultPlugins,
SkeinPlugin::default(),
))
.run();
}#[derive(Component, Reflect, Debug)]
#[reflect(Component)]
struct Player {
name: String,
power: f32,
test: i32,
}
```- Install the Blender Addon (todo)
- Fetch the Bevy registry using the Blender Operator
- Select and apply a component
- Export to glTF
- Spawn a Scene from the glTF file, which will have components instantiated```rust
commands.spawn(SceneRoot(asset_server.load(
GltfAssetLabel::Scene(0).from_asset("my_export.gltf"),
)));
```## Use Cases
- Apply Bevy Components in Blender
- Replace materials from Blender with materials defined in Bevy ([example](examples/replace_material.rs))
- Use Blender Drivers to power Bevy Component values## Why is it named Skein?
Its a tool that aims to improve the efficiency of Bevy (group of birds) and Blender workflows.
> A flock of wild geese or swans in flight, typically in a V-shaped formation.
>
> - [Oxford Dictionary](https://web.archive.org/web/20190107072506/https://en.oxforddictionaries.com/definition/skein)> A V formation is a symmetric V- or chevron-shaped flight formation. In nature, it occurs among geese, swans, ducks, and other migratory birds, improving their energy efficiency
>
> - [Wikipedia](https://en.wikipedia.org/wiki/V_formation)Its also thread/yarn related which is cool too.