Notifications
Clear all

[Closed] automated align

Does anyone know exactly how the align tool works? Like, what coordsys does it work in, what order does it apply transforms, etc. I need to do a series of aligns on 30-some bones, in 50-some files, over the course of like 200frames in each file, so using the actual align tool on every keyframe for every object is unreasonable. I made a script to automate the process, but it doesn’t seem to work as well as I’d like. The problem is that the parent of the bones have different orientations and scales, so just writing object1.rotation = object2.rotation or object1.transform = object2.transform doesn’t work, and usually makes everything explode. The align tool works perfectly, but I need a way to automate whatever magic it performs. Any ideas how to automate align or at least simulate it?

2 Replies
 PEN

 $teapot01.rotation=inverse $box01.transform.rotation
 $teapot01.pos=$box01.pos
 
 

Is that what you are looking for. Also you will have to traverse the hierarchy when setting the values.

brilliant. Paul Neale saves the day.

Thanks alot for the quick response.