private static AquaMotion.MKEY GenerateMKEY(int transformType) { AquaMotion.MKEY newMkey = new AquaMotion.MKEY(); newMkey.keyType = transformType; newMkey.dataType = AquaMotion.GetKeyDataType(transformType); newMkey.unkInt0 = 0; newMkey.keyCount = 1; switch (newMkey.dataType) { //0x1 0x2, and 0x3 are Vector4 arrays essentially. 0x1 is seemingly a Vector3 with alignment padding, but could potentially have things. case 0x1: case 0x2: case 0x3: newMkey.vector4Keys.Add(new Vector4(0, 0, 0, 0)); break; case 0x5: newMkey.intKeys.Add(0); break; //0x4 is texture/uv related, 0x6 is Camera related - Array of floats. 0x4 seems to be used for every .aqv frame set interestingly case 0x4: case 0x6: newMkey.floatKeys.Add(0); break; default: throw new Exception($"Unexpected data type: {newMkey.dataType}"); } return(newMkey); }
public AnimationEditor(AquaModelLibrary.AquaUtil.AnimSet aquaAnimSet) { InitializeComponent(); animSet = aquaAnimSet; //Populate anims dropdown animIDCB.BeginUpdate(); for (int i = 0; i < animSet.anims.Count; i++) { animIDCB.Items.Add(i); } animIDCB.EndUpdate(); animIDCB.SelectedIndex = 0; currentMotion = animSet.anims[animIDCB.SelectedIndex]; if (animIDCB.Items.Count < 2) { animIDCB.Enabled = false; } InitializeAnimTreeView(); textWindow = new TextBoxPopUp(0x20); textWindow.Hide(); }
private void animIDCB_SelectedIndexChanged(object sender, EventArgs e) { currentMotion = animSet.anims[animIDCB.SelectedIndex]; InitializeAnimTreeView(); }