Hi Gavalakis!
Let me suggest you few search improvements:
1) IntelliSense-like search for reflected methods and properties, because like the developer, most of the developing time I use the “/Functions/Reflected/” category. For test purposes i add “Developer” search mode and few changes in CompleteContextMenu script, line 361:
for more understanding, I recorded a video: graph search
2) Better blackboard “Add variable” menu. I have worked with Bolt and I really liked how it is implemented to add variable. Try to implement similar in Node Canvas, I was surprised to find that it is very easy to add! To do this, only a few changes need to be made:
a) In BlackboardEditor.cs, line 247, replace “menu.ShowAsContext();” to “menu.ShowAsBrowser(“Add variable”);”
b) In CompleteContextMenu.cs, DoTree(Rect treeRect, Event e) method, add following code(like in example above):
1
2
3
4
5
6
7
8
if(searchMode==SearchMode.Variable)
{
varname=node.name.ToUpper();
if(name.Contains(search.ToUpper()))
{
match=true;
}
}
and then replace line(in original file it’s line 361) “searchRootNode.children[node.name] = node;” to “searchRootNode.children[node.fullPath] = node;” for prevent overwrite nodes with same names.
These are some good suggestions. Thanks for your input.
I have made some modifications to the search function inspired by your suggestions and it now works pretty similar to what you suggest here (and better in general 🙂 ).
I have also made the browser to show in the “Add Variable” menu, but I have made it so that it depends on whether or not the “Use Node Browser” options is set in the “Prefs” menu of the Canvas Editor window, just to be consistent with the rest of the places the browser shows.
is there any possibility to get crazy d0g’s code ( for the 1. developer-like-search) working in the current nodecanvas-version ? I couldn’t find the code-place which he described and I fail to implement it. I really would like to test this, but I don’t have the know how currently…