Exemplo n.º 1
0
 public override void writer(MFileObject file, string optionsString, MPxFileTranslator.FileAccessMode mode)
 {
     // Prepare to export, pass it off
     if (file.fullName.ToUpper().EndsWith(".SIEGE_ANIM_SOURCE"))
     {
         CODXAnim.ExportXAnim(file.fullName, CODXAnim.XAnimType.SiegeAnimSource);
     }
 }
Exemplo n.º 2
0
        public override void writer(MFileObject file, string optionsString, MPxFileTranslator.FileAccessMode mode)
        {
            // Prepare to export, pass it off
            if (file.fullName.ToUpper().EndsWith(".XANIM_EXPORT"))
            {
                // Parse settings
                bool GrabNotes = true, EditNotes = false;

                var SplitSettings = optionsString.Trim().Split(';');
                foreach (var Setting in SplitSettings)
                {
                    if (string.IsNullOrWhiteSpace(Setting))
                    {
                        continue;
                    }

                    var SettingValue = Setting.Split('=');
                    if (SettingValue.Length < 2)
                    {
                        continue;
                    }

                    if (SettingValue[0] == "grabnotes")
                    {
                        GrabNotes = (SettingValue[1] == "1");
                    }
                    else if (SettingValue[0] == "editnotes")
                    {
                        EditNotes = (SettingValue[1] == "1");
                    }
                }

                // Export anim
                CODXAnim.ExportXAnim(file.fullName, CODXAnim.XAnimType.Export, GrabNotes, EditNotes);
            }
        }