View Full Version : Locked, Connected, Driven
th0rse 07-22-2009, 12:12 PM Is it possible to check if an attribute is Locked, Connected or driven?
I have a script that is creating keys on the attributes and it would be great to check first if they are doing something else before creating a key. This way, I will be able to decide if I do it or not.
Thanks in advance
|
|
scroll-lock
07-22-2009, 01:36 PM
int $locked = `getAttr -lock objectName.attribute`;
for the other two you could use listConnections command. It has a flag that you can use to specify what type of connection you want to check for. It would be tricky if it already has a setDrivenKey, because it will be an animation curve that will be incoming in the attribute, so your new keyframe would overwrite it I suspect. Sorry for not having time to test that case more.
goleafsgo
07-22-2009, 11:09 PM
Also check out the help examples for the connectionInfo command.
CGTalk Moderation
07-22-2009, 11:09 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-2012, Jelsoft Enterprises Ltd.