mirror of
https://github.com/aelurum/AssetStudio.git
synced 2025-07-14 02:54:16 -04:00
- export mesh deformers with dummies or bones
- FBX code re-arranged to get object count - changed the way FBX ASCII lines are split at every ~2000 chars - added option to export tangents - fixed a problem with treeview continuous search
This commit is contained in:
42
Unity Studio/Unity Classes/Transform.cs
Normal file
42
Unity Studio/Unity Classes/Transform.cs
Normal file
@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace Unity_Studio
|
||||
{
|
||||
public class Transform
|
||||
{
|
||||
public PPtr m_GameObject = new PPtr();
|
||||
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 Transform(AssetPreloadData preloadData)
|
||||
{
|
||||
var sourceFile = preloadData.sourceFile;
|
||||
var a_Stream = preloadData.sourceFile.a_Stream;
|
||||
a_Stream.Position = preloadData.Offset;
|
||||
|
||||
if (sourceFile.platform == -2)
|
||||
{
|
||||
uint m_ObjectHideFlags = a_Stream.ReadUInt32();
|
||||
PPtr m_PrefabParentObject = sourceFile.ReadPPtr();
|
||||
PPtr m_PrefabInternal = sourceFile.ReadPPtr();
|
||||
}
|
||||
|
||||
m_GameObject = sourceFile.ReadPPtr();
|
||||
m_LocalRotation = new float[] { a_Stream.ReadSingle(), a_Stream.ReadSingle(), a_Stream.ReadSingle(), a_Stream.ReadSingle() };
|
||||
m_LocalPosition = new float[] { a_Stream.ReadSingle(), a_Stream.ReadSingle(), a_Stream.ReadSingle() };
|
||||
m_LocalScale = new float[] { a_Stream.ReadSingle(), a_Stream.ReadSingle(), a_Stream.ReadSingle() };
|
||||
int m_ChildrenCount = a_Stream.ReadInt32();
|
||||
for (int j = 0; j < m_ChildrenCount; j++)
|
||||
{
|
||||
m_Children.Add(sourceFile.ReadPPtr());
|
||||
}
|
||||
m_Father = sourceFile.ReadPPtr();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user