Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sliced 3D animations that are saved as external resources aren't processed by the scene importer bone renamer #82753

Closed
dpalais opened this issue Oct 3, 2023 · 3 comments · Fixed by #83036

Comments

@dpalais
Copy link
Contributor

dpalais commented Oct 3, 2023

Godot version

4.2 dev f5696c3

System information

Linux

Issue description

Assuming the fix from #82300 is in in order to save the animation slices to files, the resulting animation resources are saved prematurely and don't feature remapped bones.

It seems to be the case because animation slices are saved during _pre_fix_animations, before the skeleton renamer plugin has a chance to process the animations in _post_fix_node.

ResourceSceneImporter::import(...)
{
/// ...
	_pre_fix_animations(scene, scene, node_data, animation_data, fps);
	_post_fix_node(scene, scene, collision_map, occluder_arrays, scanned_meshes, node_data, material_data, animation_data, fps, apply_root ? root_scale : 1.0);
	_post_fix_animations(scene, scene, node_data, animation_data, fps);
/// ...
}

Steps to reproduce

  1. Apply the fix from Fix save to file failed when slicing 3d animation #82300
  2. Save an sliced animation to external resources.
  3. The external animation resources use the unremapped skeleton/bone names.

Minimal reproduction project

Not available due to constraints to redistribution of third party resources.

@jsjtxietian
Copy link
Contributor

jsjtxietian commented Oct 4, 2023

Well, first I think my fix is fine for that specific saving issue.

And for this issue, I think maybe we can post the _save_animation_to_file call ? Or can we make the whole process of animation slice happen in _post_fix_animations ? cc @Juankz

@jsjtxietian
Copy link
Contributor

jsjtxietian commented Oct 9, 2023

@dpalais I move the related function to _post_fix_animations, since I don't have a MRP, can you help test this code ?
Many thanks.

@dpalais
Copy link
Contributor Author

dpalais commented Oct 11, 2023

@jsjtxietian It works as expected. The sliced animations are saved after the bone renamer has processed them, and after my own animation processing scene import plugin has processed them too.

@YuriSizov YuriSizov added this to the 4.2 milestone Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants