Notifications
Clear all

[Closed] Deriving controller names in an array

Hi,

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

Spencer