Repository navigation
Unity import: PSXSkinnedObjectExporter with its clips - #226
Merged
Merged
Conversation
ImportedModel::clips lists the .anim files a model import wrote, under file-safe, deduplicated names, and leaves out takes that move no joint, so a clip's place there does not say which take it came from. ImportedModel::clipTakes, beside clips, holds each one's original take name, which the Unity import needs to find the clip a scene names.
The object gets the mesh of the SkinnedMeshRenderer on it or on its first active descendant, and a skin playing its AnimationClips at TargetFPS. A clip inside a model is found by its fileID: the .meta's clipAnimations internalID, else xxh64 of "Type:AnimationClip-><take><n>" (measured with Unity 6000), under Unity's clip name and loop flag. PSXObjectExporters on or under it are skipped, as Unity skips them. No usable clip: the model's own clips play, and the report says so.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #223. The Unity importer now brings over
PSXSkinnedObjectExporter: the mesh from theSkinnedMeshRendereron or under it, the skeleton, and itsAnimationClipsas a skin (TargetFPS, up to 16 clips). A clip's fileID is xxh64 ofType:AnimationClip-><take><k>, or the .meta'sinternalIDwhen it lists clip settings; both match Unity 6000.3 output intests/fixtures/unity-models. Clip names and loop flags follow Unity, aPSXObjectExporterunder a skinned one is skipped as in Unity, and an exporter with no usable clips plays the model's own clips with a report item.Clip frame ranges are not applied yet: a clip cut from part of a take plays the whole take. The import report lists those clips.