Skip to content

Commit

Permalink
Drag & drop for blend file path input
Browse files Browse the repository at this point in the history
  • Loading branch information
isti115 committed Feb 26, 2017
1 parent 5657701 commit 517ab9c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions BlenderRenderController/BlenderRenderController/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -675,5 +675,18 @@ private void deleteJsonToolStripMenuItem_Click(object sender, EventArgs e)
{
jsonDel();
}

private void MainForm_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop)) e.Effect = DragDropEffects.Copy;
}

private void MainForm_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

this.blendFilePath = files[0];
this.blendFilePathTextBox.Text = this.blendFilePath;
}
}
}

0 comments on commit 517ab9c

Please sign in to comment.