-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
1,206 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
"dependencies": { | ||
"com.unity.burst": "1.4.11", | ||
"com.unity.collab-proxy": "1.6.0", | ||
"com.unity.ide.rider": "1.2.1", | ||
"com.unity.ide.visualstudio": "2.0.9", | ||
"com.unity.ide.vscode": "1.2.3", | ||
"com.unity.mathematics": "1.2.6", | ||
"com.unity.nuget.newtonsoft-json": "3.2.1", | ||
"com.unity.test-framework": "1.1.27", | ||
"com.unity.testtools.codecoverage": "1.2.4", | ||
"com.unity.textmeshpro": "2.1.6", | ||
"com.unity.timeline": "1.2.18", | ||
"com.unity.ugui": "1.0.0", | ||
"com.unity.xr.oculus.standalone": "2.38.4", | ||
"com.unity.xr.openvr.standalone": "2.0.5", | ||
"com.unity.modules.ai": "1.0.0", | ||
"com.unity.modules.androidjni": "1.0.0", | ||
"com.unity.modules.animation": "1.0.0", | ||
"com.unity.modules.assetbundle": "1.0.0", | ||
"com.unity.modules.audio": "1.0.0", | ||
"com.unity.modules.cloth": "1.0.0", | ||
"com.unity.modules.director": "1.0.0", | ||
"com.unity.modules.imageconversion": "1.0.0", | ||
"com.unity.modules.imgui": "1.0.0", | ||
"com.unity.modules.jsonserialize": "1.0.0", | ||
"com.unity.modules.particlesystem": "1.0.0", | ||
"com.unity.modules.physics": "1.0.0", | ||
"com.unity.modules.physics2d": "1.0.0", | ||
"com.unity.modules.screencapture": "1.0.0", | ||
"com.unity.modules.terrain": "1.0.0", | ||
"com.unity.modules.terrainphysics": "1.0.0", | ||
"com.unity.modules.tilemap": "1.0.0", | ||
"com.unity.modules.ui": "1.0.0", | ||
"com.unity.modules.uielements": "1.0.0", | ||
"com.unity.modules.umbra": "1.0.0", | ||
"com.unity.modules.unityanalytics": "1.0.0", | ||
"com.unity.modules.unitywebrequest": "1.0.0", | ||
"com.unity.modules.unitywebrequestassetbundle": "1.0.0", | ||
"com.unity.modules.unitywebrequestaudio": "1.0.0", | ||
"com.unity.modules.unitywebrequesttexture": "1.0.0", | ||
"com.unity.modules.unitywebrequestwww": "1.0.0", | ||
"com.unity.modules.vehicles": "1.0.0", | ||
"com.unity.modules.video": "1.0.0", | ||
"com.unity.modules.vr": "1.0.0", | ||
"com.unity.modules.wind": "1.0.0", | ||
"com.unity.modules.xr": "1.0.0", | ||
"com.vrmc.vrmshaders": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRMShaders#v0.116.0", | ||
"com.vrmc.gltf": "https://github.com/vrm-c/UniVRM.git?path=/Assets/UniGLTF#v0.116.0", | ||
"com.vrmc.univrm": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM#v0.116.0", | ||
"com.vrmc.vrm": "https://github.com/vrm-c/UniVRM.git?path=/Assets/VRM10#v0.116.0" | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
/* | ||
* Copyright (c) 2023 chocopoi | ||
* | ||
* This file is part of DressingFramework. | ||
* | ||
* DressingFramework is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. | ||
* | ||
* DressingFramework is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along with DressingFramework. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
namespace Chocopoi.DressingFramework.Proxy | ||
{ | ||
internal class VRMSpringBoneProxy : IDynamicsProxy | ||
{ | ||
public static readonly System.Type VRMSpringBoneType = DKEditorUtils.FindType("VRM.VRMSpringBone"); | ||
|
||
private Transform _rootTransform; | ||
|
||
public VRMSpringBoneProxy(Component component, Transform rootTransform) | ||
{ | ||
Component = component; | ||
_rootTransform = rootTransform; | ||
if (VRMSpringBoneType == null) | ||
{ | ||
throw new System.Exception("No VRMSpringBone component is found in this project. It is required to process VRMSpringBone-based dynamics."); | ||
} | ||
} | ||
|
||
public static List<Transform> GetRootBones(Component component) | ||
{ | ||
return (List<Transform>)VRMSpringBoneType.GetField("RootBones").GetValue(component); | ||
} | ||
|
||
public Component Component { get; set; } | ||
|
||
public Transform Transform | ||
{ | ||
get { return Component.transform; } | ||
} | ||
|
||
public GameObject GameObject | ||
{ | ||
get { return Component.gameObject; } | ||
} | ||
|
||
public Transform RootTransform | ||
{ | ||
get { return _rootTransform; } | ||
set | ||
{ | ||
var rootBones = GetRootBones(Component); | ||
if (!rootBones.Remove(_rootTransform)) | ||
{ | ||
Debug.LogWarning("[DressingFramework] The VRM Spring Bone does not have the original root transform. Unable to remove."); | ||
} | ||
rootBones.Add(value); | ||
_rootTransform = value; | ||
} | ||
} | ||
|
||
public List<Transform> IgnoreTransforms | ||
{ | ||
get | ||
{ | ||
Debug.LogWarning("[DressingFramework] VRM Spring Bone does not support IgnoreTransform, but this API was called!"); | ||
return new List<Transform>(); | ||
} | ||
set { Debug.LogWarning("[DressingFramework] VRM Spring Bone does not support IgnoreTransform, but this API was called!"); } | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
457 changes: 457 additions & 0 deletions
457
Tests~/Editor/Resources/DKEditorUtilsTest/DKTest_VRMSpringBoneAvatar.prefab
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
Tests~/Editor/Resources/DKEditorUtilsTest/DKTest_VRMSpringBoneAvatar.prefab.meta
Oops, something went wrong.
536 changes: 536 additions & 0 deletions
536
Tests~/Editor/Resources/DKEditorUtilsTest/DKTest_VRMSpringBoneWearable.prefab
Large diffs are not rendered by default.
Oops, something went wrong.
7 changes: 7 additions & 0 deletions
7
Tests~/Editor/Resources/DKEditorUtilsTest/DKTest_VRMSpringBoneWearable.prefab.meta
Oops, something went wrong.
This file contains 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