Exemplo n.º 1
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = base.ExportYAMLRoot(container);
            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("m_Legacy", GetIsLegacy(container.Version));
            node.Add("m_Compressed", Compressed);
            node.Add("m_UseHighQualityCurve", UseHightQualityCurve);

            AnimationCurves curves = GetAnimationCurves(container.Version, container.Platform);
            node.Add("m_RotationCurves", curves.RotationCurves.ExportYAML(container));
            node.Add("m_CompressedRotationCurves", curves.RotationCurves.ExportYAML(container));
            node.Add("m_EulerCurves", curves.EulerCurves.ExportYAML(container));
            node.Add("m_PositionCurves", curves.PositionCurves.ExportYAML(container));
            node.Add("m_ScaleCurves", curves.ScaleCurves.ExportYAML(container));
            node.Add("m_FloatCurves", curves.FloatCurves.ExportYAML(container));
            node.Add("m_PPtrCurves", curves.PPtrCurves.ExportYAML(container));

            node.Add("m_SampleRate", SampleRate);
            node.Add("m_WrapMode", (int)WrapMode);
            node.Add("m_Bounds", Bounds.ExportYAML(container));
            node.Add("m_ClipBindingConstant", ClipBindingConstant.ExportYAML(container));
            node.Add("m_AnimationClipSettings", MuscleClip.ExportYAML(container));
            node.Add("m_EditorCurves", YAMLSequenceNode.Empty);
            node.Add("m_EulerEditorCurves", YAMLSequenceNode.Empty);
            node.Add("m_HasGenericRootTransform", false);
            node.Add("m_HasMotionFloatCurves", false);
            node.Add("m_GenerateMotionCurves", false);
            node.Add("m_Events", IsReadEvents(container.Version) ? m_events.ExportYAML(container) : YAMLSequenceNode.Empty);

            return(node);
        }
Exemplo n.º 2
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(GetSerializedVersion(container.ExportVersion));
            node.Add(LegacyName, GetLegacy(container.Version));
            node.Add(CompressedName, Compressed);
            node.Add(UseHighQualityCurveName, UseHightQualityCurve);

            AnimationCurves curves = GetAnimationCurves(container.Version, container.Platform);

            node.Add(RotationCurvesName, curves.RotationCurves.ExportYAML(container));
            node.Add(CompressedRotationCurvesName, curves.CompressedRotationCurves.ExportYAML(container));
            node.Add(EulerCurvesName, curves.EulerCurves.ExportYAML(container));
            node.Add(PositionCurvesName, curves.PositionCurves.ExportYAML(container));
            node.Add(ScaleCurvesName, curves.ScaleCurves.ExportYAML(container));
            node.Add(FloatCurvesName, curves.FloatCurves.ExportYAML(container));
            node.Add(PPtrCurvesName, curves.PPtrCurves.ExportYAML(container));

            node.Add(SampleRateName, SampleRate);
            node.Add(WrapModeName, (int)WrapMode);
            node.Add(BoundsName, Bounds.ExportYAML(container));
            node.Add(ClipBindingConstantName, GetClipBindingConstant(container.Version).ExportYAML(container));
            node.Add(AnimationClipSettingsName, MuscleClip.ExportYAML(container));
            node.Add(EditorCurvesName, YAMLSequenceNode.Empty);
            node.Add(EulerEditorCurvesName, YAMLSequenceNode.Empty);
            node.Add(HasGenericRootTransformName, HasGenericRootTransform);
            node.Add(HasMotionFloatCurvesName, HasMotionFloatCurves);
            node.Add(GenerateMotionCurvesName, false);
            node.Add(EventsName, IsReadEvents(container.Version) ? m_events.ExportYAML(container) : YAMLSequenceNode.Empty);

            return(node);
        }
