How to access selected object in Editor?
by Josh Albrecht · in Torque Game Engine · 06/23/2003 (8:07 pm) · 3 replies
I want to call a function for the interior instance that I have selected in the editor. So I've created a function, bound a key to it, etc. However, I need to know how to actually get the selected object from the EditorGui. Some functions like
Creator::onAction(%this)
do exactly that, but I dont know how to when not in the Creator scope.
Does anyone have any ideas?
Creator::onAction(%this)
do exactly that, but I dont know how to when not in the Creator scope.
Does anyone have any ideas?
Associate Mark Frohnmayer
function doSomethingToEachSelectedObject() { for(%i = 0; %i < EWorldEditor.getSelectionSize(); %i++) { %obj = EWorldEditor.getSelectedObject(%i); %obj.doSomething(); } }