Skip to content
This repository has been archived by the owner on Oct 28, 2019. It is now read-only.

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
Carsh fixes
  • Loading branch information
exelix11 committed Dec 5, 2016
1 parent 0f01595 commit 0bf04ce
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 43 deletions.
6 changes: 5 additions & 1 deletion ModelViewer/UserControl1.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,11 @@ public void ChangeTransform(string Type, int index, Vector3D pos, Vector3D scale
t.Children.Add(new TranslateTransform3D(pos));
Positions[Type][index] = pos;
Models[Type][index].Transform = t;
if (SelectedObj) ((BoundingBoxVisual3D)Models["SelectionLayer"][0]).BoundingBox = Models[Type][index].FindBounds(Transform3D.Identity);
if (SelectedObj)
{
if (Models["SelectionLayer"].Count == 0) return;
((BoundingBoxVisual3D)Models["SelectionLayer"][0]).BoundingBox = Models[Type][index].FindBounds(Transform3D.Identity);
}
}

public void ChangeModel(string Type, int index, string path)
Expand Down
29 changes: 0 additions & 29 deletions The4Dimension/Form1.Designer.cs

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

14 changes: 1 addition & 13 deletions The4Dimension/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,6 @@ private void Form1_Load(object sender, EventArgs e)
foreach (string s in Directory.EnumerateFiles("CustomModels"))
if (s.EndsWith(".obj")) CustomModels.Add(Path.GetFileNameWithoutExtension(s));
}
if (Properties.Settings.Default.FirstStartup)
{
Properties.Settings.Default.FirstStartup = false;
Properties.Settings.Default.Save();
FirstStartupPanel.Visible = true;
FirstStartupPanel.Focus();
}
}

void UnloadLevel()
Expand Down Expand Up @@ -872,6 +865,7 @@ void endDragging()
Action<object[]> act;
act = (object[] args) =>
{
render.ClearSelection();
List<LevelObj> type = (List<LevelObj>)args[0];
int id = (int)args[1];
int idInList = (int)args[2];
Expand All @@ -881,7 +875,6 @@ void endDragging()
((Node)((C0List)type[id].Prop["GenerateChildren"]).List[idInList].Prop["pos_x"]).StringValue = pos.X.ToString();
((Node)((C0List)type[id].Prop["GenerateChildren"]).List[idInList].Prop["pos_y"]).StringValue = pos.Y.ToString();
((Node)((C0List)type[id].Prop["GenerateChildren"]).List[idInList].Prop["pos_z"]).StringValue = pos.Z.ToString();
if (type.GetHashCode() == CurrentAllInfosSection.GetHashCode())UpdateOBJPos(idInList, type, "TmpChildrenObjs", true);
propertyGrid1.Refresh();
};
Undo.Push(new UndoAction("Moved children object of: " + CurrentAllInfosSection[ObjectsListBox.SelectedIndex].ToString(), new object[] { CurrentAllInfosSection, ObjectsListBox.SelectedIndex, (int)DraggingArgs[1] , StartPos }, act));
Expand Down Expand Up @@ -2777,10 +2770,5 @@ private void guideToolStripMenuItem_Click(object sender, EventArgs e)
{
System.Diagnostics.Process.Start("https://github.com/exelix11/TheFourthDimension/blob/master/guide.md");
}

private void FirstStartupPanelMouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
FirstStartupPanel.Visible = false;
}
}
}
6 changes: 6 additions & 0 deletions The4Dimension/The4Dimension.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
<GenerateManifests>false</GenerateManifests>
</PropertyGroup>
<PropertyGroup />
<PropertyGroup>
<RunPostBuildEvent>OnBuildSuccess</RunPostBuildEvent>
</PropertyGroup>
<ItemGroup>
<Reference Include="3DS, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
Expand Down Expand Up @@ -366,6 +369,9 @@
<Folder Include="EFEDlls\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy $(SolutionDir)CollisionsMng\bin\Release\CollisionsMng.exe $(SolutionDir)$(TargetName)\$(OutDir)CollisionsMng.exe</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down

0 comments on commit 0bf04ce

Please sign in to comment.