-
Notifications
You must be signed in to change notification settings - Fork 412
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 refactor mesh integration #2180
[vrm1.0] impl refactor mesh integration #2180
Conversation
@@ -90,7 +90,7 @@ public static bool Execute(GameObject src, bool onlyBlendShapeRenderers) | |||
// write mesh asset. | |||
foreach (var result in results) | |||
{ | |||
var mesh = result.IntegratedRenderer.sharedMesh; |
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.
result には Renderer 乗せない(sharedMesh, sharedMaterials, bones を保持する)
@@ -144,5 +145,33 @@ static void RemoveScaleAndRotationRecursive(Transform src, Transform dst, Dictio | |||
|
|||
return (normalized, boneMap); | |||
} | |||
|
|||
public static void WriteBackResult(GameObject go, GameObject normalized, Dictionary<Transform, Transform> boneMap) |
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.
copy せずにヒエラルキーを直接改変するために作った。
TODO: undo に対応する。
@@ -232,7 +236,24 @@ public void Push(SkinnedMeshRenderer renderer) | |||
} | |||
} | |||
|
|||
public MeshIntegrationResult Integrate(MeshEnumerateOption onlyBlendShapeRenderers) | |||
public static MeshIntegrationResult Integrate(MeshIntegrationGroup group, bool useBlendShape) |
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.
MeshEnumerateOption を見て‘Renderer を収集する責務を外に移動。
@@ -306,5 +306,30 @@ public static bool GetHumanDescription(UnityEngine.Object target, ref HumanDescr | |||
avatar.name = "created"; | |||
return avatar; | |||
} | |||
|
|||
public static Avatar RecreateAvatar(Animator 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.
親子関係は変わっていないが transform が変わったヒエラルキーに対して
avatar を再作成する関数。
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.
using に関してだけ
@@ -1,9 +1,11 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Net.WebSockets; |
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.
おそらく Reference ミス?コンパイル通らなくなる場合ありそうなので消してもらえると
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Runtime.CompilerServices; |
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.
こちらも不要な using?
どうでもいいものならいいんですが CompilerServices は特定環境でマズそう
#2169 の部品
List を統合するシンプルなインタフェースに改変。
exclude や統合対象を調整する責務は呼び出し側に移動した。