-
Notifications
You must be signed in to change notification settings - Fork 428
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
Conversation
ousttrue
commented
Jun 1, 2021
- AnimationClip の Extract を実装
- IAnimationImporter を単純化。必要に応じて再拡張
22183b7
to
541ece5
Compare
rebase しました。 |
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.
だいたいよさそう
|
||
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); |
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.
よさそう
#endif | ||
break; | ||
} | ||
animation.name = string.Format("{0}({1})", originalName, j++); |
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.
同じ名前のアニメーションは hoge
hoge2
hoge3
... となる
{ | ||
var gltfAnimation = GLTF.animations[i]; | ||
AnimationClip clip = default; | ||
if (_externalObjectMap.TryGetValue(new SubAssetKey(typeof(AnimationClip), gltfAnimation.name), out UnityEngine.Object value)) |
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.
一応 SubAssetKey
の中身に typeof(AnimationClip)
を定義しておいたほうがいいかも(ホワイトリスト的な)