View Full Version : align modifier gizmo to another object.
I am trying to write a controller on an modifier that will align the oreintation of its gizmo with another object in the scene. The objects are linked like this. The object with the modifier is linked to a dummy object which is linked to the object I want to align the modifier to. I have searched through other topics and all of the suggestions I have found don't seem to work. Any help would be great.
b=box length:20 width:20 height:20 pos:[10,0,0]
s=sphere radius:10 pos:[-20,0,0]
addModifier b bnd
bnd.gizmo.transform=inverse b.objectTransform * s.transform
max modify mode
Try that out.
I just tried it and you need to change up this line.
bnd.gizmo.transform=s.transform * inverse b.objectTransform
Thanks for the suggestion,
I tried it out and it works but there are a few things. I only want to align the modifiers orientation not possition to the other object also the objects that I am trying to align are linked to each other like I discribed above. When I try this method with linked objects that are animated it doesn't work anymore.
Here is a file that does what you want.
On $cylinder01 I have a script controller on the rotation of the slice planes gizmo so that it only works when the plane is rotated. On $cylinder02 I have a script controller on the transform of the splice planes gizmo. Move and rotate the plane and you can see the effect of the script controller. Any change in the hierarchy shouldn't make a difference in how this is working.
02-01-2006, 11:59 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.