diff -ur TSOWeight\Form1.cs TSOWeitEd\Form1.cs
--- TSOWeight\Form1.cs Fri May 03 08:39:24 2013
+++ TSOWeitEd\Form1.cs Tue Apr 09 18:49:58 2013
@@ -250,6 +250,39 @@
Invalidate(false);
}
+ private void tbPower_ValueChanged(object sender, EventArgs e)
+ {
+ float power = (float)(tbPower.Value) * 0.050f;
+ edPower.TextChanged -= new EventHandler(edPower_TextChanged);
+ edPower.Text = string.Format("{0:F3}", power);
+ edPower.TextChanged += new EventHandler(edPower_TextChanged);
+ viewer.Power = power;
+ Invalidate(false);
+ }
+
+ private void edPower_TextChanged(object sender, EventArgs e)
+ {
+ float power;
+ try
+ {
+ power = float.Parse(edPower.Text);
+ }
+ catch (FormatException)
+ {
+ power = 1.000f;
+ }
+ int value = (int)(power * 20.0f);
+ if (value < tbPower.Minimum)
+ value = tbPower.Minimum;
+ if (value > tbPower.Maximum)
+ value = tbPower.Maximum;
+ tbPower.ValueChanged -= new EventHandler(tbPower_ValueChanged);
+ tbPower.Value = value;
+ tbPower.ValueChanged += new EventHandler(tbPower_ValueChanged);
+ viewer.Power = power;
+ Invalidate(false);
+ }
+
private void btnGain_Click(object sender, EventArgs e)
{
viewer.GainSkinWeight();
diff -ur TSOWeight\Form1.Designer.cs TSOWeitEd\Form1.Designer.cs
--- TSOWeight\Form1.Designer.cs Fri May 03 08:39:24 2013
+++ TSOWeitEd\Form1.Designer.cs Tue Apr 09 19:09:56 2013
@@ -78,29 +78,33 @@
this.helpVersionToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.lbTSOFiles = new System.Windows.Forms.Label();
this.lvTSOFiles = new System.Windows.Forms.ListView();
- this.columnHeader6 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader6 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lbMeshes = new System.Windows.Forms.Label();
this.lvMeshes = new System.Windows.Forms.ListView();
- this.columnHeader1 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader1 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.panel1 = new System.Windows.Forms.Panel();
this.edRadius = new System.Windows.Forms.TextBox();
this.edWeight = new System.Windows.Forms.TextBox();
this.btnAssign = new System.Windows.Forms.Button();
this.btnReduce = new System.Windows.Forms.Button();
- this.lbWeightCaption = new System.Windows.Forms.Label();
- this.lbRadiusCaption = new System.Windows.Forms.Label();
+ this.lbWeight = new System.Windows.Forms.Label();
+ this.lbRadius = new System.Windows.Forms.Label();
this.lvSkinWeights = new System.Windows.Forms.ListView();
- this.columnHeader4 = new System.Windows.Forms.ColumnHeader();
- this.columnHeader5 = new System.Windows.Forms.ColumnHeader();
+ this.columnHeader4 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
+ this.columnHeader5 = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
this.lbSkinWeights = new System.Windows.Forms.Label();
this.tbWeight = new System.Windows.Forms.TrackBar();
this.btnGain = new System.Windows.Forms.Button();
this.tbRadius = new System.Windows.Forms.TrackBar();
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
+ this.edPower = new System.Windows.Forms.TextBox();
+ this.lbPower = new System.Windows.Forms.Label();
+ this.tbPower = new System.Windows.Forms.TrackBar();
this.menuStrip1.SuspendLayout();
this.panel1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.tbWeight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.tbRadius)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tbPower)).BeginInit();
this.SuspendLayout();
//
// timer1
@@ -512,18 +516,21 @@
//
// panel1
//
- this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Right)));
+ this.panel1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top |
System.Windows.Forms.AnchorStyles.Bottom)
+ | System.Windows.Forms.AnchorStyles.Right)));
+ this.panel1.Controls.Add(this.edPower);
+ this.panel1.Controls.Add(this.lbPower);
+ this.panel1.Controls.Add(this.tbPower);
this.panel1.Controls.Add(this.edRadius);
this.panel1.Controls.Add(this.edWeight);
this.panel1.Controls.Add(this.btnAssign);
this.panel1.Controls.Add(this.btnReduce);
this.panel1.Controls.Add(this.lvTSOFiles);
this.panel1.Controls.Add(this.lbTSOFiles);
- this.panel1.Controls.Add(this.lbWeightCaption);
+ this.panel1.Controls.Add(this.lbWeight);
this.panel1.Controls.Add(this.lbMeshes);
this.panel1.Controls.Add(this.lvMeshes);
- this.panel1.Controls.Add(this.lbRadiusCaption);
+ this.panel1.Controls.Add(this.lbRadius);
this.panel1.Controls.Add(this.lvSkinWeights);
this.panel1.Controls.Add(this.lbSkinWeights);
this.panel1.Controls.Add(this.tbWeight);
@@ -572,21 +579,21 @@
this.btnReduce.UseVisualStyleBackColor = true;
this.btnReduce.Click += new System.EventHandler(this.btnReduce_Click);
//
- // lbWeightCaption
+ // lbWeight
//
- this.lbWeightCaption.Location = new System.Drawing.Point(14, 421);
- this.lbWeightCaption.Name = "lbWeightCaption";
- this.lbWeightCaption.Size = new System.Drawing.Size(120, 12);
- this.lbWeightCaption.TabIndex = 6;
- this.lbWeightCaption.Text = "強度";
- //
- // lbRadiusCaption
- //
- this.lbRadiusCaption.Location = new System.Drawing.Point(14, 476);
- this.lbRadiusCaption.Name = "lbRadiusCaption";
- this.lbRadiusCaption.Size = new System.Drawing.Size(120, 12);
- this.lbRadiusCaption.TabIndex = 9;
- this.lbRadiusCaption.Text = "半径";
+ this.lbWeight.Location = new System.Drawing.Point(14, 421);
+ this.lbWeight.Name = "lbWeight";
+ this.lbWeight.Size = new System.Drawing.Size(84, 12);
+ this.lbWeight.TabIndex = 6;
+ this.lbWeight.Text = "強度";
+ //
+ // lbRadius
+ //
+ this.lbRadius.Location = new System.Drawing.Point(14, 476);
+ this.lbRadius.Name = "lbRadius";
+ this.lbRadius.Size = new System.Drawing.Size(84, 12);
+ this.lbRadius.TabIndex = 9;
+ this.lbRadius.Text = "半径";
//
// lvSkinWeights
//
@@ -663,6 +670,35 @@
this.statusStrip1.TabIndex = 23;
this.statusStrip1.Text = "statusStrip1";
//
+ // edPower
+ //
+ this.edPower.Location = new System.Drawing.Point(104, 580);
+ this.edPower.Name = "edPower";
+ this.edPower.Size = new System.Drawing.Size(84, 19);
+ this.edPower.TabIndex = 16;
+ this.edPower.Text = "1.000";
+ this.edPower.TextChanged += new System.EventHandler(this.edPower_TextChanged);
+ //
+ // lbPower
+ //
+ this.lbPower.Location = new System.Drawing.Point(14, 583);
+ this.lbPower.Name = "lbPower";
+ this.lbPower.Size = new System.Drawing.Size(84, 12);
+ this.lbPower.TabIndex = 15;
+ this.lbPower.Text = "減衰";
+ //
+ // tbPower
+ //
+ this.tbPower.AutoSize = false;
+ this.tbPower.Location = new System.Drawing.Point(16, 605);
+ this.tbPower.Maximum = 40;
+ this.tbPower.Name = "tbPower";
+ this.tbPower.Size = new System.Drawing.Size(172, 24);
+ this.tbPower.TabIndex = 17;
+ this.tbPower.TickStyle = System.Windows.Forms.TickStyle.None;
+ this.tbPower.Value = 20;
+ this.tbPower.ValueChanged += new System.EventHandler(this.tbPower_ValueChanged);
+ //
// Form1
//
this.AllowDrop = true;
@@ -674,7 +710,7 @@
this.Controls.Add(this.menuStrip1);
this.MainMenuStrip = this.menuStrip1;
this.Name = "Form1";
- this.Text = "TSOWeight";
+ this.Text = "TSOWeitEd";
this.DragDrop += new System.Windows.Forms.DragEventHandler(this.Form1_DragDrop);
this.DragOver += new System.Windows.Forms.DragEventHandler(this.Form1_DragOver);
this.menuStrip1.ResumeLayout(false);
@@ -683,6 +719,7 @@
this.panel1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.tbWeight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.tbRadius)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.tbPower)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
@@ -714,8 +751,8 @@
private System.Windows.Forms.Label lbTSOFiles;
private System.Windows.Forms.ListView lvTSOFiles;
private System.Windows.Forms.ColumnHeader columnHeader6;
- private System.Windows.Forms.Label lbWeightCaption;
- private System.Windows.Forms.Label lbRadiusCaption;
+ private System.Windows.Forms.Label lbWeight;
+ private System.Windows.Forms.Label lbRadius;
private System.Windows.Forms.Button btnGain;
private System.Windows.Forms.TrackBar tbRadius;
private System.Windows.Forms.TrackBar tbWeight;
@@ -753,6 +790,9 @@
private System.Windows.Forms.TextBox edWeight;
private System.Windows.Forms.TextBox edRadius;
private System.Windows.Forms.ToolStripMenuItem editResetPoseToolStripMenuItem;
+ private System.Windows.Forms.TextBox edPower;
+ private System.Windows.Forms.Label lbPower;
+ private System.Windows.Forms.TrackBar tbPower;
}
}
diff -ur TSOWeight\TSOWeight.csproj TSOWeitEd\TSOWeight.csproj
--- TSOWeight\TSOWeight.csproj Fri May 03 08:39:24 2013
+++ TSOWeitEd\TSOWeight.csproj Mon Apr 08 03:26:42 2013
@@ -112,6 +112,9 @@
PreserveNewest
+
+ PreserveNewest
+