Community
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Channel Box: allow Copy & Paste for simple values (not just keyframes)

Channel Box: allow Copy & Paste for simple values (not just keyframes)

In the Channel Box I sometimes like to copy / paste values of channels between objects.

 

Copy & Paste works only for keyframes.

If there are no keyframes it won't do anything.

 

"Transfer Attribute Values" is ok for DAG objects that are easy to select, but for construction history nodes it is too complicated.

Copy/Paste would be intuitive and fast.

 

3 Comments
tj.galda
Alumni
Status changed to: Under Review

I like this and was surprised to find it wasn't already in there.

While you're waiting, here's a hacky mel script to do what you're after.  You can put that in a hotkey or on your shelf until this makes it in properly.

 

If you select two objects (source then destination) and then your channel box attributes, it should work.  I've also made it print out what it's trying to set as the attributes in the results so you can see/debug/copy.

 

////////////

string $selectedObj[] = `ls -sl`;
string $attrsSel[] = `channelBox -q -sma mainChannelBox`;
string $myCopiedAttrsNames[];
clear $myCopiedAttrsNames;
float $myCopiedAttrsVals[];
clear $myCopiedAttrsVals;
string $myPastedAttrsNames[];
clear $myPastedAttrsNames;
int $i = 0;
for ($i == 0; $i <`size $attrsSel`; $i++)
{
$myCopiedAttrsNames[$i] = ($selectedObj[0] + "." + $attrsSel[$i]);
$myCopiedAttrsVals[$i] = `getAttr $myCopiedAttrsNames[$i]`;
$myPastedAttrsNames[$i] = ($selectedObj[1] + "." + $attrsSel[$i]);
print ("\n setAttr "+$myPastedAttrsNames[$i]+" "+ $myCopiedAttrsVals[$i]);
setAttr $myPastedAttrsNames[$i] $myCopiedAttrsVals[$i];
}

 

Anonymous
Not applicable

https://www.toadstorm.com/blog/?p=42

 

It would be great to get this in Maya without having to preselect source and Target.  I have had a script for this for years that pre-dates the rt mouse even having a copy and paste.

Anonymous
Not applicable

Interesting Hack I never knew about:

https://vimeo.com/26338568

 

 

Can't find what you're looking for? Ask the community or share your knowledge.

Submit Idea  

Autodesk Design & Make Report