I don’t commit to the SDK very often, but when I do, it’s awesome
Jokes aside, I spent the last month on refactoring @nehon’s awesome Shader Node Editor into a more general interface so the code could be re-used. It is now when his hard work pays out, so thanks for letting me stand on your shoulders there.
Before showcasing the Editor here, I shall put a warning:
.btree files are meant to be edited by humans with a text editor. When you use this Node Editor, it will REMOVE all Comments and OVERRIDE some of your style (e.g. the imports) AFTER the first save. It’s also NOT GUARANTEED that using the Editor wont RUIN your complete file. Especially in this state, don’t consider the editor save to use.
On the other hand: It’s a text file, so check it into git. You shouldn’t ever work with any software/editor without file backups actually. So do this please.
Limitations as of now:
- Subtrees don’t work (because the Parser includes them transitively, so the editor sees the subtree as part of the main tree and would upon saving merge them into one giant file)
- Editing Tasks is done through the Properties Panel. Unfortunately you have to select the Node in the Navigator (automatic selection from the editor doesn’t work), and the Navigator isn’t auto updated: If you add Nodes and it doesn’t appear, close the window and re-open it from Windows -> Navigator.
I’ll contact the netbeans team on advice for the second one, but the first one will stay so for a while unfortunately, but you could bypass 1 by always designing sub-trees and make the main trees by hand/code. Or just use a monolithic giant file like @Mithrin always loves to do
Wanna start right now? Just use the New File Dialog to generate a .btree file.
Note that you have both, a code editor and a node editor. Saving changes in one overwrites the progress in the other.
Already have an existing tree not in textual format (@Mithrin)
Try https://github.com/jMonkeyEngine/sdk/blob/master/jme3-behaviortrees/src/com/jme3/gde/behaviortrees/BTreeExporter.java and related files (https://github.com/jMonkeyEngine/sdk/blob/master/jme3-behaviortrees/src/com/jme3/gde/behaviortrees/BTreeExporterUtils.java)
If you’re having trouble with exporting, let me know.
BTW: If you experience an exception you should see a new shiny Exception Report Dialog, this also happens when your Tree Code is faulty, though, so double check if it’s an issue on your side.
And if you don’t like the style of the nodes, contribute some icons (like parallel could be some parallel arrows etc pp)