Exemple #1
0
        public void bindData(visualModelAnimAsset animAsset, TreeNode treeNode)
        {
            mIsBindingData = true;

            mData = animAsset;
            mNode = treeNode;

            // Move data to control data (DATA -> CONTROL DATA)
            //
            fileBrowseControl1.FileName = mData.file;
            weightNumericUpDown1.Value  = mData.weight;

            if (mData.progression != null)
            {
                opacityProgressionCheckBox.Checked = true;
                opacityProgressionButton.Enabled   = true;

                mProgression = new EditorCore.FloatProgression();
                mProgression.Copy(mData.progression);
            }
            else
            {
                opacityProgressionCheckBox.Checked = false;
                opacityProgressionButton.Enabled   = false;

                mProgression = null;
            }

            mIsBindingData = false;
        }
Exemple #2
0
        private void opacityProgressionButton_Click(object sender, EventArgs e)
        {
            Dialogs.OpacityProgressionDialog d = new Dialogs.OpacityProgressionDialog();

            EditorCore.FloatProgression progression = new EditorCore.FloatProgression();

            progression.Copy(mProgression);
            progression.Scale(100.0f);

            d.setData(progression);

            if (d.ShowDialog() == DialogResult.OK)
            {
                progression.Scale(0.01f);

                // Check for differences
                if (!mProgression.IsEqual(progression))
                {
                    mProgression.Copy(progression);
                    updateData();
                }
            }
        }