[Closed] position controller for objects in array?
hey guys,
I was wondering, what would be the best/easiest way to acces the position controller on z for each object in an array?
so i have object A, B , C and D in the array “names” and I want to assing the z.position controller of each object to the opacity of each layer in a composite map, something similar to this:
for n in 1 to numFiles do
(
cmm.blendMode[n]= 2
cmm.opacity[n].controller = names[n].pos.controller.z_Position.controller )
but thisis giving me an error, any ideas how to do that?
thanks!
Alex
By array “names” you mean array which contains names of objects ei.strings.
Also “numFiles” number need to be equal with names array count.
In that case you can try this
for n in 1 to numFiles do
(
cmm.blendMode[n]= 2
node = getNodeByName names[n]
if isValidNode node do cmm.opacity[n].controller = node[3][1][3].track
)
hey thanks a lot! that seemed to work, although i’m not too sure what the ” node[3][1][3].track” means?
thanks a lot for the help
$[3][1][1].track mean Selection [Transform] [Position] [X] Controller
$[3][1][2].track mean Selection [Transform] [Position] [Y] Controller
$[3][1][3].track mean Selection [Transform] [Position] [Z] Controller
for rotation is similar
$[3][2][1].track mean Selection [Transform] [Rotation] [X] Controller
$[3][2][2].track mean Selection [Transform] [Rotation] [Y] Controller
$[3][2][3].track mean Selection [Transform] [Rotation] [Z] Controller
and for the scale
$[3][3].track mean Selection [Transform] [Scale] Controller
Also you can select an object and open track view. In tree list on the left side you can see
the order of tracks.
that maks total sense, is just the first value [3] that I don’t see what it is:
$[3][1][1].track mean Selection [Transform] [Position] [X] Controller
so $[3] <— this I don’t know, what happens if it was $[2] instead?
thanks again for the information on the post, really cool!
$[3][1][1] or any other can be nothing for some objects or if you manually assigne controller. The easiest way is to check in TrackView or with mxs. See what is what in TV for Rectangle shape.
f*******ck, now i see it! wow thanks for taking the time for that! really appreciated!!