Skip to content

Instantly share code, notes, and snippets.

@mfakane
Created April 24, 2012 17:07
Show Gist options
  • Save mfakane/2481561 to your computer and use it in GitHub Desktop.
Save mfakane/2481561 to your computer and use it in GitHub Desktop.
MikuMikuMoving/CSharpScriptPlugin 用の、モーフキーフレーム入れ替えスクリプト
/*
* 二つのモーフのキーフレームを全部入れ替える
*/
#include "Util/SystemUtil.lsms"
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DxMath;
using MikuMikuPlugin;
var morphs = api.GetMorphs().ToDictionary(_ => _.Name);
var m1 = morphs["にやり"]; // 対象 1
var m2 = morphs["微笑"]; // 対象 2
var f1 = api.GetMorphFrameData(m1.Index);
var f2 = api.GetMorphFrameData(m2.Index);
api.ReplaceAllMorphFrameData(m1.Index, f2);
api.ReplaceAllMorphFrameData(m2.Index, f1);
SystemUtil.UpdateSequencePanel(api);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment