Script Help - Transfer Attributes on multiple different objects by name

Hi everyone,

I’ve been digging around for a script to do this for a while but had zero luck so far. Was hoping someone here might know how to do this.

The best I could come up with was copy/paste attributes from one object to another.

The problem is that it’s really slow for what I’m doing.

Im using this on very simple proxy rigs made up of parented geo. I need to be able to build and test these models rapidly without fiddling with real rigs. Something that can transfer attributes to all objects under it by matching names.

Example:
If I tweaked the geo for “Base1” I want to be able to match all the objects within “Base2” and get the same overall pose. Without doing it one object at a time :frowning:

Base1
–Arm_R
-----Arm_R_Segment_A
--------Arm_R_Segment_B
–Arm_L
-----Arm_L_Segment_A
--------Arm_L_Segment_B

Base2 (has unique rotations on all pieces)
–Arm_R
-----Arm_R_Segment_A
--------Arm_R_Segment_B
–Arm_L
-----Arm_L_Segment_A
--------Arm_L_Segment_B

HI
Could explain more with image. Hard to make out what you are trying to convey.
Thanks,
Prem
https://charactertdprem.blogspot.com/

Hi shinyprem, thanks for the reply.

I made a quick image showing what I mean. Hope this clarifies it a bit more.

Basically I want to be able to duplicate one of these parented rigs, change the geo and copy all transforms over with a single script if possible.

Hi
Since you have the script to do manually putting them into a “For Loop” will finish the job real quick.
Try this, here you have to give the attribute to connect in the fields:

Regards,
Prem

Hi shinyprem,

I tried out the script you linked. I’m afraid I couldn’t get it to work for rotations. Don’t think I’m using it correctly. My scripting ability is basically restricted to copy/pasting sadly I found my copy attribute script in a forum. :confused:

How do I connect say the rotation values using your script?

I made a quick test, image below.

Hi
In the text box give “.rotate” and “.rotate” again.
Select all the source obj and press “Get”
Select target obj and press “Get”
Then press connect button.
Regards
Prem

Hi Shinyprem,

I just got home and had a chance to try it out. It works perfectly!

I also found that by using the marque select in the hypergraph, it will select the whole hierarchy in order with just 2 clicks :smiley:

Thank you very much for the script, this does exactly what I had hoped for!

This is why I didn’t wanna do it one by one hahaha

Hi,
Nice Enjoy!
Regards,
Prem