コード例 #1
0
 public FCurveMetaData(FArchive Ar, FAnimPhysObjectVersion.Type FrwAniVer)
 {
     Type        = new FAnimCurveType(Ar);
     LinkedBones = Ar.ReadArray(() => Ar.ReadFName());
     if (FrwAniVer >= FAnimPhysObjectVersion.Type.AddLODToCurveMetaData)
     {
         MaxLOD = Ar.Read <byte>();
     }
 }
コード例 #2
0
        public FSkinWeightProfilesData(FArchive Ar)
        {
            var length = Ar.Read <int>();

            OverrideData = new Dictionary <FName, FRuntimeSkinWeightProfileData>();
            for (var i = 0; i < length; i++)
            {
                OverrideData[Ar.ReadFName()] = new FRuntimeSkinWeightProfileData(Ar);
            }
        }
コード例 #3
0
ファイル: FMeshBoneInfo.cs プロジェクト: FabianFG/CUE4Parse
        public FMeshBoneInfo(FArchive Ar)
        {
            Name        = Ar.ReadFName();
            ParentIndex = Ar.Read <int>();

            if (Ar.Ver < EUnrealEngineObjectUE4Version.REFERENCE_SKELETON_REFACTOR)
            {
                Ar.Read <FColor>();
            }
        }
コード例 #4
0
 public FPointerTableBase(FArchive Ar) // LoadFromArchive
 {
     NumDependencies = Ar.Read <int>();
     for (var i = 0; i < NumDependencies; ++i)
     {
         var Name            = Ar.ReadFName();
         var SavedLayoutSize = Ar.Read <uint>();
         var SavedLayoutHash = new FSHAHash(Ar);
     }
 }
コード例 #5
0
        public FSmartNameMapping(FArchive Ar)
        {
            var frwObjVer = FFrameworkObjectVersion.Get(Ar);
            var frwAniVer = FAnimPhysObjectVersion.Get(Ar);

            if (frwObjVer >= FFrameworkObjectVersion.Type.SmartNameRefactor)
            {
                if (frwAniVer < FAnimPhysObjectVersion.Type.SmartNameRefactorForDeterministicCooking)
                {
                    var mapLength = Ar.Read <int>();
                    GuidMap = new Dictionary <FName, FGuid>(mapLength);
                    for (var i = 0; i < mapLength; i++)
                    {
                        GuidMap[Ar.ReadFName()] = Ar.Read <FGuid>();
                    }
                }
            }
            else if (Ar.Ver >= UE4Version.VER_UE4_SKELETON_ADD_SMARTNAMES)
            {
                Ar.Read <ushort>();
                var mapLength = Ar.Read <int>();
                UidMap = new Dictionary <ushort, FName>(mapLength);
                for (int i = 0; i < mapLength; i++)
                {
                    UidMap[Ar.Read <ushort>()] = Ar.ReadFName();
                }
            }

            if (frwObjVer >= FFrameworkObjectVersion.Type.MoveCurveTypesToSkeleton)
            {
                var mapLength = Ar.Read <int>();
                CurveMetaDataMap = new Dictionary <FName, FCurveMetaData>(mapLength);
                for (var i = 0; i < mapLength; i++)
                {
                    CurveMetaDataMap[Ar.ReadFName()] = new FCurveMetaData(Ar, frwAniVer);
                }
            }
        }
コード例 #6
0
ファイル: FSmartName.cs プロジェクト: FabianFG/CUE4Parse
        public FSmartName(FArchive Ar)
        {
            DisplayName = Ar.ReadFName();
            if (FAnimPhysObjectVersion.Get(Ar) < FAnimPhysObjectVersion.Type.RemoveUIDFromSmartNameSerialize)
            {
                Ar.Read <ushort>(); // TempUID
            }

            // only save if it's editor build and not cooking
            if (FAnimPhysObjectVersion.Get(Ar) < FAnimPhysObjectVersion.Type.SmartNameRefactorForDeterministicCooking)
            {
                Ar.Read <FGuid>(); // TempGUID
            }
        }
