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

Feature/animation extract #998

Merged
merged 3 commits into from
Jun 3, 2021
Merged

Conversation

ousttrue
Copy link
Contributor

@ousttrue ousttrue commented Jun 1, 2021

  • AnimationClip の Extract を実装
  • IAnimationImporter を単純化。必要に応じて再拡張

@ousttrue ousttrue requested a review from Santarh June 1, 2021 10:38
@ousttrue ousttrue added this to the v0.76 milestone Jun 1, 2021
@ousttrue ousttrue force-pushed the feature/animation_extract branch from 22183b7 to 541ece5 Compare June 3, 2021 05:11
@ousttrue
Copy link
Contributor Author

ousttrue commented Jun 3, 2021

rebase しました。

Copy link
Contributor

@Santarh Santarh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

だいたいよさそう


namespace UniGLTF
{
public interface IAnimationImporter
{
List<AnimationClip> Import(glTF gltf, GameObject root, List<Transform> nodes, Axes invertAxis);
AnimationClip Import(glTF gltf, int i, Axes invertAxis);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

よさそう

#endif
break;
}
animation.name = string.Format("{0}({1})", originalName, j++);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同じ名前のアニメーションは hoge hoge2 hoge3 ... となる

{
var gltfAnimation = GLTF.animations[i];
AnimationClip clip = default;
if (_externalObjectMap.TryGetValue(new SubAssetKey(typeof(AnimationClip), gltfAnimation.name), out UnityEngine.Object value))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

一応 SubAssetKey の中身に typeof(AnimationClip) を定義しておいたほうがいいかも(ホワイトリスト的な)

@ousttrue ousttrue merged commit 1cec8cf into vrm-c:master Jun 3, 2021
@ousttrue ousttrue deleted the feature/animation_extract branch October 27, 2021 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants