示例#1
0
        public AnimTree(ExportEntry export)
        {
            pcc    = export.FileRef;
            Export = export;
            data   = export.Data;

            PropertyCollection props = export.GetProperties();

            NodeTotalWeight         = props.GetPropOrDefault <FloatProperty>("NodeTotalWeight").Value;
            ComposePrePassBoneNames = props.GetPropOrDefault <ArrayProperty <NameProperty> >("ComposePrePassBoneNames").Select(n => n.Value.Instanced).ToList();
            AnimGroups = props.GetPropOrDefault <ArrayProperty <StructProperty> >("AnimGroups").Select(prop => new AnimGroupEntry
            {
                GroupName        = prop.GetPropOrDefault <NameProperty>("GroupName").Value.Instanced,
                RateScale        = prop.GetPropOrDefault <FloatProperty>("RateScale").Value,
                SynchPctPosition = prop.GetPropOrDefault <FloatProperty>("SynchPctPosition").Value
            }).ToList();
            SkelControlLists = props.GetPropOrDefault <ArrayProperty <StructProperty> >("SkelControlLists").Select(prop => new SkelControlListEntry
            {
                BoneName    = prop.GetPropOrDefault <NameProperty>("BoneName").Value.Instanced,
                ControlHead = prop.GetPropOrDefault <ObjectProperty>("ControlHead").Value
            }).ToList();
            Children = props.GetPropOrDefault <ArrayProperty <StructProperty> >("Children").Select(prop => new ChildrenEntry
            {
                Name            = prop.GetPropOrDefault <NameProperty>("Name").Value.Instanced,
                Weight          = prop.GetPropOrDefault <FloatProperty>("Weight").Value,
                Anim            = prop.GetPropOrDefault <ObjectProperty>("Anim").Value,
                bIsAdditive     = prop.GetPropOrDefault <BoolProperty>("bIsAdditive").Value,
                bMirrorSkeleton = prop.GetPropOrDefault <BoolProperty>("bMirrorSkeleton").Value
            }).ToList();
        }
        public BioAnimSetData(ExportEntry export)
        {
            pcc    = export.FileRef;
            Export = export;
            data   = export.Data;
            PropertyCollection props = export.GetProperties();

            bAnimRotationOnly       = props.GetPropOrDefault <BoolProperty>("bAnimRotationOnly").Value;
            TrackBoneNames          = props.GetPropOrDefault <ArrayProperty <NameProperty> >("TrackBoneNames").Select(n => n.Value.Instanced).ToList();
            UseTranslationBoneNames = props.GetPropOrDefault <ArrayProperty <NameProperty> >("UseTranslationBoneNames").Select(n => n.Value.Instanced).ToList();
        }
示例#3
0
        public AnimSet(ExportEntry export)
        {
            pcc    = export.FileRef;
            Export = export;
            data   = export.Data;

            PropertyCollection props = export.GetProperties();

            m_pBioAnimSetData = props.GetPropOrDefault <ObjectProperty>("m_pBioAnimSetData").Value;
            if (pcc.IsUExport(m_pBioAnimSetData))
            {
                SetData = new BioAnimSetData(pcc.GetUExport(m_pBioAnimSetData));
            }
            PreviewSkelMeshName = props.GetPropOrDefault <NameProperty>("PreviewSkelMeshName").Value.Instanced;
            Sequences           = props.GetPropOrDefault <ArrayProperty <ObjectProperty> >("Sequences").Select(prop => prop.Value).ToList();
        }
示例#4
0
        public AnimNodeSlot(ExportEntry export)
        {
            pcc    = export.FileRef;
            Export = export;
            data   = export.Data;

            PropertyCollection props = export.GetProperties();

            NodeName = props.GetPropOrDefault <NameProperty>("NodeName").Value.Instanced;
            bSkipTickWhenZeroWeight = props.GetPropOrDefault <BoolProperty>("bSkipTickWhenZeroWeight").Value;
            NodeTotalWeight         = props.GetPropOrDefault <FloatProperty>("NodeTotalWeight").Value;
            Children = props.GetPropOrDefault <ArrayProperty <StructProperty> >("Children").Select(prop => new ChildrenEntry
            {
                Name            = prop.GetPropOrDefault <NameProperty>("Name").Value.Instanced,
                Weight          = prop.GetPropOrDefault <FloatProperty>("Weight").Value,
                Anim            = prop.GetPropOrDefault <ObjectProperty>("Anim").Value,
                bIsAdditive     = prop.GetPropOrDefault <BoolProperty>("bIsAdditive").Value,
                bMirrorSkeleton = prop.GetPropOrDefault <BoolProperty>("bMirrorSkeleton").Value
            }).ToList();
        }
示例#5
0
        public AnimSequence(ExportEntry export)
        {
            pcc    = export.FileRef;
            Export = export;
            data   = export.Data;

            Props = export.GetProperties();

            RotationCompressionFormat = Props.GetPropOrDefault <EnumProperty>("RotationCompressionFormat").Value.Instanced;
            KeyEncodingFormat         = Props.GetPropOrDefault <EnumProperty>("KeyEncodingFormat").Value.Instanced;
            bIsAdditive             = Props.GetPropOrDefault <BoolProperty>("bIsAdditive").Value;
            bNoLoopingInterpolation = Props.GetPropOrDefault <BoolProperty>("bNoLoopingInterpolation").Value;
            SequenceName            = Props.GetPropOrDefault <NameProperty>("SequenceName").Value.Instanced;
            m_pBioAnimSetData       = Props.GetPropOrDefault <ObjectProperty>("m_pBioAnimSetData").Value;
            SequenceLength          = Props.GetPropOrDefault <FloatProperty>("SequenceLength").Value;
            RateScale = Props.GetProp <FloatProperty>("RateScale")?.Value ?? 1;
            NumFrames = Props.GetPropOrDefault <IntProperty>("NumFrames").Value;
            ReadTrackOffsets(Props.GetPropOrDefault <ArrayProperty <IntProperty> >("CompressedTrackOffsets").Select(p => p.Value).ToArray());
            ReadCompressedBlob();
            Rate = NumFrames / SequenceLength * RateScale;
        }