-
-
Notifications
You must be signed in to change notification settings - Fork 1k
Let the user pick which animation stack to import in an fbx #1977
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
Conversation
Code changes look fine. Since this is modifying the public API of the animation asset, does this scale to any other format than FBX? If so, we probably need to file an issue to get this implemented for other model importers. If not, we need to add to the property description that this is a special case for FBX and the value is ignored for other file types. Maybe even it would make sense to call it |
I totally forgot about other formats! I'll get that added. Ideally I feel like the importer would have a nice little dropdown with the names of all the animations, or at least limited to valid indices. Not sure how I'd implement that with the UI framework, the only dropdowns I've seen have been bound to the names of a hardcoded enum and that would probably be more annoying than an integer field. |
Isn't it possible to just import all and create the appropriate number of animation assets according to the names of the animations? |
Yeah, I think that would be possible. Maybe with a way to skip certain animations if you want, since my use case is just to use the 2nd animation and ignore the first, lol. Not sure if the names have uniqueness enforced. If they don't the index may need to be used to keep it consistent across imports. That being said my usage is probably a bit niche since I would bet I'm the only one working with stride who is using 3DS Max... and I'm upholding as my ideal, how 3DS Max handles files with multiple animations (a way to pick which animation is imported). But hey, the scope for that is very small XD |
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.
Looks good. One more comment about XML comment.
Hopefully this is a simple first step towards importing multiple animation assets.
/// Index for FbxAnimStack. | ||
/// </summary> | ||
/// <userdoc> | ||
/// Index of animation to import if multiple are present in the FBX file |
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.
Can you adjust those comments, now that they're not FBX specific?
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.
Done! Yeah, I think something like the way material import from fbx is handled is very feasible.
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.
@adrsch Did you not push after saying "Done"?
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.
Oh... yeah I did forget to push. Oops...
…imationStack is supported by non-FBX formats
Looks good, a nice first step towards importing multiple at once. |
PR Details
If multiple animation stacks are present in an fbx, let the user choose the index to import.
Description
This only allows it to be set after the asset is initially created and imported. Also, the index is clamped so it doesn't break if you set something out of bounds.
Tested with a mixamo animation, since they set everything in the 2nd stack and a t-pose in the first.
Related Issue
Motivation and Context
Types of changes
Checklist