[TOOL] DAEnerys - DAE Ship Editor

I’ll try this myself. It’s good you have it working now. Hopefully what you did works on my end.

1 Like

It works now!

3 Likes

Pherhaps pie in the sky, but it has recently struck me that when editing curve-type data, like for animations or for dockpaths, it’d really be useful to be able to display the data in a table of values, where each column is another entry in the curve/path. Adjusting and sanity checking paths would be much easier that way, as would taking a snapshot of them so that you can recreate their function on other ships.

I’ve also discovered that by you can, with the right sequence of inserts, get DAEnerys to generate negative dockpath segment indexes, and it doesn’t know how to clean that up. I haven’t pinned down an exact reproducable sequence for that, but it can be done.

2 Likes

Turns out reproducing the index issue isn’t hard, just make a new dockpath and hit the insert button three times, you’ll get indexes 0, -1, and -2.

2 Likes

*indices

2 Likes

I’ve been getting the following issue on application launch for a while now…

An item with the same key has already been added.

System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at DAEnerys.HWBadge…ctor(String name, String path) in D:\DAEnerys\DAEnerys\data\HWBadge.cs:line 57
at DAEnerys.HWData.ParseDataPaths() in D:\DAEnerys\DAEnerys\data\HWData.cs:line 76
at DAEnerys.Main.Main_Load(Object sender, EventArgs e) in D:\DAEnerys\DAEnerys\Main.cs:line 147
at System.Windows.Forms.Form.OnLoad(EventArgs e)
at System.Windows.Forms.Form.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.WmShowWindow(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Form.WmShowWindow(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

It does open after that, but when I go to open an existing DAE I get this:

Object reference not set to an instance of an object.

System.NullReferenceException: Object reference not set to an instance of an object.
at DAEnerys.Main.Clear() in D:\DAEnerys\DAEnerys\Main.cs:line 308
at DAEnerys.Main.buttonOpen_Click(Object sender, EventArgs e) in D:\DAEnerys\DAEnerys\Main.cs:line 431
at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

This, while annoying, would be fine if not for getting this when trying to load a ship mesh…

InvalidArgument=Value of '0' is not valid for 'SelectedIndex'.

System.ArgumentOutOfRangeException: InvalidArgument=Value of ‘0’ is not valid for ‘SelectedIndex’.
Parameter name: SelectedIndex
at System.Windows.Forms.ComboBox.set_SelectedIndex(Int32 value)
at DAEnerys.Main.listShipMeshes_SelectedIndexChanged(Object sender, EventArgs e) in D:\DAEnerys\DAEnerys\Main.cs:line 2390
at System.Windows.Forms.ListBox.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.ListBox.set_SelectedIndex(Int32 value)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Thoughts? I’m hoping to use DAEnerys to help with target boxes as below

1 Like

@Nathanius
The first issue is caused by two badges in your data paths that have the same name, nothing horrible. :slight_smile:

The two other ones I’m not sure, could you PM me your DAE so I can try to reproduce it?

2 Likes

Oh wow… It was such a simple error -_-

I just renamed the badge in the HWRM 2.0 reference folder and it’s all working now, DAE loads and everything! :smiley:

@EatThePath mentioned elsewhere, and was correct, that bounding boxes aren’t visualised in DAEnerys. While you’re doing commendable support for the tool are you going to expand on it any further? :wink:

1 Like

:wink:

2 Likes

@Nathanius
@EatThePath

That should be quick and easy to implement. :slight_smile:

3 Likes

More than a year ago I made some posts about DAE files that HODOR has no problem with but DAEnerys refuses to load due to a assimp error, and said I was going to provide some example hods. Then I shamefully forgot about it.

Ran into that again, so here’s an offending file: https://www.dropbox.com/s/c081pjhaflf9fii/HWAT_REP_DDMissile.zip?dl=0

Now I wish I could remember what I could manually do the materials to fix this…

1 Like


Seems to be fixed in my version.

3 Likes

Well, that’s good. I’m running b7282 myself, so maybe the library updates recently cleaned it up? I’d check, but I haven’t been able to get a clone of the repository to build on my machine.

1 Like

I’m on b7330, probably fixed it while hunting some other bugs.
I am currently throwing in some features you guys seem to want, after that I can upload a new version for you.

5 Likes

On the topic of building the project, when I do a fresh checkout of the repository and open DAEnerys.sln in visual studio, it compains that

warning : The referenced project '..\..\HWShaderManifest\HWShaderManifest\HWShaderManifest.csproj' does not exist.

which naturally prevents it from building. Would the correct thing to do here be to remove that project reference and replace it with a reference to a copy of the HWShaderManifest.dll included in the most recent built version of DAEnerys? Because when I do that it resolves that error and the project builds, but I get an exception immediately on launch.

Unhandled Exception: System.BadImageFormatException: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
   at DevILSharp.IL.internalInit()
   at DevILSharp.IL.Init() in C:\Users\Schorsch\Desktop\buildtest\DevILSharp\src\DevILSharp\IL.fs:line 170
   at DAEnerys.HWTexture.Init() in D:\Programming\HWTools\daenerys\DAEnerys\collada\HWTexture.cs:line 317
   at DAEnerys.Main.Main_Load(Object sender, EventArgs e) in D:\Programming\HWTools\daenerys\DAEnerys\Main.cs:line 136
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Form.OnCreateControl()
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.Form.WmShowWindow(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
The program '[19092] DAEnerys.exe' has exited with code 0 (0x0).

Best I can tell I have the correct version of everything, there’s no reference complaints in the log after that shader manifest swap.

I wouldn’t call myself an expert coder by any means, but I know my way around a little C# and would love to be able to poke at this from time to time, but resolving these stumbling blocks is currently beyond me.

1 Like

You have to clone @radar3301’s https://bitbucket.org/radar3301/hwshadermanifest/src/master/ to the same directory as DAEnerys.

Your directory structure should look like this:

  • Projects
    • DAEnerys
      • DAEnerys.sln
    • HWShaderManifest
      • HWShaderManifest.sln

If Visual Studio doesn’t find the ShaderManifest, you can remove the project reference in the solution explorer, then right-click the DAEnerys solution (not the project), and click Add -> Existing project, then choose the .csproj.


This way you can just pull changes to the HWShaderManifest project, edit it directly, and also debug it alongside DAEnerys.

Also make sure that the DAEnerys-Project is in bold, meaning it is the start-project (which is run when debugging).


Regarding the exception you are getting:
Make sure that you choose x64 instead of Any CPU at the top (beside the Debug-Button).
image

Then it should work. :slight_smile:
(This happens because the DevIL-Library is compiled for x64 (or so I believe)).


I am also working on new features:


There you can toggle bounding box visualizations for collision meshes.


DAEnerys will load ship files and assign them on a per-DAE-basis, so target boxes (and in the future other stuff) can be read from them. For now you can edit and view target boxes from inside DAEnerys!

3 Likes

That’s beautiful stuff with the new features.

Unfortunately it looks like the shadermanifest project might be private or something? the url you provided doesn’t take me to it, and it doesn’t appear on radar3301’s public listing of repositories.

Switching to x64 builds seems to clean up that exception though with the dll plugged in, so that might be enough to do some stuff with.

Edit: But still crashes with exceptions from inside shadermanifest when I actually try to load anything,

Exception thrown: 'System.MissingMethodException' in HWShaderManifest.dll
An unhandled exception of type 'System.MissingMethodException' occurred in HWShaderManifest.dll
Method not found: 'Void OpenTK.Graphics.OpenGL.GL.GetActiveAttrib(Int32, Int32, Int32, Int32 ByRef, Int32 ByRef, OpenTK.Graphics.OpenGL.ActiveAttribType ByRef, System.Text.StringBuilder)'.
1 Like

For the target box creation, can you show the measurements of the binding box? That’ll let us still calculate the right values for it!

1 Like

:heart_eyes:

3 Likes

Yes, HWShaderManifest is private. I will fix that.

@PayDay did you update to a new version of OpenTK?

edit: @EatThePath fixed

edit 2: @PayDay commit 70ddc6b broke the dll for HWShaderManifest

1 Like