2024-02-05 22:01:19 +00:00
[![Crates.io ](https://img.shields.io/crates/v/bevy_registry_export )](https://crates.io/crates/bevy_registry_export)
[![Docs ](https://img.shields.io/docsrs/bevy_registry_export )](https://docs.rs/bevy_registry_export/latest/bevy_registry_export/)
2024-07-20 23:44:05 +00:00
[![License ](https://img.shields.io/crates/l/bevy_registry_export )](https://github.com/kaosat-dev/Blenvy/blob/main/crates/bevy_registry_export/License.md)
2024-02-05 22:01:19 +00:00
[![Bevy tracking ](https://img.shields.io/badge/Bevy%20tracking-released%20version-lightblue )](https://github.com/bevyengine/bevy/blob/main/docs/plugins_guidelines.md#main-branch-tracking)
2024-07-18 11:42:29 +00:00
# bevy_registry_export (deprecated in favor of Blenvy)
> bevy_registry_export has been deprecated in favor of its successor [Blenvy](https://crates.io/crates/blenvy), part of the [Blenvy project](https://github.com/kaosat-dev/Blenvy). No further development or maintenance will be done for Bevy bevy_registry_export. See [#194](https://github.com/kaosat-dev/Blenvy/issues/194) for background.
2024-02-05 22:01:19 +00:00
This plugin allows you to create a Json export of all your components/ registered types.
2024-07-20 23:44:05 +00:00
Its main use case is as a backbone for the [```bevy_components``` Blender add-on ](https://github.com/kaosat-dev/Blenvy/tree/main/tools/bevy_components ), that allows you to add & edit components directly in Blender, using the actual type definitions from Bevy
2024-02-05 22:01:19 +00:00
(and any of your custom types & components that you register in Bevy).
## Usage
Here's a minimal usage example:
```toml
# Cargo.toml
[dependencies]
2024-07-18 11:42:29 +00:00
bevy="0.14"
bevy_registry_export = "0.4"
2024-02-05 22:01:19 +00:00
```
```rust no_run
use bevy::prelude::*;
use bevy_registry_export::*;
fn main() {
App::new()
.add_plugins((
DefaultPlugins,
ExportRegistryPlugin::default() // will save your registry schema json file to assets/registry.json
))
.run();
}
```
2024-07-20 23:44:05 +00:00
take a look at the [example ](https://github.com/kaosat-dev/Blenvy/tree/main/examples/bevy_registry_export/basic/src/core/mod.rs ) for more clarity
2024-02-05 22:01:19 +00:00
## Installation
Add the following to your `[dependencies]` section in `Cargo.toml` :
```toml
2024-07-18 11:42:29 +00:00
bevy_registry_export = "0.4"
2024-02-05 22:01:19 +00:00
```
Or use `cargo add` :
```toml
cargo add bevy_registry_export
```
## Setup
```rust no_run
use bevy::prelude::*;
use bevy_registry_export::*;
fn main() {
App::new()
.add_plugins((
DefaultPlugins
ExportRegistryPlugin::default()
))
.run();
}
```
you can also configure the output path
```rust no_run
use bevy::prelude::*;
use bevy_registry_export::*;
fn main() {
App::new()
.add_plugins((
DefaultPlugins
ExportRegistryPlugin {
save_path: "assets/registry.json".into(),
..Default::default()
},
))
.run();
}
```
## Usage
- The output file will be generated in the ```Startup``` schedule whenever you run your app.
- Every time you compile & run your app, the output json file will be updated.
## Examples
All examples are here:
2024-07-18 11:42:29 +00:00
> the examples use ```bevy_gltf_blueprints``` with the **legacy_mode** set to **FALSE** as the new custom properties generated by the Blender add-on require newer/ non legacy logic.
2024-07-20 23:44:05 +00:00
- https://github.com/kaosat-dev/Blenvy/tree/main/examples/bevy_registry_export/basic
2024-02-05 22:01:19 +00:00
## Compatible Bevy versions
The main branch is compatible with the latest Bevy release, while the branch `bevy_main` tries to track the `main` branch of Bevy (PRs updating the tracked commit are welcome).
Compatibility of `bevy_registry_export` versions:
| `bevy_registry_export` | `bevy` | `bevy_components (Blender add-on)` |
| :-- | :-- |:-- |
2024-07-18 11:42:29 +00:00
| `0.4 ` | `0.14` | `0.3` |
2024-03-04 21:16:31 +00:00
| `0.3 ` | `0.13` | `0.3` |
2024-03-04 07:20:00 +00:00
| `0.2 ` | `0.12` | `0.3` |
| `0.1 ` | `0.12` | `0.1 -0.2` |
| branch `main` | `0.12` | `0.1` |
2024-02-05 22:01:19 +00:00
| branch `bevy_main` | `main` | `n/a` |
## Contributors
Thanks to all the contributors helping out with this project ! Big kudos to you, contributions are always appreciated ! :)
A big shout out to [killercup ](https://github.com/killercup ), that did the bulk of the Bevy side code !
## License
This crate, all its code, contents & assets is Dual-licensed under either of
- Apache License, Version 2.0, ([LICENSE-APACHE](./LICENSE_APACHE.md) or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license ([LICENSE-MIT](./LICENSE_MIT.md) or https://opensource.org/licenses/MIT)