chore(Blenvy:Bevy): more cleanups

This commit is contained in:
kaosat.dev 2024-07-08 13:39:57 +02:00
parent 70931ee163
commit 2b8c239fe8
5 changed files with 8 additions and 11 deletions

View File

@ -52,7 +52,7 @@ impl Default for BluePrintBundle {
pub struct BlueprintsPlugin { pub struct BlueprintsPlugin {
/// Automatically generate aabbs for the blueprints root objects /// Automatically generate aabbs for the blueprints root objects
pub aabbs: bool, pub aabbs: bool,
/// /// use library of materials
pub material_library: bool, pub material_library: bool,
} }

View File

@ -230,7 +230,7 @@ pub(crate) fn blueprints_check_assets_loading(
assets_to_load.all_loaded = true; assets_to_load.all_loaded = true;
// println!("LOADING: DONE for ALL assets of {:?} (instance of {}), preparing for spawn", entity_name, blueprint_info.path); // println!("LOADING: DONE for ALL assets of {:?} (instance of {}), preparing for spawn", entity_name, blueprint_info.path);
blueprint_events.send(BlueprintEvent::AssetsLoaded { blueprint_events.send(BlueprintEvent::AssetsLoaded {
entity: entity, entity,
blueprint_name: blueprint_info.name.clone(), blueprint_name: blueprint_info.name.clone(),
blueprint_path: blueprint_info.path.clone(), blueprint_path: blueprint_info.path.clone(),
}); });
@ -344,8 +344,8 @@ pub(crate) fn blueprints_assets_ready(
}, },
OriginalChildren(original_children), OriginalChildren(original_children),
BlueprintAnimations { BlueprintAnimations {
// these are animations specific to the inside of the blueprint // these are animations specific to the blueprint
named_animations: named_animations, //gltf.named_animations.clone(), named_animations,
named_indices: animation_indices, named_indices: animation_indices,
graph, graph,
}, },
@ -650,7 +650,7 @@ pub(crate) fn blueprints_finalize_instances(
} }
blueprint_events.send(BlueprintEvent::InstanceReady { blueprint_events.send(BlueprintEvent::InstanceReady {
entity: entity, entity,
blueprint_name: blueprint_info.name.clone(), blueprint_name: blueprint_info.name.clone(),
blueprint_path: blueprint_info.path.clone(), blueprint_path: blueprint_info.path.clone(),
}); });

View File

@ -50,7 +50,7 @@ pub struct BlenderShadowSettings {
pub cascade_size: usize, pub cascade_size: usize,
} }
/// Not all possible Blender ToneMappings are available in Bevy & vice versa /// Not all possible Blender `ToneMappings` are available in Bevy & vice versa
#[derive(Component, Reflect, Default, Debug, PartialEq, Clone)] #[derive(Component, Reflect, Default, Debug, PartialEq, Clone)]
#[reflect(Component)] #[reflect(Component)]
#[non_exhaustive] #[non_exhaustive]

View File

@ -48,11 +48,8 @@ fn find_entity_components(
updated_components.push((component.clone_value(), type_registration)); updated_components.push((component.clone_value(), type_registration));
} }
return (target_entity, updated_components); return (target_entity, updated_components);
//entity_components.insert(target_entity, updated_components);
} else {
return (target_entity, reflect_components);
// entity_components.insert(target_entity, reflect_components);
} }
(target_entity, reflect_components)
} }
/// main function: injects components into each entity in gltf files that have `gltf_extras`, using reflection /// main function: injects components into each entity in gltf files that have `gltf_extras`, using reflection

View File

@ -41,7 +41,7 @@ pub fn export_types(world: &mut World) {
) )
.expect("valid json"); .expect("valid json");
info!("Done exporting registry schema") info!("Done exporting registry schema");
} }
pub fn export_type(reg: &TypeRegistration) -> (String, Value) { pub fn export_type(reg: &TypeRegistration) -> (String, Value) {