Notifications
Clear all
[Closed] question about align
Feb 06, 2008 11:50 am
how to align only obj.pivots?
I need to align a shape to Bone to control bone.rotation, shape is a circle and I want it orizzontal, bone is vertical so get bone.rotation turn my shape.
1 Reply
Feb 06, 2008 11:50 am
Hi, this code will align and move all pivots of the selection to the pivot of the first selected.
objs = selection as array -- get selection
t = objs[1] -- targer object
for o in 2 to objs.count do -- loop over selection except the target
(
in coordsys world
objs[o].dir = t.dir -- rotate first
objs[o].objectOffsetRot = inverse objs[o].transform.rotation -- inverse rotate the objectOffset
objs[o].pivot = t.pivot -- align pivot (pos only)
)
-Johan