bug fix
This commit is contained in:
@@ -4,9 +4,6 @@ using UnityEditor;
|
|||||||
class SelectAllOfTagHash : ScriptableWizard
|
class SelectAllOfTagHash : ScriptableWizard
|
||||||
{
|
{
|
||||||
|
|
||||||
string tagName = "ExampleTag";
|
|
||||||
|
|
||||||
|
|
||||||
[MenuItem("Hash/Get Hash")]
|
[MenuItem("Hash/Get Hash")]
|
||||||
static void SelectAllOfTagHashWizard()
|
static void SelectAllOfTagHashWizard()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,10 +3,6 @@ using UnityEditor;
|
|||||||
|
|
||||||
class SelectAllOfTagSingle : ScriptableWizard
|
class SelectAllOfTagSingle : ScriptableWizard
|
||||||
{
|
{
|
||||||
|
|
||||||
string tagName = "ExampleTag";
|
|
||||||
|
|
||||||
|
|
||||||
[MenuItem("Example/Get")]
|
[MenuItem("Example/Get")]
|
||||||
static void SelectAllOfTagSingleWizard()
|
static void SelectAllOfTagSingleWizard()
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
namespace LibMMD.Model
|
namespace LibMMD.Model
|
||||||
{
|
{
|
||||||
public class Joint
|
public class MMDJoint
|
||||||
{
|
{
|
||||||
public Joint()
|
public MMDJoint()
|
||||||
{
|
{
|
||||||
AssociatedRigidBodyIndex = new int[2];
|
AssociatedRigidBodyIndex = new int[2];
|
||||||
}
|
}
|
||||||
@@ -15,7 +15,7 @@ namespace LibMMD.Model
|
|||||||
public Bone[] Bones { get; set; }
|
public Bone[] Bones { get; set; }
|
||||||
public Morph[] Morphs { get; set; }
|
public Morph[] Morphs { get; set; }
|
||||||
public MMDRigidBody[] Rigidbodies { get; set; }
|
public MMDRigidBody[] Rigidbodies { get; set; }
|
||||||
public Joint[] Joints { get; set; }
|
public MMDJoint[] Joints { get; set; }
|
||||||
|
|
||||||
public void Normalize()
|
public void Normalize()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ namespace LibMMD.Reader
|
|||||||
private static void ReadConstraints(BinaryReader reader, RawMMDModel model)
|
private static void ReadConstraints(BinaryReader reader, RawMMDModel model)
|
||||||
{
|
{
|
||||||
var constraintNum = reader.ReadUInt32();
|
var constraintNum = reader.ReadUInt32();
|
||||||
model.Joints = new Model.Joint[constraintNum];
|
model.Joints = new Model.MMDJoint[constraintNum];
|
||||||
for (var i = 0; i < constraintNum; ++i)
|
for (var i = 0; i < constraintNum; ++i)
|
||||||
{
|
{
|
||||||
var constraint = new Model.Joint();
|
var constraint = new Model.MMDJoint();
|
||||||
constraint.Name = MMDReaderUtil.ReadStringFixedLength(reader, 20, Tools.JapaneseEncoding);
|
constraint.Name = MMDReaderUtil.ReadStringFixedLength(reader, 20, Tools.JapaneseEncoding);
|
||||||
constraint.AssociatedRigidBodyIndex[0] = reader.ReadInt32();
|
constraint.AssociatedRigidBodyIndex[0] = reader.ReadInt32();
|
||||||
constraint.AssociatedRigidBodyIndex[1] = reader.ReadInt32();
|
constraint.AssociatedRigidBodyIndex[1] = reader.ReadInt32();
|
||||||
|
|||||||
@@ -49,10 +49,10 @@ namespace LibMMD.Reader
|
|||||||
private static void ReadJoints(BinaryReader reader, RawMMDModel model, PmxConfig pmxConfig)
|
private static void ReadJoints(BinaryReader reader, RawMMDModel model, PmxConfig pmxConfig)
|
||||||
{
|
{
|
||||||
var constraintNum = reader.ReadInt32();
|
var constraintNum = reader.ReadInt32();
|
||||||
model.Joints = new Model.Joint[constraintNum];
|
model.Joints = new Model.MMDJoint[constraintNum];
|
||||||
for (var i = 0; i < constraintNum; ++i)
|
for (var i = 0; i < constraintNum; ++i)
|
||||||
{
|
{
|
||||||
var joint = new Model.Joint
|
var joint = new Model.MMDJoint
|
||||||
{
|
{
|
||||||
Name = MMDReaderUtil.ReadSizedString(reader, pmxConfig.Encoding),
|
Name = MMDReaderUtil.ReadSizedString(reader, pmxConfig.Encoding),
|
||||||
NameEn = MMDReaderUtil.ReadSizedString(reader, pmxConfig.Encoding)
|
NameEn = MMDReaderUtil.ReadSizedString(reader, pmxConfig.Encoding)
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ namespace LibMMD.Unity3D
|
|||||||
int jointCount = model.RawMMDModel.Joints.Length;
|
int jointCount = model.RawMMDModel.Joints.Length;
|
||||||
for (int i = 0; i < jointCount; i++)
|
for (int i = 0; i < jointCount; i++)
|
||||||
{
|
{
|
||||||
LibMMD.Model.Joint mmdJoint = model.RawMMDModel.Joints[i];
|
LibMMD.Model.MMDJoint mmdJoint = model.RawMMDModel.Joints[i];
|
||||||
int jointFromBoneIndex = model.RawMMDModel.Rigidbodies[mmdJoint.AssociatedRigidBodyIndex[0]].AssociatedBoneIndex;
|
int jointFromBoneIndex = model.RawMMDModel.Rigidbodies[mmdJoint.AssociatedRigidBodyIndex[0]].AssociatedBoneIndex;
|
||||||
int jointToBoneIndex = model.RawMMDModel.Rigidbodies[mmdJoint.AssociatedRigidBodyIndex[1]].AssociatedBoneIndex;
|
int jointToBoneIndex = model.RawMMDModel.Rigidbodies[mmdJoint.AssociatedRigidBodyIndex[1]].AssociatedBoneIndex;
|
||||||
if (bonesCount <= jointFromBoneIndex || bonesCount <= jointToBoneIndex) { continue; }
|
if (bonesCount <= jointFromBoneIndex || bonesCount <= jointToBoneIndex) { continue; }
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 5edb55cbe49fa3a469c01786155b6ebc
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Text;
|
||||||
|
using LibMMD.Material;
|
||||||
|
using LibMMD.Model;
|
||||||
|
using LibMMD.Util;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
namespace LibMMD.Writer
|
||||||
|
{
|
||||||
|
public class PMXWriter
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 640dfd217ee9f8344a2f6988e9ebcc52
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
@@ -1,7 +1,5 @@
|
|||||||
using CriWare;
|
using CriWareFormats;
|
||||||
using CriWareFormats;
|
|
||||||
using Gallop;
|
using Gallop;
|
||||||
using MiniJSON;
|
|
||||||
using NAudio.Wave;
|
using NAudio.Wave;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
@@ -12,8 +10,6 @@ using System.Linq;
|
|||||||
using UmaMusumeAudio;
|
using UmaMusumeAudio;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using UnityEngine.SceneManagement;
|
using UnityEngine.SceneManagement;
|
||||||
using static UnityEngine.Rendering.VirtualTexturing.Debugging;
|
|
||||||
using Random = UnityEngine.Random;
|
|
||||||
|
|
||||||
public class UmaViewerBuilder : MonoBehaviour
|
public class UmaViewerBuilder : MonoBehaviour
|
||||||
{
|
{
|
||||||
@@ -1563,7 +1559,7 @@ public class UmaViewerBuilder : MonoBehaviour
|
|||||||
|
|
||||||
var firsehead = CurrentUMAContainer.Head;
|
var firsehead = CurrentUMAContainer.Head;
|
||||||
var origin_faceDriven = firsehead.GetComponent<AssetHolder>()._assetTable["facial_target"] as FaceDrivenKeyTarget;
|
var origin_faceDriven = firsehead.GetComponent<AssetHolder>()._assetTable["facial_target"] as FaceDrivenKeyTarget;
|
||||||
var faceDriven = new FaceDrivenKeyTarget();
|
var faceDriven = ScriptableObject.CreateInstance<FaceDrivenKeyTarget>();
|
||||||
DeepCopy.CopyValues(origin_faceDriven, faceDriven);
|
DeepCopy.CopyValues(origin_faceDriven, faceDriven);
|
||||||
var earDriven = firsehead.GetComponent<AssetHolder>()._assetTable["ear_target"] as DrivenKeyTarget;
|
var earDriven = firsehead.GetComponent<AssetHolder>()._assetTable["ear_target"] as DrivenKeyTarget;
|
||||||
var faceOverride = firsehead.GetComponent<AssetHolder>()._assetTable["face_override"] as FaceOverrideData;
|
var faceOverride = firsehead.GetComponent<AssetHolder>()._assetTable["face_override"] as FaceOverrideData;
|
||||||
|
|||||||
Reference in New Issue
Block a user