set position key at every rotation key

First of all thanks to everyone for all the great scripts over the years. Scriptspot is fantastic :)

I am looking for a script that would go through every bone object in the scene and set a position key where ever there is a rotation key. It would need to work like the Set Key button.

This is needed for our animation export pipeline. If some one could let me know how hard this would be to make or give me some pointers that would be great.

I dont know much scripting myself but i could pass any advice over to the teams scripters.

Cheers.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Elec2ron's picture

Oh great, works perfectly :)

Oh great, works perfectly :)

Thanks very much.

Garp's picture

It IS an executable script.

Just paste it in a new script window. Replace myBones by selection if you want the script to run on selected objects only, or by $bone* if all the objects have their names starting with bone. And then file > execute (or ctrl+e). That's all there is to it.

Elec2ron's picture

Thanks Garp. Any chance you

Thanks Garp.

Any chance you could wrap this up into an executable script for a silly artist?

Garp's picture

Try this:

for b in myBones do  --selection, array, collection, etc
(
  local pc = b.position.controller
  for k in b.rotation.controller.keys do
    addNewKey pc k.time
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.