support optimized transform hierarchy
This commit is contained in:
@@ -362,5 +362,10 @@ namespace AssetStudio
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public string FindBonePath(uint hash)
|
||||
{
|
||||
return m_TOS.Find(pair => pair.Key == hash).Value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using SharpDX;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
@@ -7,12 +8,19 @@ namespace AssetStudio
|
||||
{
|
||||
public class Transform
|
||||
{
|
||||
public PPtr m_GameObject = new PPtr();
|
||||
public PPtr m_GameObject;
|
||||
public float[] m_LocalRotation;
|
||||
public float[] m_LocalPosition;
|
||||
public float[] m_LocalScale;
|
||||
public List<PPtr> m_Children = new List<PPtr>();
|
||||
public PPtr m_Father = new PPtr();//can be transform or type 224 (as seen in Minions)
|
||||
public List<PPtr> m_Children;
|
||||
public PPtr m_Father;
|
||||
|
||||
public Transform(Vector3 t, Quaternion q, Vector3 s)
|
||||
{
|
||||
m_LocalPosition = new[] { t.X, t.Y, t.Z };
|
||||
m_LocalRotation = new[] { q.X, q.Y, q.Z, q.W };
|
||||
m_LocalScale = new[] { s.X, s.Y, s.Z };
|
||||
}
|
||||
|
||||
public Transform(AssetPreloadData preloadData)
|
||||
{
|
||||
@@ -24,6 +32,7 @@ namespace AssetStudio
|
||||
m_LocalPosition = new[] { reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle() };
|
||||
m_LocalScale = new[] { reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle() };
|
||||
int m_ChildrenCount = reader.ReadInt32();
|
||||
m_Children = new List<PPtr>(m_ChildrenCount);
|
||||
for (int j = 0; j < m_ChildrenCount; j++)
|
||||
{
|
||||
m_Children.Add(sourceFile.ReadPPtr());
|
||||
|
||||
Reference in New Issue
Block a user