-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Import scenes as AnimationLibrary #60177
Conversation
59d3324
to
83bd89a
Compare
1c8dddf
to
1b2783b
Compare
reduz/godot@animation-library-import...V-Sekai:animation-library-gltf I noticed some odd points.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the comments in the post before.
The filesystem swap isn't blocking work on animation retargeting and since @akien-mga and others will be away for a holiday I'll approve. In my testing the scene does seem to be usable as a resource that can be loaded from an animation player.
Added the ability to import scenes as AnimationLibrary * Completes implementation of godotengine/godot-proposals#4296 * Helps if you want to export animations to a separate file (say a GLTF) to avoid re-importing/exporting them every time the model changes. * Helps if you simply want to have animations using a dummy model, which can be shared across multiple models. Creates a secondary scene importer used only for animations. **NOTE**: A new flag for scene importer: EditorSceneFormatImporter.IMPORT_DISCARD_MESHES_AND_MATERIALS has been added, to hint importers that they should skip meshes and animations (and hence make importing faster). It is not implemented in any importer yet, this should be done in a separate PR.
1b2783b
to
6600931
Compare
Should be working now, this happened if you click re-import in the advanced dialog. |
The change to provide the right class looks correct. Not able to compile quickly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good.
It seems a bit weird/uncommon for the Godot codebase to have two different singletons for instances of the same class, but I see how it's convenient here.
@akien-mga There are a couple of cases of the same importer for multiple classes (like LayeredTexture) using a single class, but the singleton is indeed strange. I cant think of a way to better workaround it better to be honest. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested, import is working correctly. Possibly we may need to change later on the dealing with the RESET Track (Context: #60093), but that is no reason to block this PR.
Thanks! |
Added the ability to import scenes as AnimationLibrary
Creates a secondary scene importer used only for animations.
Screens of usage:
Simply choose any scene file and change the import type from Scene to AnimationLibrary:
Then, the resulting file can be imported into an existing animation player as a library:
NOTE: A new flag for scene importer: EditorSceneFormatImporter.IMPORT_DISCARD_MESHES_AND_MATERIALS has been added, to hint importers that they should skip meshes and animations (and hence make importing faster). It is not implemented in any importer yet, this should be done in a separate PR.
Bonus: A couple of bugs fixed in the advanced import settings regarding to option visibility.
bugsquad edit:
Fixes: #60060