Пример #1
0
        public void RestoreSelection(Selection sel)
        {
            PEPlugin.View.IPXPmxViewConnector view = _args.Host.Connector.View.PmxView;

            if (selectiveVertexCheck.Checked)
            {
                view.SetSelectedVertexIndices(sel.Vertex);
            }
            if (selectiveTriangleCheck.Checked)
            {
                view.SetSelectedFaceIndices(sel.Triangle);
            }
            if (selectiveBoneCheck.Checked)
            {
                view.SetSelectedBoneIndices(sel.Bone);
            }
            if (selectiveRigidbodyCheck.Checked)
            {
                view.SetSelectedBodyIndices(sel.Rigidbody);
            }
            if (selectiveJointCheck.Checked)
            {
                view.SetSelectedJointIndices(sel.Joint);
            }
            view.UpdateView();
        }
Пример #2
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();
 }
Пример #3
0
        private void complementButton_Click(object sender, EventArgs e)
        {
            // Given the sets A, B, C, U where U = selection of every item
            // produces the set O = U \ (A u B u C)

            PEPlugin.View.IPXPmxViewConnector view = _args.Host.Connector.View.PmxView;

            // Get U
            Selection universe = new Selection();
        }
Пример #4
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));
        }
Пример #5
0
 /// <summary>
 /// Initializes a new instance of a Selection class with the given name and <see cref="PEPlugin.View.IPXPmxViewConnector"/> reference.
 /// </summary>
 public Selection(PEPlugin.View.IPXPmxViewConnector connector, string name) : this(connector)
 {
     Name = name;
 }