Community Forum

search function in GE

Forum Overview >> Editor

Created22.07.2020 14:08

John Pako (logic321) 22.07.2020 14:08
why is there no search in Giants Editor as it would make looking for things much easier

Bilbo Beutlin (BBeutlin) 22.07.2020 19:57
Because the GE is made by and for (Giants) developers. These usually know their project quite well and don't need a search function.

Load the i3d into a text editor, search whatever you want, memorize the associated nodeId. This Id you search in GE - the Id's are numbered continously top->bottom.

John Pako (logic321) 30.07.2020 14:59
Ok many thanks will try that

Colin Smith (WrinkleysRule) 01.08.2020 21:42
There is a little script in the Editor Utils that you might find usefull as a guide to creating a search function

---returns list of obj ids which have == name
function EditorUtils.getIdsByName(name)
local sceneId = getChildAt(getRootNode(), 0);
local list = {}
EditorUtils.fillIdsByNameRecursive(sceneId, name, list);
return list

function EditorUtils.fillIdsByNameRecursive(id, name, list)
local numChildren = getNumOfChildren(id);
for i=0, numChildren - 1 do
local childId = getChildAt(id, i);
local childName = getName(childId);
if name == childName then
table.insert(list, childId);
EditorUtils.fillIdsByNameRecursive(childId, name, list);

Note: Log in to post. Create a new account here.