Skip to content

Releases: rust-adventure/skein

blender-0.1.14 + bevy_skein 0.5

22 Dec 20:33

Choose a tag to compare

addon 0.1.14

  • Components data can now be exported using glTF Extensions.

Bevy 0.18 gained support for processing glTF extensions.
By exporting the component data as an extension, component processing will happen when the glTF file is being loaded, rather than when the GltfExtras components are inserted.
This means Scenes built from glTF files are "ready to go", including component data, and don't need to be processed as they're being spawned.

The data in a glTF file now looks like this.

"nodes": [
  {
    "extensions": {
      "BEVY_skein": {
        "components": [
          {
            "test_components::Player": {
              "name": "Is the Mesh Object",
              "power": 90.93000030517578,
              "test": -234
            }
          }
        ]
      }
    },
    "mesh": 0,
    "name": "Cube"
  },
  • Add a "Trigger all Collection Exporters" operator. This can be used from a sidemenu or bound to a key.

bevy_skein 0.5.0

Enable the processing of Bevy component data at glTF load time by taking advantage of the new glTF extension handlers in Bevy 0.18.

Components are inserted when the Scenes are being constructed from the glTF file in the loader, which is the earliest possible time this can happen.
This means that Scenes are "ready to go" and already include their component data after being loaded.
With extension data, Skein does not need to process scene instances as they are being instantiated.

bevy_skein 0.4 & blender addon 0.1.13

18 Nov 16:29

Choose a tag to compare

The key feature for this release is Blender 5 compatibility for the Blender addon. There should be no breaking changes for users, but we've set the new Rust crate to 0.4 to account for wasm configuration changes.

  • custom BRP configuration is also now support across Rust crate and Blender addon
  • new cli commands for Blender addon
  • Changes to how brp feature is handled in Rust crate, especially with respect to wasm targets

Blender Addon Changes 0.1.13

  • Enable Blender 5 compatibility

  • Don't set skein extras field if components array is empty

  • Enable configuration for custom BRP host/port

  • A new change_component_path cli command (that can run headlessly) was introduced which can make migration easier by enabling changing the type_paths of a component on the CLI: #82

    blender --background -b art/tunic.blend -c change_component_path --old_path tunic_bush::BushSensor --new_path api::BushSensor
    
  • the dump_component_data cli command (that can run headlessly) has been updated to account for all current object types and a new format that records unrecognized components

    blender --background -b art/tunic.blend -c dump_component_data -o components.json
    
    {
      "object": [
        {
          "name": "ActivationSensor",
          "components": [
            {
              "avian3d::collision::collider::constructor::ColliderConstructor": {
                "Sphere": {
                  "radius": 0.4999999403953552
                }
              }
            }
          ],
          "unrecognized_components": ["tunic_bush::BushSensor"]
        },
        {
          "name": "Blade",
          "components": [],
          "unrecognized_components": ["tunic_bush::Bush"]
        }
      ],
      "mesh": [],
      "material": [
        {
          "name": "TerrainMat",
          "components": [
            {
              "api::TerrainMat": {}
            }
          ]
        }
      ],
      "scene": [],
      "camera": [],
      "light": [],
      "collection": [],
      "bone": []
    }

bevy_skein 0.4.0

  • Add custom BRP methods in Plugin::finish, which enables users to configure their own BRP host/port and plays nicely with other crates which may add methods of their own

  • Don't attempt to use brp feature or dep:bevy_remote on wasm

  • New debug logs in the skein plugin enable showing whether skein is controlling the BRP plugins or not, as well as if skein is adding additional endpoints. These aren't shown by default, so you have to enable them if you want them:

❯ RUST_LOG=info,bevy_skein=debug bevy run --example components_on_bone
DEBUG build: bevy_skein: adding `bevy_remote::RemotePlugin` and `bevy_remote::http::RemoteHttpPlugin`. BRP HTTP server running at: 127.0.0.1:15702
DEBUG bevy_skein: enabling skein/presets endpoint

blender-v0.1.8

08 May 08:19

Choose a tag to compare

This release includes a fix for exporting Scalar value components like the Mass tuple struct from Avian when type_paths are > 63 characters long.

avian3d::dynamics::rigid_body::mass_properties::components::Mass

Defaults and Presets

23 Apr 09:51

Choose a tag to compare

This release includes:

  • bevy_skein 0.2.0-rc.3
  • Blender Addon 0.1.6

Distribution as an Extension

This release closes #8 by releasing the addon on the website. https://bevyskein.dev/ now hosts an extension repository which can be used to check for updates when Blender starts.

Instructions for how to install via repository and manually via .zip are available on the website.

Defaults and Presets

This release closes #5 , and introduces the concept of "Presets".

Preset data is served from Bevy via a new BRP endpoint skein/presets.

There are two sides to presets as usual, Supplying them in Bevy and using them in Blender

Supplying Presets

Default implementations will automatically be instantiated and provided to Blender. This requires implementing Default and then reflecting the Default data. Most built-in Bevy types already have this provided. You can provide it for your own types as such:

#[derive(Component, Reflect, Debug, Default)]
#[reflect(Component, Default)]
struct Character {
    name: String,
}

Custom presets can be provided at the App level. Presets are automatically stored based on the type information, so you only need to provide a name and a value for the preset.

use bevy::prelude::*;
use bevy_skein::{SkeinAppExt, SkeinPlugin};

fn main() {
    App::new()
        .register_type::<Character>()
        .insert_skein_preset(
            "Hollow Knight",
            Character {
                name: "Hollow Knight".to_string(),
            },
        )
        .insert_skein_preset(
            "Super",
            Character {
                name: "Mario Mario".to_string(),
            },
        )

Using Presets

The Default implementation, if it exists, is used when inserting new Components.

For applying presets after a Component is inserted, use the hamburger menu.

screenshot-2025-04-23-at-02 42 36@2x

First CLI Command

This release introduces the first CLI command, dump_component_data, which can be used on the CLI to create a json file of all of the component usage in a blend file. All CLI commands are considered experimental as we research and build workflows, but this one doesn't mutate anything so is generally safe to run.

CLI commands packaged with the Blender Addon can be accessed using -c when using Blender in the background. Here's how to dump all the component data from a specific blend file.

blender --background -b replace_material.blend -c dump_component_data -o test.json

Blender addon: v0.1.5

11 Apr 10:47

Choose a tag to compare

changelog

Major user-facing features of this release include:

  • Add support for Cameras, Lights, and Collections
  • Support type_paths > 63 characters long, like avian3d::dynamics::rigid_body::mass_properties::components::Mass
  • implement default values for Maps and Lists, which will export as {} and []. This enables some types, like ColliderConstructorHierarchy from Avian, which have HashMaps that aren't used but need to be handled.
  • Many glam types are now explicitly handled in the UI, making them easier to associate with headings and inner properties, like knowing an x,y and z are related.
  • opening a project or creating a new one will now create a local skein-registry.json if one doesn't exist. Be sure to fetch your app's registry.
  • The DebugCheckObjectBevyComponents operator was removed from the edit menu. It still exists, but if you want it you'll have to call it directly or bind it to a key
  • Operators for inserting components are now per-object and can be bound to keymaps. Future work will likely introduce a generalized operator for hotkey insertion

Blender addon: v0.1.3

06 Apr 05:28

Choose a tag to compare

Glam's serializations

This release implements the rest of glam's special serializations, which are different than their type registry data.

Vec3 and other glam types are structs with fields, like x, y, z. This is different than how they're serialized, which is [x, y, z]. When unregistered, Vec3 will serialize as a struct, but when registered it will use the array form. We therefore always want to serialize as an array as we expect all types to be registered when used from the type_registry information. We extend this support to all Vec2,3,4, affine, and matrices as well.

Tests

Snapshots

Data is at the forefront of Skein's ability to operate. As a result, snapshot tests were implemented for all relevant Bevy serializations as well as some explicit component tests. This will make the project aware of any changes in the future, should serialization behavior change between releases.

All of the snapshots defined in test-components/lib.rs can be viewed in test-components/src/snapshots.

---
source: src/lib.rs
expression: serializer
snapshot_kind: text
---
{
  "test_components::Player": {
    "name": "Chris Biscardi",
    "power": 100.0,
    "test": 4
  }
}

headless Blender tests

Building on these snapshots, a combination of all of the results is present in tools/combined_snapshots.json. This is used in headless Blender tests to ensure that the serialization we're producing from the Blender Component Forms matches the snapshots we're taking from Bevy. Notably this data has been manually edited to use Default values for all numbers. These defaults are "defaults according to Blender". We may be able to introduce more interesting default value handling in the future.

The python for these headless tests can be found here and snapshots that didn't pass are included in combined_snapshots_potential_bugs which could indicate potential bugs, but for the most part includes types that we don't handle, such as any type that includes a Handle or currently, an Entity.


This was the first release submitted to the Blender Extensions Directory: https://extensions.blender.org/approval-queue/bevy-skein/

Blender addon: v0.1.2

25 Mar 00:12

Choose a tag to compare

0.1.2 - 2025-03-24

Blender addon: v0.1.1

22 Mar 15:40

Choose a tag to compare

Introduces the ability to use Library Overrides for Component data.

bevy_skein Blender addon first release: 0.1.0

17 Mar 16:50

Choose a tag to compare

The very first release of bevy_skein's Blender addon.

The addon is compatible with both the main branch bevy crate and the 0.15 release.

How to use:

  1. Download bevy_skein-0.1.0.zip
  2. Open Blender, navigate to Edit -> Add-ons`
    screenshot-2025-03-17-at-09 11 47@2x
  3. Drag .zip file onto addons list and "Install from Disk"
    screenshot-2025-03-17-at-09 12 02@2x
  4. Bevy Skein should be installed in the list
    screenshot-2025-03-17-at-09 12 21@2x

Tip

There is a debug option in the addon preferences. If you want to develop against the addon you can enable this to see a bunch of output (note: requires running Blender from terminal)

screenshot-2025-03-17-at-09 12 38@2x

Using the addon

The Bevy component UI can be found in the Properties panel, under Object, Data (for meshes), or Materials

screenshot-2025-03-17-at-09 25 23@2x

You will need a running Bevy app with the Skein plugin enabled to be able to fetch the Bevy registry data. You can fetch the registry data from the button in the Properties panel or from the Edit menu in Blender

screenshot-2025-03-17-at-09 28 04@2x

Adding Components

Once the registry is fetched from a running Bevy app, you can add components in the Properties panel.

screenshot-2025-03-17-at-09 29 18@2x

In the type field components will autocomplete, select one.

screenshot-2025-03-17-at-09 29 42@2x

Click Insert Bevy Component

screenshot-2025-03-17-at-09 29 55@2x

Scroll down to see the currently selected component's form fields

screenshot-2025-03-17-at-09 30 06@2x

Optionally choose new values

screenshot-2025-03-17-at-09 30 15@2x

See new form for current variant.

screenshot-2025-03-17-at-09 30 27@2x

Drivers

Blender Drivers can be used to power values in Bevy components. We'll be using dimensions in this example. More data fields can be found in the docs

Right click on a value (we're using the x_length from the last section) and select Add Driver

screenshot-2025-03-17-at-09 34 22@2x

The Driver form will show. Drivers can be as simple as a single property to as complex as arbitrary python.

screenshot-2025-03-17-at-09 34 39@2x

We'll select Single Property

screenshot-2025-03-17-at-09 34 49@2x

This shows a new form

screenshot-2025-03-17-at-09 34 57@2x

We'll select the default cube as our Object

screenshot-2025-03-17-at-09 35 44@2x

screenshot-2025-03-17-at-09 35 08@2x

Then we'll set the Path for our property

screenshot-2025-03-17-at-09 35 08@2x

We'll use dimensions to get the x, y, and z length (aka: width, height, and depth).

Important

Blenders dimensions are Y-up, so dimensions[0] is x, dimensions[1] is y, and dimensions[2] is z.

In Bevy, Z is up, so we need to map Blender's coordinates to the values our components expect in Bevy:

  • x -> x_length
  • y -> z_length
  • z -> y_length

screenshot-2025-03-17-at-09 35 24@2x

Do this for all three values

screenshot-2025-03-17-at-09 36 15@2x

Switch into Edit Mode (use Tab or the top-left menu)

screenshot-2025-03-17-at-09 36 24@2x

Scale the cube up (hit s)

screenshot-2025-03-17-at-09 36 33@2x

Watch as the values grow as the cube scales. This is Drivers.

Exporting

Bevy consumes .gltf from Blender, so we need to export it. In the file menu, Export -> gltf

screenshot-2025-03-17-at-09 36 56@2x

If you want to look at the output, the Format can be .gltf. For production you'll want .glb.

screenshot-2025-03-17-at-09 37 49@2x

In Bevy

The addon is meant to function alongside the Rust crate: bevy_skein. The currently released version (0.1.2) is meant for use with Bevy 0.15.

The workflow looks like this:

  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!)

use bevy::prelude::*;
use bevy_skein::SkeinPlugin;

fn main() {
    App::new()
        .register_type::<Player>()
        .add_plugins((
            DefaultPlugins,
            SkeinPlugin::default(),
        ))
        .run();
}

#[derive(Component, Reflect, Debug)]
#[reflect(Component)]
struct Player {
    name: String,
    power: f32,
    test: i32,
}
  • Spawn a Scene from the glTF file, which will have components instantiated on it
commands.spawn(SceneRoot(asset_server.load(
    GltfAssetLabel::Scene(0).from_asset("my_export.gltf"),
)));