thesecondguy
09-26-2009, 02:46 AM
Here's a sample situation:
pCube1.tz = pCube2.tz When this is executed, pCube2's translate Z attribute is locked up obviously to keep the expression true. Is there a way to say if a certain condition is met, allow pCube2.tz to be directly manipulated and not be equal to pCube1.tz? Also, I would like to set up a situation of "else" where if said condition is not met, (this is after pCube2 has been manipulated), pCube1.tz will continue on driving pCube2.tz's value, however, pCube2.tz will maintain it's newly gained offset from pCube1. Basically, I want Cube2 to follow Cube1 until I hit a custom switch. At that point, Cube2 will be free to roam about until I hit the switch again. Once the switch is back off, Cube2 must freeze in place and, from there, follow Cube1 again, maintaining its offset. Is there a way to set this up at all? I'm very new to scripting and my scripting savvy buddies are having trouble with the maya-specific details. Any help is appreciated!
pCube1.tz = pCube2.tz When this is executed, pCube2's translate Z attribute is locked up obviously to keep the expression true. Is there a way to say if a certain condition is met, allow pCube2.tz to be directly manipulated and not be equal to pCube1.tz? Also, I would like to set up a situation of "else" where if said condition is not met, (this is after pCube2 has been manipulated), pCube1.tz will continue on driving pCube2.tz's value, however, pCube2.tz will maintain it's newly gained offset from pCube1. Basically, I want Cube2 to follow Cube1 until I hit a custom switch. At that point, Cube2 will be free to roam about until I hit the switch again. Once the switch is back off, Cube2 must freeze in place and, from there, follow Cube1 again, maintaining its offset. Is there a way to set this up at all? I'm very new to scripting and my scripting savvy buddies are having trouble with the maya-specific details. Any help is appreciated!
