Skip to content

Commit

Permalink
Merge pull request #1943 from ousttrue/version/v0_108_0
Browse files Browse the repository at this point in the history
UniVRM-0.108.0
  • Loading branch information
ousttrue committed Dec 5, 2022
2 parents 4c0db08 + 92caf36 commit e16dd2f
Show file tree
Hide file tree
Showing 10 changed files with 56 additions and 23 deletions.
4 changes: 2 additions & 2 deletions Assets/UniGLTF/Runtime/UniGLTF/UniGLTFVersion.cs
Expand Up @@ -4,8 +4,8 @@ namespace UniGLTF
public static partial class UniGLTFVersion
{
public const int MAJOR = 2;
public const int MINOR = 43;
public const int MINOR = 44;
public const int PATCH = 0;
public const string VERSION = "2.43.0";
public const string VERSION = "2.44.0";
}
}
Expand Up @@ -7,7 +7,7 @@ public static VRMShaders.PathObject Show(string title, params string[] extension
#if UNITY_STANDALONE_WIN
return VRMShaders.PathObject.FromFullPath(FileDialogForWindows.FileDialog(title, extensions));
#else
Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented.");
UnityEngine.Debug.LogWarning("Non-Windows runtime file dialogs are not yet implemented.");
return default;
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/UniGLTF/package.json
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.gltf",
"version": "0.107.0",
"version": "0.108.0",
"displayName": "UniGLTF",
"description": "GLTF importer and exporter",
"unity": "2019.4",
Expand All @@ -11,7 +11,7 @@
"name": "VRM Consortium"
},
"dependencies": {
"com.vrmc.vrmshaders": "0.107.0",
"com.vrmc.vrmshaders": "0.108.0",
"com.unity.modules.animation": "1.0.0"
},
"samples": [
Expand Down
4 changes: 2 additions & 2 deletions Assets/VRM/Runtime/Format/VRMVersion.cs
Expand Up @@ -4,8 +4,8 @@ namespace VRM
public static partial class VRMVersion
{
public const int MAJOR = 0;
public const int MINOR = 107;
public const int MINOR = 108;
public const int PATCH = 0;
public const string VERSION = "0.107.0";
public const string VERSION = "0.108.0";
}
}
8 changes: 4 additions & 4 deletions Assets/VRM/Samples~/SimpleViewer/ViewerUI.cs
Expand Up @@ -332,23 +332,23 @@ static IMaterialDescriptorGenerator GetGltfMaterialGenerator(bool useUrp)
{
if (useUrp)
{
return new GltfUrpMaterialDescriptorGenerator();
return new UrpGltfMaterialDescriptorGenerator();
}
else
{
return new GltfMaterialDescriptorGenerator();
return new BuiltInGltfMaterialDescriptorGenerator();
}
}

static IMaterialDescriptorGenerator GetVrmMaterialGenerator(bool useUrp, VRM.glTF_VRM_extensions vrm)
{
if (useUrp)
{
return new VRM.VRMUrpMaterialDescriptorGenerator(vrm);
return new VRM.UrpVrmMaterialDescriptorGenerator(vrm);
}
else
{
return new VRM.VRMMaterialDescriptorGenerator(vrm);
return new VRM.BuiltInVrmMaterialDescriptorGenerator(vrm);
}
}

Expand Down
6 changes: 3 additions & 3 deletions Assets/VRM/package.json
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.univrm",
"version": "0.107.0",
"version": "0.108.0",
"displayName": "VRM",
"description": "VRM importer",
"unity": "2019.4",
Expand All @@ -14,8 +14,8 @@
"name": "VRM Consortium"
},
"dependencies": {
"com.vrmc.vrmshaders": "0.107.0",
"com.vrmc.gltf": "0.107.0",
"com.vrmc.vrmshaders": "0.108.0",
"com.vrmc.gltf": "0.108.0",
"com.unity.ugui": "1.0.0"
},
"samples": [
Expand Down
35 changes: 34 additions & 1 deletion Assets/VRM10/Samples~/VRM10Viewer/VRM10Loaded.cs
Expand Up @@ -126,7 +126,6 @@ public void UpdateControlRigExplicit(Animator src)
/// <summary>
/// from v0.104
/// </summary>
/// <param name="src"></param>
public void UpdateControlRigImplicit(Animator src)
{
var dst = m_controller.GetComponent<Animator>();
Expand Down Expand Up @@ -159,6 +158,40 @@ public void UpdateControlRigImplicit(Animator src)
}
}

/// <summary>
/// from v0.108
/// </summary>
public void UpdateControlRigImplicit(UniHumanoid.Humanoid src)
{
var dst = m_controller.GetComponent<Animator>();

foreach (HumanBodyBones bone in CachedEnum.GetValues<HumanBodyBones>())
{
if (bone == HumanBodyBones.LastBone)
{
continue;
}

var boneTransform = dst.GetBoneTransform(bone);
if (boneTransform == null)
{
continue;
}

var bvhBone = src.GetBoneTransform(bone);
if (bvhBone != null)
{
// set normalized pose
boneTransform.localRotation = bvhBone.localRotation;
if (bone == HumanBodyBones.Hips)
{
// TODO: hips position scaling ?
boneTransform.localPosition = bvhBone.localPosition;
}
}
}
}

public void TPoseControlRig()
{
var controlRig = m_controller.Runtime.ControlRig;
Expand Down
8 changes: 4 additions & 4 deletions Assets/VRM10/Samples~/VRM10Viewer/VRM10ViewerUI.cs
Expand Up @@ -297,23 +297,23 @@ static IMaterialDescriptorGenerator GetVrmMaterialDescriptorGenerator(bool useUr
{
if (useUrp)
{
return new Vrm10UrpMaterialDescriptorGenerator();
return new UrpVrm10MaterialDescriptorGenerator();
}
else
{
return new Vrm10MaterialDescriptorGenerator();
return new BuiltInVrm10MaterialDescriptorGenerator();
}
}

static IMaterialDescriptorGenerator GetMaterialDescriptorGenerator(bool useUrp)
{
if (useUrp)
{
return new GltfUrpMaterialDescriptorGenerator();
return new UrpGltfMaterialDescriptorGenerator();
}
else
{
return new GltfMaterialDescriptorGenerator();
return new BuiltInGltfMaterialDescriptorGenerator();
}
}

Expand Down
6 changes: 3 additions & 3 deletions Assets/VRM10/package.json
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.vrm",
"version": "0.107.0",
"version": "0.108.0",
"displayName": "VRM-1.0",
"description": "VRM-1.0 importer",
"unity": "2019.4",
Expand All @@ -14,8 +14,8 @@
"name": "VRM Consortium"
},
"dependencies": {
"com.vrmc.vrmshaders": "0.107.0",
"com.vrmc.gltf": "0.107.0"
"com.vrmc.vrmshaders": "0.108.0",
"com.vrmc.gltf": "0.108.0"
},
"samples": [
{
Expand Down
2 changes: 1 addition & 1 deletion Assets/VRMShaders/package.json
@@ -1,6 +1,6 @@
{
"name": "com.vrmc.vrmshaders",
"version": "0.107.0",
"version": "0.108.0",
"displayName": "VRM Shaders",
"description": "VRM Shaders",
"unity": "2019.4",
Expand Down

0 comments on commit e16dd2f

Please sign in to comment.