Notifications
Clear all
[Closed] How can I acsess ALL controller in the
Aug 24, 2009 8:21 pm
Hi
I need to turn on Keyable property in ALL controller in the scene.
What would be the way to make sure to get ALL controller in the scene?
Thanks
2 Replies
Aug 24, 2009 8:21 pm
Have a look at GetClassInstances…
Controller_Array = GetClassInstances Controller
Should store every controller in the scene into the array.
1 Reply
it doesn’t work…
Here is a solution:
fn getAllSceneControllers =
(
ss = stringstream ""
showClass "*:*controller*" to:ss
allcontrollers = #()
seek ss 0
while not eof ss do
(
s = filterstring (readline ss) ":"
cclass = execute s[1]
join allcontrollers (getclassinstances cclass)
)
-- double check for controllers only
allcontrollers = for c in allcontrollers where iscontroller c collect c
)