Beispiel #1
0
 /// <summary>
 /// Create a new Instance
 /// </summary>
 /// <param name="afb">The <see cref="AnimationFrameBlock"/> that was Imported</param>
 public ImportedFrameBlock(AnimationFrameBlock afb)
 {
     dz       = false;
     ruf      = true;
     this.afb = afb;
     action   = AnimImporterAction.Nothing;
 }
Beispiel #2
0
 /// <summary>
 /// Tries to find a <see cref="AnimationFrameBlock"/>  with the same Name in the passed <see cref="AnimationMeshBlock" />.
 /// </summary>
 public void FindTarget(AnimationMeshBlock amb)
 {
     action = AnimImporterAction.Nothing;
     foreach (AnimationFrameBlock afb in amb.Part2)
     {
         if (afb.Name == ImportedName)
         {
             action = AnimImporterAction.Replace;
             target = afb;
             break;
         }
     }
 }
Beispiel #3
0
        /// <summary>
        /// A Bone was selected
        /// </summary>
        void SelectJoint()
        {
            gbgroups.Enabled = true;
            this.Tag         = true;
            try
            {
                ImportedFrameBlock a = (ImportedFrameBlock)lv.SelectedItems[0].Tag;

                this.cbDiscard.Checked = a.DiscardZeroFrame;
                this.cbRemove.Checked  = a.RemoveUnneeded;

                cbaction.SelectedIndex = 0;
                for (int i = 0; i < cbaction.Items.Count; i++)
                {
                    AnimImporterAction ea = (AnimImporterAction)cbaction.Items[i];
                    if (ea == a.Action)
                    {
                        cbaction.SelectedIndex = i;
                        break;
                    }
                }
                lbname.Text = a.ImportedName;


                cbnames.SelectedIndex = -1;
                if (a.Target != null)
                {
                    for (int i = 0; i < cbnames.Items.Count; i++)
                    {
                        AnimationFrameBlock afb = (AnimationFrameBlock)cbnames.Items[i];
                        if (afb == a.Target)
                        {
                            cbnames.SelectedIndex = i;
                            break;
                        }
                    }
                }
            }
            finally
            {
                this.Tag = null;
            }
        }