コード例 #7
0
ファイル: FRigVMRegister.cs プロジェクト: FabianFG/CUE4Parse
 public FRigVMRegister(FArchive Ar)
 {
     Type              = Ar.Read <ERigVMRegisterType>();
     ByteIndex         = Ar.Read <uint>();
     ElementSize       = Ar.Read <ushort>();
     ElementCount      = Ar.Read <ushort>();
     SliceIndex        = Ar.Read <ushort>();
     SliceCount        = Ar.Read <ushort>();
     AlignmentBytes    = Ar.Read <byte>();
     TrailingBytes     = Ar.Read <ushort>();
     Name              = Ar.ReadFName();
     ScriptStructIndex = Ar.Read <int>();
     bIsArray          = Ar.ReadBoolean();
     bIsDynamic        = Ar.ReadBoolean();
 }
コード例 #8
0
        public FUniqueNetIdRepl(FArchive Ar)
        {
            var size = Ar.Read <int>();

            if (size > 0)
            {
                var type     = Ar.ReadFName();
                var contents = Ar.ReadString();
                UniqueNetId = new FUniqueNetId(type.Text, contents);
            }
            else
            {
                UniqueNetId = null;
            }
        }
コード例 #9
0
 public FMaterialParameterInfo(FArchive Ar)
 {
     Name        = Ar.ReadFName();
     Association = Ar.Read <EMaterialParameterAssociation>();
     Index       = Ar.Read <int>();
 }
コード例 #10
0
        public FMemoryImageResult(FArchive Ar) // LoadFromArchive
        {
            var bUseNewFormat = Ar.Versions["ShaderMap.UseNewCookedFormat"];

            if (bUseNewFormat)
            {
                LayoutParameters = new FPlatformTypeLayoutParameters(Ar);
            }

            var FrozenSize   = Ar.Read <uint>();
            var FrozenObject = Ar.ReadBytes((int)FrozenSize);

            if (bUseNewFormat)
            {
                PointerTable = new FPointerTableBase(Ar);
            }

            var NumVTables      = Ar.Read <uint>();
            var NumScriptNames  = Ar.Read <uint>();
            var NumMinimalNames = Ar.Read <uint>();

            for (var i = 0; i < NumVTables; ++i)
            {
                var TypeNameHash = Ar.Read <ulong>();
                var NumPatches   = Ar.Read <uint>();

                for (var PatchIndex = 0; PatchIndex < NumPatches; ++PatchIndex)
                {
                    var VTableOffset = Ar.Read <uint>();
                    var Offset       = Ar.Read <uint>();
                }
            }

            for (var i = 0; i < NumScriptNames; ++i)
            {
                var Name       = Ar.ReadFName();
                var NumPatches = Ar.Read <uint>();

                for (var PatchIndex = 0; PatchIndex < NumPatches; ++PatchIndex)
                {
                    var Offset = Ar.Read <uint>();
                }
            }

            for (var i = 0; i < NumMinimalNames; ++i)
            {
                var Name       = Ar.ReadFName();
                var NumPatches = Ar.Read <uint>();

                for (var PatchIndex = 0; PatchIndex < NumPatches; ++PatchIndex)
                {
                    var Offset = Ar.Read <uint>();
                }
            }

            if (!bUseNewFormat)
            {
                ShaderMapPointerTable = new FShaderMapPointerTable(Ar);
                PointerTable          = new FPointerTableBase(Ar);
            }
        }
コード例 #11
0
 public FStaticParameterBase(FArchive Ar)
 {
     ParameterInfo = FRenderingObjectVersion.Get(Ar) < FRenderingObjectVersion.Type.MaterialAttributeLayerParameters ? new FMaterialParameterInfo {
         Name = Ar.ReadFName()
     } : new FMaterialParameterInfo(Ar);
 }