mirror of
https://github.com/kaosat-dev/Blender_bevy_components_workflow.git
synced 2024-11-26 21:37:01 +00:00
feat(blueprints): experimenting with the bevy side of things
This commit is contained in:
parent
e53098db72
commit
6f93b6e55a
@ -120,6 +120,10 @@ impl Plugin for BlueprintsPlugin {
|
|||||||
.register_type::<MaterialInfo>()
|
.register_type::<MaterialInfo>()
|
||||||
.register_type::<SpawnHere>()
|
.register_type::<SpawnHere>()
|
||||||
.register_type::<Animations>()
|
.register_type::<Animations>()
|
||||||
|
.register_type::<BlueprintsList>()
|
||||||
|
.register_type::<Vec<String>>()
|
||||||
|
.register_type::<HashMap<String,Vec<String>>>()
|
||||||
|
|
||||||
.insert_resource(BluePrintsConfig {
|
.insert_resource(BluePrintsConfig {
|
||||||
format: self.format,
|
format: self.format,
|
||||||
library_folder: self.library_folder.clone(),
|
library_folder: self.library_folder.clone(),
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use bevy::{gltf::Gltf, prelude::*};
|
use bevy::{gltf::Gltf, prelude::*, utils::HashMap};
|
||||||
|
|
||||||
use crate::{Animations, BluePrintsConfig};
|
use crate::{Animations, BluePrintsConfig};
|
||||||
|
|
||||||
@ -46,6 +46,11 @@ pub struct AddToGameWorld;
|
|||||||
/// helper component, just to transfer child data
|
/// helper component, just to transfer child data
|
||||||
pub(crate) struct OriginalChildren(pub Vec<Entity>);
|
pub(crate) struct OriginalChildren(pub Vec<Entity>);
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Component, Reflect, Default, Debug)]
|
||||||
|
#[reflect(Component)]
|
||||||
|
pub struct BlueprintsList(pub HashMap<String,Vec<String>>);
|
||||||
|
|
||||||
/// main spawning functions,
|
/// main spawning functions,
|
||||||
/// * also takes into account the already exisiting "override" components, ie "override components" > components from blueprint
|
/// * also takes into account the already exisiting "override" components, ie "override components" > components from blueprint
|
||||||
pub(crate) fn spawn_from_blueprints(
|
pub(crate) fn spawn_from_blueprints(
|
||||||
|
Loading…
Reference in New Issue
Block a user