Transform attribute

by denilson020898 posted 1111 days ago | 3 comments

Is there any difference if I connect 2 transform nodes using their compound attributes?

null1.t >> null2.t


null1.tx >> null2.tx

null1.ty >> null2.ty >>

In terms of parallel evaluation, Do they do the same thing?

by chalk posted 1110 days ago

They are considered different connections, but in terms of parallelization you should be totally fine - it will be divvied up among your threads. I regularly mix the two.

by denilson020898 posted 1110 days ago


I am trying to be consistent when writing scripts. Perhaps connecting them individually will be better.

If I disconnect one channel in the compound attr, the others connection get disconnected too. This case happens when using the compound attr.

But I am not sure.

by chalk posted 1109 days ago

Correct and vice versa too,

Yes there independent of one another - i.e. a.t connected to b.t will still leave a.tx, ty and tz available to connect. The minute you connect any of a's t channels (sub-components) though the a.t connection will get disconnected and replaced with a.tx, ty and tz connections.

So its a case of what your going into it with and the logic you want to handle. For instance i regularly do this:

for axis in "xyz":
   cmds.connectAttr("{0}.t{1}".format(obj, axis), ....)

But then if i do case logic like checking if i need to build an new node - i may not want that logic in the loop itself and in those cases i'll just do a regular cmds.connectAttr("{0}.t".format(obj), ...).

Just depends on the situation, code use etc..