Skip to content
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

[vrm10] vrmlib による mesh 処理を gltf/vrm0.x のものと同じものに #2478

Merged
merged 4 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.Linq;
using UniGLTF.Extensions.VRMC_vrm;
using UnityEngine;
using VrmLib;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using VrmLib を減らしていく


namespace UniVRM10
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
using VrmLib;

namespace UniVRM10
{
Expand Down
10 changes: 5 additions & 5 deletions Assets/VRM10/Runtime/IO/ExpressionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ namespace UniVRM10
{
public static class ExpressionExtensions
{
public static MorphTargetBinding? Build10(this MorphTargetBind bind, GameObject root, Vrm10Importer.ModelMap loader, VrmLib.Model model)
public static MorphTargetBinding? Build10(this MorphTargetBind bind, GameObject root, Vrm10Importer importer)
{
if (bind.Node.TryGetValidIndex(model.Nodes.Count, out var nodeIndex))
if (bind.Node.TryGetValidIndex(importer.Nodes.Count, out var nodeIndex))
{
var libNode = model.Nodes[nodeIndex];
if (libNode.MeshGroup == null)
var node = importer.Nodes[nodeIndex];
var smr = node.GetComponent<SkinnedMeshRenderer>();
if (smr == null)
{
return default;
}
var node = loader.Nodes[libNode].transform;
var relativePath = node.RelativePathFrom(root.transform);
return new MorphTargetBinding(relativePath, bind.Index.Value, bind.Weight.Value);
}
Expand Down
307 changes: 0 additions & 307 deletions Assets/VRM10/Runtime/IO/Model/MeshImporterDivided.cs

This file was deleted.

11 changes: 0 additions & 11 deletions Assets/VRM10/Runtime/IO/Model/MeshImporterDivided.cs.meta

This file was deleted.

Loading
Loading