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
Removed the skeleton
property from the .animationset
resource.
#7990
Conversation
@@ -180,7 +175,7 @@ static void loadModelAnimations(ArrayList<ModelImporter.Bone> bones, AnimationSe | |||
|
|||
// Currently, by design choice, each file must only contain one animation. | |||
// Our current approach is to choose the longest animation (to eliminate target poses etc) | |||
ModelUtil.loadAnimations(scene, bones, animBuilder, animId, localAnimationIds); | |||
ModelUtil.loadAnimations(scene, animBuilder, animId, localAnimationIds); |
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.
We no longer require the bones when loading an animation.
we load it as-is, and instead do animation track/bone matching at runtime.
String boneName = bone.getSourceId(); | ||
if (bi == 0 || refIndex == 0) | ||
{ | ||
boneName = "root"; | ||
} | ||
|
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.
Another change after a design discussion with @matgis : Since the root bone is such a unique bone, we wanted to make sure it's always named the same, making it easier for users to import content from various sources.
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.
Editor and .proto
changes look good to me.
(defn register-resource-types [workspace] | ||
(resource-node/register-ddf-resource-type workspace | ||
:ext "animationset" | ||
:icon animation-set-icon | ||
:label "Animation Set" | ||
:load-fn load-animation-set | ||
:sanitize-fn sanitize-animation-set |
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.
+1
We've removed the
skeleton
property from the.animationset
resource.This allows us to better match animation names with bone names at runtime.
The root bone of a skeleton is now also always renamed to
root
, making it easier to use similar code in engine/scripting.Fixes #7712
PR checklist