View Full Version : Deriving controller names in an array

08 August 2007, 12:06 PM

This script:
fn getScriptedControllers ref =

local ctrlList = #()
local refList = refs.dependsOn ref

for r in refList do
if (isProperty r #keyable == true) then
append ctrlList r

join ctrlList (getScriptedControllers r)

return ctrlList

getScriptedControllers $

...........returns an array of the animatable controllers of the selected object like this:

#(Controller:Position_Rotation_Scale, Controller:Position_XYZ, Controller:Bezier_Float, Controller:Bezier_Float, Controller:Bezier_Float, Controller:Euler_XYZ, Controller:Bezier_Float, Controller:Bezier_Float, Controller:Bezier_Float, Controller:Bezier_Scale)

Does anyone know to return an array in exactly the same order and format of the names of the controller eg. #(Transform, Position, X_Position, Y_Position ...etc..?

I have tried using .name in a couple of places but this is throwing back errors.

Can anyone help, this is the final piece of code I need to finish my script which I will post on completion..

Thanks again


CGTalk Moderation
08 August 2007, 12:06 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.