Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of a Selection class from the given <see cref="PEPlugin.View.IPXPmxViewConnector"/> reference.
 /// </summary>
 public Selection(PEPlugin.View.IPXPmxViewConnector connector)
 {
     Name      = "";
     Vertex    = connector.GetSelectedVertexIndices();
     Triangle  = connector.GetSelectedFaceIndices();
     Bone      = connector.GetSelectedBoneIndices();
     Rigidbody = connector.GetSelectedBodyIndices();
     Joint     = connector.GetSelectedJointIndices();
 }
Beispiel #2
0
        public Selection GetCurrentSelection()
        {
            PEPlugin.View.IPXPmxViewConnector view = _args.Host.Connector.View.PmxView;
            int[]  v    = selectiveVertexCheck.Checked ? view.GetSelectedVertexIndices() : new int[0];
            int[]  f    = selectiveTriangleCheck.Checked ? view.GetSelectedFaceIndices() : new int[0];
            int[]  b    = selectiveBoneCheck.Checked ? view.GetSelectedBoneIndices() : new int[0];
            int[]  r    = selectiveRigidbodyCheck.Checked ? view.GetSelectedBodyIndices() : new int[0];
            int[]  j    = selectiveJointCheck.Checked ? view.GetSelectedJointIndices() : new int[0];
            string name = string.IsNullOrEmpty(nameText.Text) ? "Selection " + storedList.Items.Count.ToString() : nameText.Text;

            return(new Selection(name, v, f, b, r, j));
        }