diff --git a/testing/bevy_example/expected_screenshot.png b/testing/bevy_example/expected_screenshot.png index 94da691..43569fc 100644 Binary files a/testing/bevy_example/expected_screenshot.png and b/testing/bevy_example/expected_screenshot.png differ diff --git a/testing/bevy_example/src/game/mod.rs b/testing/bevy_example/src/game/mod.rs index a38b573..50ffffc 100644 --- a/testing/bevy_example/src/game/mod.rs +++ b/testing/bevy_example/src/game/mod.rs @@ -19,16 +19,10 @@ fn start_game(mut next_app_state: ResMut>) { } -#[derive(Debug)] -struct Node { - value: String, - children: Vec, -} - // if the export from Blender worked correctly, we should have animations (simplified here by using AnimationPlayerLink) -// if the export from Blender worked correctly, we should have an Entity called "Cylinder" that has two components: UnitTest, TupleTestF32 // if the export from Blender worked correctly, we should have an Entity called "Blueprint4_nested" that has a child called "Blueprint3" that has a "BlueprintName" component with value Blueprint3 // if the export from Blender worked correctly, we should have a blueprints_list +// if the export from Blender worked correctly, we should have the correct tree of entities #[allow(clippy::too_many_arguments)] fn validate_export( parents: Query<&Parent>, @@ -36,7 +30,6 @@ fn validate_export( names: Query<&Name>, blueprints: Query<(Entity, &Name, &BlueprintName)>, animation_player_links: Query<(Entity, &AnimationPlayerLink)>, - exported_cylinder: Query<(Entity, &Name, &UnitTest, &TupleTestF32)>, empties_candidates: Query<(Entity, &Name, &GlobalTransform)>, blueprints_list: Query<(Entity, &BlueprintsList)>, @@ -80,11 +73,10 @@ fn validate_export( } } - // generate parent/child tree + // generate parent/child "tree" if !root.is_empty() { let root = root.single(); let mut tree: HashMap> = HashMap::new(); - // println!("root {}", root.1); for child in children.iter_descendants(root.0) { let child_name:String = names.get(child).map_or(String::from("no_name"), |e| e.to_string() ); //|e| e.to_string(), || "no_name".to_string()); diff --git a/tools/gltf_auto_export/helpers/helpers_scenes.py b/tools/gltf_auto_export/helpers/helpers_scenes.py index ded9753..039a41f 100644 --- a/tools/gltf_auto_export/helpers/helpers_scenes.py +++ b/tools/gltf_auto_export/helpers/helpers_scenes.py @@ -68,6 +68,7 @@ def copy_animation_data(source, target): bpy.ops.object.make_links_data(type='ANIMATION') # we add an "animated" flag component target['Animated'] = f'(animations: {animations})'.replace("'", '"') #'(animations: [])' # + """print("copying animation data for", source.name, target.animation_data) properties = [p.identifier for p in source.animation_data.bl_rna.properties if not p.is_readonly] for prop in properties: diff --git a/tools/gltf_auto_export/tests/test_bevy_integration.py b/tools/gltf_auto_export/tests/test_bevy_integration.py index b64f237..8de7f73 100644 --- a/tools/gltf_auto_export/tests/test_bevy_integration.py +++ b/tools/gltf_auto_export/tests/test_bevy_integration.py @@ -30,6 +30,10 @@ def setup_data(request): diagnostics_file_path = os.path.join(root_path, "bevy_diagnostics.json") if os.path.exists(diagnostics_file_path): os.remove(diagnostics_file_path) + + hierarchy_file_path = os.path.join(root_path, "bevy_hierarchy.json") + if os.path.exists(hierarchy_file_path): + os.remove(hierarchy_file_path) screenshot_observed_path = os.path.join(root_path, "screenshot.png") if os.path.exists(screenshot_observed_path):