mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-22 11:50:53 +00:00
chore(): minor tweaks (#8)
* relaxed bevy version requirements to work with all v0.11.xx versions & the dependency between blueprints & components crate * bevy_gltf_blueprints: added a more clear warning message for the random timing/ no children in scene issue * docs(crates): modified the install instruction to be patch version agnostic
This commit is contained in:
parent
4d09d17614
commit
0cd7d5d53b
14
Cargo.lock
generated
14
Cargo.lock
generated
@ -721,15 +721,17 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_gltf_blueprints"
|
name = "bevy_gltf_blueprints"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy",
|
"bevy",
|
||||||
"bevy_gltf_components 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"bevy_gltf_components 0.1.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_gltf_components"
|
name = "bevy_gltf_components"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9e39a0250b75ec5cfbe5b56f0348da8b08da433ec4e31ebb1cae6ae5fe4d26ae"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy",
|
"bevy",
|
||||||
"ron",
|
"ron",
|
||||||
@ -738,9 +740,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bevy_gltf_components"
|
name = "bevy_gltf_components"
|
||||||
version = "0.1.1"
|
version = "0.1.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "680276f556c9caf53a32ec0604f9aa4ae336c506bec40d34f6daa33f32a22f13"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bevy",
|
"bevy",
|
||||||
"ron",
|
"ron",
|
||||||
@ -755,7 +755,7 @@ dependencies = [
|
|||||||
"bevy_asset_loader",
|
"bevy_asset_loader",
|
||||||
"bevy_editor_pls",
|
"bevy_editor_pls",
|
||||||
"bevy_gltf_blueprints",
|
"bevy_gltf_blueprints",
|
||||||
"bevy_gltf_components 0.1.1",
|
"bevy_gltf_components 0.1.3",
|
||||||
"bevy_rapier3d",
|
"bevy_rapier3d",
|
||||||
"rand",
|
"rand",
|
||||||
"ron",
|
"ron",
|
||||||
|
@ -12,14 +12,14 @@ members = [
|
|||||||
|
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bevy="0.11.2"
|
bevy="0.11"
|
||||||
bevy_rapier3d = { version = "0.22.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] }
|
bevy_rapier3d = { version = "0.22.0", features = [ "serde-serialize", "debug-render-3d", "enhanced-determinism"] }
|
||||||
bevy_editor_pls = { git="https://github.com/jakobhellermann/bevy_editor_pls.git" }
|
bevy_editor_pls = { git="https://github.com/jakobhellermann/bevy_editor_pls.git" }
|
||||||
bevy_asset_loader = { version = "0.17.0", features = ["standard_dynamic_assets" ]} #version = "0.16",
|
bevy_asset_loader = { version = "0.17.0", features = ["standard_dynamic_assets" ]} #version = "0.16",
|
||||||
rand = "0.8.5"
|
rand = "0.8.5"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = { version = "0.11.2", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
bevy = { version = "0.11", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||||
bevy_gltf_components = { path = "crates/bevy_gltf_components" }
|
bevy_gltf_components = { path = "crates/bevy_gltf_components" }
|
||||||
bevy_gltf_blueprints = { path = "crates/bevy_gltf_blueprints" }
|
bevy_gltf_blueprints = { path = "crates/bevy_gltf_blueprints" }
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bevy_gltf_blueprints"
|
name = "bevy_gltf_blueprints"
|
||||||
version = "0.1.1"
|
version = "0.1.2"
|
||||||
authors = ["Mark 'kaosat-dev' Moissette"]
|
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."
|
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"
|
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
|
||||||
@ -11,8 +11,8 @@ edition = "2021"
|
|||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bevy="0.11.2"
|
bevy = { version = "0.11", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation"] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy_gltf_components = "0.1.1"
|
bevy_gltf_components = "0.1"
|
||||||
bevy = { version = "0.11.2", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation"] }
|
bevy = { version = "0.11", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf", "bevy_animation"] }
|
||||||
|
@ -22,8 +22,8 @@ Here's a minimal usage example:
|
|||||||
```toml
|
```toml
|
||||||
# Cargo.toml
|
# Cargo.toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy="0.11.2"
|
bevy="0.11"
|
||||||
bevy_gltf_blueprints = { version = "0.1.1"}
|
bevy_gltf_blueprints = { version = "0.1"}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -61,7 +61,7 @@ fn spawn_blueprint(
|
|||||||
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
bevy_gltf_blueprints = "0.1.1"
|
bevy_gltf_blueprints = "0.1"
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use `cargo add`:
|
Or use `cargo add`:
|
||||||
|
@ -21,7 +21,7 @@ pub(crate) struct SpawnedRootProcessed;
|
|||||||
/// this system updates the first (and normally only) child of a scene flaged SpawnedRoot
|
/// this system updates the first (and normally only) child of a scene flaged SpawnedRoot
|
||||||
/// - adds a name based on parent component (spawned scene) which is named on the scene name/prefab to be instanciated
|
/// - adds a name based on parent component (spawned scene) which is named on the scene name/prefab to be instanciated
|
||||||
/// - adds the initial physics impulse (FIXME: we would need to add a temporary physics component to those who do not have it)
|
/// - adds the initial physics impulse (FIXME: we would need to add a temporary physics component to those who do not have it)
|
||||||
// FIXME: updating hierarchy does not work in all cases ! this is sadly dependant on the structure of the exported blend data, disablin for now
|
// FIXME: updating hierarchy does not work in all cases ! this is sadly dependant on the structure of the exported blend data
|
||||||
// - blender root-> object with properties => WORKS
|
// - blender root-> object with properties => WORKS
|
||||||
// - scene instance -> does not work
|
// - scene instance -> does not work
|
||||||
// it might be due to how we add components to the PARENT item in gltf to components
|
// it might be due to how we add components to the PARENT item in gltf to components
|
||||||
@ -57,12 +57,14 @@ pub(crate) fn update_spawned_root_first_child(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
for (scene_instance, children, name, parent, original) in unprocessed_entities.iter() {
|
for (scene_instance, children, name, parent, original) in unprocessed_entities.iter() {
|
||||||
println!("children of scene {:?}", children);
|
//
|
||||||
if children.len() == 0 {
|
if children.len() == 0 {
|
||||||
|
warn!("timing issue ! no children found, please restart your bevy app (bug being investigated)");
|
||||||
|
// println!("children of scene {:?}", children);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// the root node is the first & normally only child inside a scene, it is the one that has all relevant components
|
// the root node is the first & normally only child inside a scene, it is the one that has all relevant components
|
||||||
let root_entity = children.first().unwrap(); //FIXME: and what about childless ones ??
|
let root_entity = children.first().unwrap(); //FIXME: and what about childless ones ?? => should not be possible normally
|
||||||
// let root_entity_data = all_children.get(*root_entity).unwrap();
|
// let root_entity_data = all_children.get(*root_entity).unwrap();
|
||||||
|
|
||||||
// fixme : randomization should be controlled via parameters, perhaps even the seed could be specified ?
|
// fixme : randomization should be controlled via parameters, perhaps even the seed could be specified ?
|
||||||
@ -117,7 +119,6 @@ pub(crate) fn update_spawned_root_first_child(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// cleans up dynamically spawned scenes so that they get despawned if they have no more children
|
/// cleans up dynamically spawned scenes so that they get despawned if they have no more children
|
||||||
// FIXME: this can run too early , and since withouth_children matches not yet completed scene instances, boom, it removes components/children before they can be used
|
|
||||||
pub(crate) fn cleanup_scene_instances(
|
pub(crate) fn cleanup_scene_instances(
|
||||||
scene_instances: Query<(Entity, &Children), With<SpawnedRootProcessed>>,
|
scene_instances: Query<(Entity, &Children), With<SpawnedRootProcessed>>,
|
||||||
without_children: Query<Entity, (With<SpawnedRootProcessed>, Without<Children>)>,// if there are not children left, bevy removes Children ?
|
without_children: Query<Entity, (With<SpawnedRootProcessed>, Without<Children>)>,// if there are not children left, bevy removes Children ?
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "bevy_gltf_components"
|
name = "bevy_gltf_components"
|
||||||
version = "0.1.1"
|
version = "0.1.3"
|
||||||
authors = ["Mark 'kaosat-dev' Moissette"]
|
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."
|
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"
|
homepage = "https://github.com/kaosat-dev/Blender_bevy_components_workflow"
|
||||||
@ -11,9 +11,9 @@ edition = "2021"
|
|||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
bevy="0.11.2"
|
bevy = { version = "0.11", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy = { version = "0.11.2", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
bevy = { version = "0.11", default-features = false, features = ["bevy_asset", "bevy_scene", "bevy_gltf"] }
|
||||||
serde = "1.0.188"
|
serde = "1.0.188"
|
||||||
ron="0.8.1"
|
ron = "0.8.1"
|
||||||
|
@ -23,8 +23,8 @@ Here's a minimal usage example:
|
|||||||
```toml
|
```toml
|
||||||
# Cargo.toml
|
# Cargo.toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
bevy="0.11.2"
|
bevy="0.11"
|
||||||
bevy_gltf_components = { version = "0.1.1"}
|
bevy_gltf_components = { version = "0.1"}
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -60,7 +60,7 @@ bevy_gltf_components = { version = "0.1.1"}
|
|||||||
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
Add the following to your `[dependencies]` section in `Cargo.toml`:
|
||||||
|
|
||||||
```toml
|
```toml
|
||||||
bevy_gltf_components = "0.1.1"
|
bevy_gltf_components = "0.1"
|
||||||
```
|
```
|
||||||
|
|
||||||
Or use `cargo add`:
|
Or use `cargo add`:
|
||||||
|
Loading…
Reference in New Issue
Block a user