Okay I have noticed this before and found it to be very some what problematic in a couple of scripts I like to create. When you try to pull the rotation from and object that is using an orientation constraint controller you get very odd results. Here is an example.
Fn TestOrient TestNum =
(
--First i make two points
--The one which will used as the target has a box
--the one with the orientation constraint will have the axistripod
RotRef = point size:5 box:true cross:false axistripod:false centermarker:false wirecolor:blue
RotOrient = point size:5 box:false cross:false axistripod:true centermarker:false wirecolor:blue
--make an orientation constraint and add the target
RotCon = orientation_constraint()
RotCon.appendTarget RotRef 100.0
RotOrient.rotation.controller = RotCon
--test to see if rotation matches by having a randon rotation be applied
--Rotation will always match like this
print "these are the first results"
for o = 1 to TestNum do
(
rotRef.rotation = (random (quat 1 0 0 0) (quat 0 0 0 1))
print (RotRef.rotation == RotOrient.rotation)
)
--Now we will add two new points to be the parent bones
--we adjust them to have diffrent rotations
--and we parent the rotRef and rotOrient
ParRotRef = point size:7.5 box:true cross:false axistripod:false centermarker:false wirecolor:yellow
ParRotOrient = point size:7.5 box:false cross:false axistripod:true centermarker:false wirecolor:yellow
ParRotRef.rotation = (quat 1 0 0 0)
ParRotOrient.rotation = (quat 0 1 0 0)
RotRef.parent = ParRotRef
RotOrient.parent = ParRotOrient
--test to see if rotation matches
--Rotation no longer matches
print "these are the new results after new Parent objects"
for o = 1 to TestNum do
(
rotRef.rotation = (random (quat 1 0 0 0) (quat 0 0 0 1))
print (RotRef.rotation == RotOrient.rotation)
)
) --end Test Orient
TestOrient 6
once i ran this code i got results saying that once they are parented to different objects with different rotation their own rotations no longer are the same. I know an easy fix would be to just make them both have the same parent but that's not always and and option. Any ideas guys?
My results
"these are the first results"
true
true
true
true
true
true
"these are the new results after new Parent objects "
false
false
false
false
false
false
By MKlejnowski · 2011-07-02
br0t · 2011-07-02