mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 11:50:53 +00:00
chore(crates): updated crates to Bevy 0.13
* updated deps * updated / changed code where relevant * updated README files * bumped version numbers for upcoming release * updated rust-toolchain
This commit is contained in:
parent
1ceb5050f2
commit
cc2718ffd2
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "bevy_gltf_blueprints"
|
||||
version = "0.7.3"
|
||||
version = "0.8.0"
|
||||
authors = ["Mark 'kaosat-dev' Moissette"]
|
||||
description = "Adds the ability to define Blueprints/Prefabs for [Bevy](https://bevyengine.org/) inside gltf files and spawn them in Bevy."
|
||||
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
|
||||
@ -14,9 +14,9 @@ license = "MIT OR Apache-2.0"
|
||||
workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] }
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] }
|
||||
|
||||
[dependencies]
|
||||
bevy_gltf_components = "0.3"
|
||||
#bevy_gltf_components = { path = "../bevy_gltf_components" }
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] }
|
||||
#bevy_gltf_components = "0.3"
|
||||
bevy_gltf_components = { path = "../bevy_gltf_components" }
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation", "animation"] }
|
||||
|
@ -26,7 +26,7 @@ Here's a minimal usage example:
|
||||
# Cargo.toml
|
||||
[dependencies]
|
||||
bevy="0.12"
|
||||
bevy_gltf_blueprints = { version = "0.7"}
|
||||
bevy_gltf_blueprints = { version = "0.8"}
|
||||
|
||||
```
|
||||
|
||||
@ -64,7 +64,7 @@ fn spawn_blueprint(
|
||||
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
bevy_gltf_blueprints = "0.7"
|
||||
bevy_gltf_blueprints = "0.8"
|
||||
```
|
||||
|
||||
Or use `cargo add`:
|
||||
@ -346,9 +346,10 @@ The main branch is compatible with the latest Bevy release, while the branch `be
|
||||
Compatibility of `bevy_gltf_blueprints` versions:
|
||||
| `bevy_gltf_blueprints` | `bevy` |
|
||||
| :-- | :-- |
|
||||
| `0.8` | `0.13` |
|
||||
| `0.3 - 0.7` | `0.12` |
|
||||
| `0.1 - 0.2` | `0.11` |
|
||||
| branch `main` | `0.12` |
|
||||
| branch `main` | `0.13` |
|
||||
| branch `bevy_main` | `main` |
|
||||
|
||||
|
||||
|
@ -78,6 +78,9 @@ impl CopyComponents {
|
||||
};
|
||||
|
||||
for (component, type_id) in components {
|
||||
let type_registry: &AppTypeRegistry = world.resource();
|
||||
let type_registry = type_registry.clone();
|
||||
let type_registry = type_registry.read();
|
||||
let source = component
|
||||
.reflect(world.get_entity(self.source).unwrap())
|
||||
.unwrap()
|
||||
@ -90,7 +93,7 @@ impl CopyComponents {
|
||||
// println!("contains typeid {:?} {}", type_id, destination.contains_type_id(type_id));
|
||||
// we only want to copy components that are NOT already in the destination (ie no overwriting existing components)
|
||||
if !destination.contains_type_id(type_id) {
|
||||
component.insert(&mut destination, &*source);
|
||||
component.insert(&mut destination, &*source, &type_registry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ pub struct MaterialInfo {
|
||||
pub(crate) fn materials_inject(
|
||||
mut blueprints_config: ResMut<BluePrintsConfig>,
|
||||
material_infos: Query<(&MaterialInfo, &Children), Added<MaterialInfo>>,
|
||||
with_materials_and_meshes: Query<(
|
||||
with_materials_and_meshes: Query<(), (
|
||||
With<Parent>,
|
||||
With<Handle<StandardMaterial>>,
|
||||
With<Handle<Mesh>>,
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "bevy_gltf_components"
|
||||
version = "0.3.2"
|
||||
version = "0.4.0"
|
||||
authors = ["Mark 'kaosat-dev' Moissette"]
|
||||
description = "Allows you to define [Bevy](https://bevyengine.org/) components direclty inside gltf files and instanciate the components on the Bevy side."
|
||||
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
|
||||
@ -14,9 +14,9 @@ license = "MIT OR Apache-2.0"
|
||||
workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
|
||||
[dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
serde = "1.0.188"
|
||||
ron = "0.8.1"
|
||||
|
@ -23,8 +23,8 @@ Here's a minimal usage example:
|
||||
```toml
|
||||
# Cargo.toml
|
||||
[dependencies]
|
||||
bevy="0.12"
|
||||
bevy_gltf_components = { version = "0.3"}
|
||||
bevy="0.13"
|
||||
bevy_gltf_components = { version = "0.4"}
|
||||
|
||||
```
|
||||
|
||||
@ -60,7 +60,7 @@ bevy_gltf_components = { version = "0.3"}
|
||||
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
bevy_gltf_components = "0.3"
|
||||
bevy_gltf_components = "0.4"
|
||||
```
|
||||
|
||||
Or use `cargo add`:
|
||||
@ -71,7 +71,7 @@ cargo add bevy_gltf_components
|
||||
|
||||
## Configuration
|
||||
|
||||
starting with version 0.3, this plugin is configurable
|
||||
starting with version 0.4, this plugin is configurable
|
||||
Use the default configuration:
|
||||
|
||||
```rust no_run
|
||||
@ -117,9 +117,10 @@ The main branch is compatible with the latest Bevy release, while the branch `be
|
||||
Compatibility of `bevy_gltf_components` versions:
|
||||
| `bevy_gltf_components` | `bevy` |
|
||||
| :-- | :-- |
|
||||
| `0.4` | `0.13` |
|
||||
| `0.2 - 0.3` | `0.12` |
|
||||
| `0.1` | `0.11` |
|
||||
| branch `main` | `0.12` |
|
||||
| branch `main` | `0.13` |
|
||||
| branch `bevy_main` | `main` |
|
||||
|
||||
|
||||
|
@ -32,6 +32,7 @@ pub fn add_components_from_gltf_extras(world: &mut World) {
|
||||
|
||||
let type_registry: &AppTypeRegistry = world.resource();
|
||||
let type_registry = type_registry.read();
|
||||
|
||||
let reflect_components = ronstring_to_reflect_component(
|
||||
&extra.value,
|
||||
&type_registry,
|
||||
@ -68,20 +69,27 @@ pub fn add_components_from_gltf_extras(world: &mut World) {
|
||||
}
|
||||
|
||||
for (entity, components) in entity_components {
|
||||
let type_registry: &AppTypeRegistry = world.resource();
|
||||
let type_registry = type_registry.clone();
|
||||
let type_registry = type_registry.read();
|
||||
|
||||
if !components.is_empty() {
|
||||
debug!("--entity {:?}, components {}", entity, components.len());
|
||||
}
|
||||
for (component, type_registration) in components {
|
||||
let mut entity_mut = world.entity_mut(entity);
|
||||
for (component, type_registration) in components {
|
||||
debug!(
|
||||
"------adding {} {:?}",
|
||||
component.get_represented_type_info().unwrap().type_path(),
|
||||
component
|
||||
);
|
||||
type_registration
|
||||
|
||||
{
|
||||
let mut entity_mut = world.entity_mut(entity);
|
||||
type_registration
|
||||
.data::<ReflectComponent>()
|
||||
.unwrap()
|
||||
.insert(&mut entity_mut, &*component); // TODO: how can we insert any additional components "by hand" here ?
|
||||
.expect("Unable to reflect component")
|
||||
.insert(&mut entity_mut, &*component, &type_registry); // TODO: how can we insert any additional components "by hand" here ?
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,7 +113,7 @@ pub fn ronstring_to_reflect_component(
|
||||
println!("serialized Component {}", serialized);*/
|
||||
|
||||
debug!("component data ron string {}", ron_string);
|
||||
let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()).unwrap();
|
||||
let mut deserializer = ron::Deserializer::from_str(ron_string.as_str()).expect("deserialzer should have been generated from string");
|
||||
let reflect_deserializer = UntypedReflectDeserializer::new(type_registry);
|
||||
let component = reflect_deserializer
|
||||
.deserialize(&mut deserializer)
|
||||
@ -126,7 +126,6 @@ pub fn ronstring_to_reflect_component(
|
||||
|
||||
debug!("component {:?}", component);
|
||||
debug!("real type {:?}", component.get_represented_type_info());
|
||||
|
||||
components.push((component, type_registration.clone()));
|
||||
debug!("found type registration for {}", capitalized_type_name);
|
||||
} else {
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "bevy_gltf_save_load"
|
||||
version = "0.2.1"
|
||||
version = "0.3.0"
|
||||
authors = ["Mark 'kaosat-dev' Moissette"]
|
||||
description = "Save & load your bevy games"
|
||||
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
|
||||
@ -14,8 +14,9 @@ license = "MIT OR Apache-2.0"
|
||||
workspace = true
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
|
||||
[dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
bevy_gltf_blueprints = "0.7"
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
#bevy_gltf_blueprints = "0.7"
|
||||
bevy_gltf_blueprints = { path = "../bevy_gltf_blueprints" }
|
||||
|
@ -34,8 +34,8 @@ Here's a minimal usage example:
|
||||
```toml
|
||||
# Cargo.toml
|
||||
[dependencies]
|
||||
bevy="0.12"
|
||||
bevy_gltf_save_load = "0.1"
|
||||
bevy="0.13"
|
||||
bevy_gltf_save_load = "0.3"
|
||||
bevy_gltf_blueprints = "0.6" // also needed
|
||||
```
|
||||
|
||||
@ -141,8 +141,8 @@ take a look at the [example]('https://github.com/kaosat-dev/Blender_bevy_compone
|
||||
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
bevy_gltf_save_load = "0.1"
|
||||
bevy_gltf_blueprints = "0.6" // also needed, as bevy_gltf_save_load does not re-export it at this time
|
||||
bevy_gltf_save_load = "0.3"
|
||||
bevy_gltf_blueprints = "0.8" // also needed, as bevy_gltf_save_load does not re-export it at this time
|
||||
|
||||
```
|
||||
|
||||
@ -299,8 +299,9 @@ The main branch is compatible with the latest Bevy release, while the branch `be
|
||||
Compatibility of `bevy_gltf_save_load` versions:
|
||||
| `bevy_gltf_save_load` | `bevy` |
|
||||
| :-- | :-- |
|
||||
| `0.1 ` | `0.12` |
|
||||
| branch `main` | `0.12` |
|
||||
| `0.3 ` | `0.13` |
|
||||
| `0.1 - 0.2` | `0.12` |
|
||||
| branch `main` | `0.13` |
|
||||
| branch `bevy_main` | `main` |
|
||||
|
||||
|
||||
|
@ -92,15 +92,15 @@ impl Plugin for SaveLoadPlugin {
|
||||
Update,
|
||||
(unload_world, apply_deferred, load_game)
|
||||
.chain()
|
||||
.run_if(resource_exists::<LoadRequested>())
|
||||
.run_if(not(resource_exists::<LoadFirstStageDone>()))
|
||||
.run_if(resource_exists::<LoadRequested>)
|
||||
.run_if(not(resource_exists::<LoadFirstStageDone>))
|
||||
.in_set(LoadingSet::Load),
|
||||
)
|
||||
.add_systems(
|
||||
Update,
|
||||
(load_static, apply_deferred, cleanup_loaded_scene)
|
||||
.chain()
|
||||
.run_if(resource_exists::<LoadFirstStageDone>())
|
||||
.run_if(resource_exists::<LoadFirstStageDone>)
|
||||
// .run_if(in_state(AppState::LoadingGame))
|
||||
.in_set(LoadingSet::Load),
|
||||
);
|
||||
|
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "bevy_registry_export"
|
||||
version = "0.1.1"
|
||||
version = "0.2.0"
|
||||
authors = ["Mark 'kaosat-dev' Moissette", "Pascal 'Killercup' Hertleif"]
|
||||
description = "Allows you to define [Bevy](https://bevyengine.org/) components direclty inside gltf files and instanciate the components on the Bevy side."
|
||||
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
|
||||
@ -11,11 +11,11 @@ edition = "2021"
|
||||
license = "MIT OR Apache-2.0"
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||
|
||||
[dependencies]
|
||||
bevy = { version = "0.12", default-features = false, features = ["bevy_scene"] }
|
||||
bevy_reflect = { version = "0.12.1", default-features = false }
|
||||
bevy_app = { version = "0.12.1", default-features = false, features = ["bevy_reflect"] }
|
||||
bevy_ecs = { version = "0.12.1", default-features = false, features = ["bevy_reflect"] }
|
||||
bevy = { version = "0.13", default-features = false, features = ["bevy_scene"] }
|
||||
bevy_reflect = { version = "0.13", default-features = false }
|
||||
bevy_app = { version = "0.13", default-features = false, features = ["bevy_reflect"] }
|
||||
bevy_ecs = { version = "0.13", default-features = false, features = ["bevy_reflect"] }
|
||||
serde_json = "1.0.108"
|
@ -17,8 +17,8 @@ Here's a minimal usage example:
|
||||
```toml
|
||||
# Cargo.toml
|
||||
[dependencies]
|
||||
bevy="0.12"
|
||||
bevy_registry_export = "0.1"
|
||||
bevy="0.13"
|
||||
bevy_registry_export = "0.2"
|
||||
```
|
||||
|
||||
```rust no_run
|
||||
@ -44,7 +44,7 @@ take a look at the [example]('https://github.com/kaosat-dev/Blender_bevy_compone
|
||||
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
||||
|
||||
```toml
|
||||
bevy_registry_export = "0.1"
|
||||
bevy_registry_export = "0.2"
|
||||
|
||||
```
|
||||
|
||||
@ -112,8 +112,9 @@ The main branch is compatible with the latest Bevy release, while the branch `be
|
||||
Compatibility of `bevy_registry_export` versions:
|
||||
| `bevy_registry_export` | `bevy` | `bevy_components (Blender add-on)` |
|
||||
| :-- | :-- |:-- |
|
||||
| `0.1 ` | `0.12` | `0.1.0` |
|
||||
| branch `main` | `0.12` | `0.1.0` |
|
||||
| `0.1 ` | `0.13` | `0.1 - 0.2` |
|
||||
| `0.1 ` | `0.12` | `0.1 - 0.2` |
|
||||
| branch `main` | `0.13` | `0.1.0` |
|
||||
| branch `bevy_main` | `main` | `n/a` |
|
||||
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
[toolchain]
|
||||
channel = '1.75.0'
|
||||
channel = '1.76.0'
|
||||
|
Loading…
Reference in New Issue
Block a user