-
Notifications
You must be signed in to change notification settings - Fork 411
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
[vrm1.0] impl remove scaling #2177
Conversation
@@ -15,20 +15,20 @@ namespace UniGLTF.MeshUtility | |||
/// UnityEngine.Object を継承したクラスのフィールドに ユーザー定義 struct を配置する。 | |||
/// 持ち主の SerializedObject を経由して EditorGUILayout.PropertyField してる。 | |||
/// </summary> | |||
[CustomEditor(typeof(MeshProcessDialog), true)] |
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.
gltf の meshutility を rename。中身は変えていない
@@ -10,7 +10,6 @@ namespace UniGLTF | |||
public static class TopMenu | |||
{ | |||
private const string UserGltfMenuPrefix = UniGLTFVersion.MENU; | |||
private const string UserMeshUtilityPrefix = UniGLTFVersion.MENU + "/Mesh Utility"; | |||
private const string DevelopmentMenuPrefix = UniGLTFVersion.MENU + "/Development"; |
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.
Menu が深かったので浅くしてみた
static (GameObject, Dictionary<Transform, Transform>) NormalizeHierarchy(GameObject go, CreateAvatarFunc createAvatar) | ||
public static (GameObject, Dictionary<Transform, Transform>) CreateNormalizedHierarchy(GameObject go, | ||
bool removeScaling = true, | ||
bool removeRotation = true) |
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.
新機能。ヒエラルキーからの Scale/Rotation の除去を
Scale だけの除去ができるように追加した。
@@ -271,5 +272,42 @@ public static bool GetHumanDescription(UnityEngine.Object target, ref HumanDescr | |||
return false; | |||
} | |||
#endif | |||
|
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.
コールバックで渡していた定型処理を関数化
@@ -0,0 +1,96 @@ | |||
using System.Collections.Generic; |
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.
新規。vrm1 mesh utlity ダイアログ
using UniHumanoid; | ||
using UnityEngine; | ||
|
||
namespace UniVRM10 |
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.
新規。vrm1 mesh utility のロジック。
なるべく Runtime、
なるべく Gltf層、
というように後で整理して共通化する予定。
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.
ついでに Runtime から実行できると嬉しい(願望)
@@ -271,5 +272,42 @@ public static bool GetHumanDescription(UnityEngine.Object target, ref HumanDescr | |||
return false; | |||
} | |||
#endif | |||
|
|||
public static void AddAnimator(GameObject _src, |
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.
やってる内容としては CreateAvatarAndAddAnimatorComponent ってところかな。
Avatar は Animator とは無関係に作れるので、その処理は
Avatrar CreateAvatar(~~~)
として関数分けておいた方が読みやすいかもしれません。
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.
確かに。次の更新に入れます
#2169 の部品。
という作業順を予定。
freeze => integrate => split というパイプラインを予定しています。
freeze の一部としてヒエラルキーからの scale/rotation 除去を実装しました。
vrm0 の該当部分とコードを共有しました。