Is it possible to temporarily switch an aim constraint off and then turn it on again later?
I have the following:
CODE
global string $my_aim_constraint[];
$my_aim_constraint = aimConstraint -offset 0 0 0 -aimVector 1 0 0 -upVector 0 1 0 -worldUpType "scene" -worldUpVector 0 1 0 $my\_point[0] $my\_camera;
and the camera quite happily follows the point as it is moved around.
I have a procedure in which I then try to disable the aim constraint temporarily, using the following code:
CODE
global string $my_aim_constraint[];
aimConstraint -remove $my_point[0] $my_aim_constraint;
This complains that there is no such object as $my_aim_constraint[0].
Why do I want to do this? Well, I have a camera looking at a point, and I want to be able to orient the camera either by moving the point around (which is working just fine) or by using the orient tool on the camera. At the moment, of course, the orient tool has no effect, because the camera is locked to the point. When the camera is selected, I want to switch the aim constraint off temporarily so that the orient tool can be used. (I am using scriptJob -event "selectionChanged" to detect when the camera or point are selected, by the way.) There might well be a better way of doing this, of course.
Thanks.