[Closed] How to get a Node's active X_pos controller?
I wonder if is there a way to detect a Node’s active X_transform controller…
for example got a Box with position_list on it’s position, and on it’s second layer set active with Position XYZ, and x controller is bezier_float that for accesses it, the code will be:
$.Pos.controller[2].controller[1]
how do I can automatically catch it?
here is what I ended up:
tx = stringStream “”
(if classof $.controller == prs then
(
format “$%.pos” $.name to:tx
(if classof $.pos.controller == position_XYZ then
(if classof $.pos.controller[1].controller != float_list then
(
format “.controller[1]” to:tx
)
else
(
format “.controller[1].controller[%]” $.pos.controller[1].controller.Active to:tx
)
)
else
(if classof $.pos.controller == position_list then
(if classof $.pos.controller[$.pos.controller.active].controller == position_xyz then
(if classof $.pos.controller[$.pos.controller.active].controller[1].controller == float_list then
(
format “.controller[%].controller[1].controller[%]” $.pos.controller.active $.pos.controller[$.pos.controller.active].controller[1].controller.active to:tx
)
else
(
format “.controller[%].controller[1]” $.pos.controller.active to:tx
)
)else ( format ".controller[%].controller[1]" $.pos.controller.active to:tx ) ) else (messagebox $.name + " isn't a suitable Object") ) ) )
else
(messagebox ($.name+” isn’t a suitable Object”))
)
tx
execute (tx as string)
But I wanna know is it a true way to do this or there is any shorter way that I miss here?