Exemplo n.º 3
0
        protected override YAMLMappingNode ExportYAMLRoot()
        {
            YAMLMappingNode node = base.ExportYAMLRoot();

            node.AddSerializedVersion(SerializedVersion);
            node.Add("m_Legacy", IsReadAnimationType ? true : Legacy);
            node.Add("m_Compressed", Compressed);
            node.Add("m_UseHighQualityCurve", UseHightQualityCurve);

            if (IsExportGenericData)
            {
                ExportGenericData(node);
            }
            else
            {
                node.Add("m_RotationCurves", m_rotationCurves.ExportYAML());
                node.Add("m_CompressedRotationCurves", m_compressedRotationCurves.ExportYAML());
                if (IsReadEulerCurves)
                {
                    node.Add("m_EulerCurves", m_eulerCurves.ExportYAML());
                }
                else
                {
                    node.Add("m_EulerCurves", YAMLMappingNode.Empty);
                }
                node.Add("m_PositionCurves", m_positionCurves.ExportYAML());
                node.Add("m_ScaleCurves", m_scaleCurves.ExportYAML());
                node.Add("m_FloatCurves", m_floatCurves.ExportYAML());
            }

            node.Add("m_PPtrCurves", m_PPtrCurves.ExportYAML());
            node.Add("m_SampleRate", SampleRate);
            node.Add("m_WrapMode", WrapMode);
            node.Add("m_Bounds", Bounds.ExportYAML());
            node.Add("m_ClipBindingConstant", ClipBindingConstant.ExportYAML());
            node.Add("m_AnimationClipSettings", MuscleClip.ExportYAML());
            node.Add("m_EditorCurves", YAMLSequenceNode.Empty);
            node.Add("m_EulerEditorCurves", YAMLSequenceNode.Empty);
            node.Add("m_HasGenericRootTransform", false);
            node.Add("m_HasMotionFloatCurves", false);
            node.Add("m_GenerateMotionCurves", false);
            node.Add("m_Events", m_events.ExportYAML());

            return(node);
        }
Exemplo n.º 4
0
        protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = base.ExportYAMLRoot(exporter);
            node.AddSerializedVersion(GetSerializedVersion(exporter.Version));
            node.Add("m_Legacy", IsReadLegacy(exporter.Version) ? Legacy : true);
            node.Add("m_Compressed", Compressed);
            node.Add("m_UseHighQualityCurve", UseHightQualityCurve);

            if (IsExportGenericData(exporter.Version))
            {
                ExportGenericData(exporter, node);
            }
            else
            {
                node.Add("m_RotationCurves", IsReadCurves(exporter.Version) ? m_rotationCurves.ExportYAML(exporter) : YAMLSequenceNode.Empty);
                node.Add("m_CompressedRotationCurves", IsReadCompressedRotationCurves(exporter.Version) ? m_compressedRotationCurves.ExportYAML(exporter) : YAMLSequenceNode.Empty);
                node.Add("m_EulerCurves", IsReadEulerCurves(exporter.Version) ? m_eulerCurves.ExportYAML(exporter) : YAMLSequenceNode.Empty);
                node.Add("m_PositionCurves", IsReadCurves(exporter.Version) ? m_positionCurves.ExportYAML(exporter) : YAMLSequenceNode.Empty);
                node.Add("m_ScaleCurves", IsReadCurves(exporter.Version) ?  m_scaleCurves.ExportYAML(exporter) : YAMLSequenceNode.Empty);
                node.Add("m_FloatCurves", IsReadCurves(exporter.Version) ? m_floatCurves.ExportYAML(exporter) : YAMLSequenceNode.Empty);
            }

            node.Add("m_PPtrCurves", IsReadPPtrCurves(exporter.Version) ? m_PPtrCurves.ExportYAML(exporter) : YAMLSequenceNode.Empty);
            node.Add("m_SampleRate", SampleRate);
            node.Add("m_WrapMode", (int)WrapMode);
            node.Add("m_Bounds", Bounds.ExportYAML(exporter));
            node.Add("m_ClipBindingConstant", ClipBindingConstant.ExportYAML(exporter));
            node.Add("m_AnimationClipSettings", MuscleClip.ExportYAML(exporter));
            node.Add("m_EditorCurves", YAMLSequenceNode.Empty);
            node.Add("m_EulerEditorCurves", YAMLSequenceNode.Empty);
            node.Add("m_HasGenericRootTransform", false);
            node.Add("m_HasMotionFloatCurves", false);
            node.Add("m_GenerateMotionCurves", false);
            node.Add("m_Events", IsReadEvents(exporter.Version) ? m_events.ExportYAML(exporter) : YAMLSequenceNode.Empty);

            return(node);
        }