# Script Help - Transfer Attributes on multiple different objects by name

**URL:** https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515
**Category:** Maya
**Tags:** mel, python
**Created:** [October 1, 2018, 4:33am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515 "2018-10-01T04:33:19Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![im\_batman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/i/67e7ee/32.png) [@im\_batman](https://forum.highend3d.com/u/im_batman)
#### Post date: [October 1, 2018, 4:33am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/1 "2018-10-01T04:33:19Z")

</div>

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 ☹

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

---

<div class="post-metadata">

### Author: ![shinyprem](https://forum.highend3d.com/user_avatar/forum.highend3d.com/shinyprem/32/250_2.png) [@shinyprem](https://forum.highend3d.com/u/shinyprem)
#### Post date: [October 1, 2018, 8:29am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/2 "2018-10-01T08:29:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![im\_batman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/i/67e7ee/32.png) [@im\_batman](https://forum.highend3d.com/u/im_batman)
#### Post date: [October 1, 2018, 10:24am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/3 "2018-10-01T10:24:31Z")

</div>

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.

![](https://forum.highend3d.com/uploads/default/original/3X/9/0/9038f5f34f08ba1e92e9bd3820303f6953d58515.jpg)

---

<div class="post-metadata">

### Author: ![shinyprem](https://forum.highend3d.com/user_avatar/forum.highend3d.com/shinyprem/32/250_2.png) [@shinyprem](https://forum.highend3d.com/u/shinyprem)
#### Post date: [October 1, 2018, 11:02am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/4 "2018-10-01T11:02:16Z")

</div>

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:

> **[Re-Connect Corresponding Attribute for Maya - Free Utility / External Scripts...](https://www.highend3d.com/maya/script/re-connect-corresponding-attribute-for-maya)**
>
> Connects Attribute of the source object to the target in the order of selection. mel scripts for utilities and external functions in maya, utilities and exte...

Regards,  
Prem

> **[Character/Pipeline TD](https://charactertdprem.blogspot.com/)**
>
> A blog about Maya and Max Model, Rig, Rigger, character TD, Technical MEL and Python code.

---

<div class="post-metadata">

### Author: ![im\_batman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/i/67e7ee/32.png) [@im\_batman](https://forum.highend3d.com/u/im_batman)
#### Post date: [October 1, 2018, 7:07pm UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/5 "2018-10-01T19:07:41Z")

</div>

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. 😕

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

I made a quick test, image below. ![](https://forum.highend3d.com/uploads/default/original/3X/5/8/58d67f91ac4e2a7fccddfa86b32a54ecbca20968.jpg)

---

<div class="post-metadata">

### Author: ![shinyprem](https://forum.highend3d.com/user_avatar/forum.highend3d.com/shinyprem/32/250_2.png) [@shinyprem](https://forum.highend3d.com/u/shinyprem)
#### Post date: [October 2, 2018, 1:22am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/6 "2018-10-02T01:22:48Z")

</div>

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

 ![](https://forum.highend3d.com/uploads/default/original/3X/6/d/6dd186d046d3e1a03b84e844d8ae9a76b7340f3a.jpeg)

---

<div class="post-metadata">

### Author: ![im\_batman](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/i/67e7ee/32.png) [@im\_batman](https://forum.highend3d.com/u/im_batman)
#### Post date: [October 2, 2018, 4:19am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/7 "2018-10-02T04:19:10Z")

</div>

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 😃

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

![](https://forum.highend3d.com/uploads/default/original/3X/f/7/f737301fdfdbb377664cfaa76237bb31d17dc351.jpg)

---

<div class="post-metadata">

### Author: ![shinyprem](https://forum.highend3d.com/user_avatar/forum.highend3d.com/shinyprem/32/250_2.png) [@shinyprem](https://forum.highend3d.com/u/shinyprem)
#### Post date: [October 2, 2018, 6:21am UTC](https://forum.highend3d.com/t/script-help-transfer-attributes-on-multiple-different-objects-by-name/155515/8 "2018-10-02T06:21:24Z")

</div>

Hi,  
Nice Enjoy!  
Regards,  
Prem
