View Full Version : How can I acsess ALL controller in the
gandhics 08-24-2009, 07: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
|
|
Piflik
08-24-2009, 08:21 PM
Have a look at GetClassInstances...
Controller_Array = GetClassInstances Controller
Should store every controller in the scene into the array.
denisT
08-24-2009, 08:29 PM
Have a look at GetClassInstances...
Controller_Array = GetClassInstances Controller
Should store every controller in the scene into the array.
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
)
CGTalk Moderation
08-24-2009, 08:29 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.