PDA

View Full Version : Finding driven objects from driver


scottiedoo
06-17-2006, 05:29 PM
I was looking around the Maya docs for a command to help me get some info about set driven keys, and I came across the setDrivenKeyframe command. As I was looking down the list of flags and queries I could do, I didn't find what I wanted.

I am looking for a way to get a list of all the objects (with their attributes) that are being DRIVEN by a driver that I know. the setDrivenKeyframe command only does the reverse, if you give it the driven attribute, it will return the list of drivers. So what I need is the opposite of that.

I do have a method to write this by just finding the destination connection to the animCurve off the driver attribute, and then find what the destination is off the animCurve, so its a couple node hopes to get to the end, however it can cause and error if someone was in there rewiring the connections or slipping in something inbetween that could make it trace the wrong connection. It works fine, but if there is a better way to query this information it will make my code a little stronger and safer.

Any ideas guys?

Thanks a bunch!
-Scott

ashishdantu
06-19-2006, 09:13 AM
hi scottiedoo,

did u try selecting the driver control (with custom attributes on it) and use`listConnections -s 1 -p 1`; > will return the objects -animation nodes of type animCurveUA , being driven in format:

L_Back_Leg_IK_LOC_rotateX.input Hoof_Wiggle_LOC_rotateX.input Toe_Roll_LOC_rotateX.input Heel_Roll_LOC_rotateX.input //

since this command will retrieve the current connections, shud work for u....

hope that helps,

scottiedoo
06-19-2006, 03:36 PM
ashishdantu,

thanks for the help, however I am not trying to get the list of animCurve nodes, but the objects that the being driven. As I already mentioned, I already have a method to traverse down the connections using listConnections to jump from the driver, to the animCurve, to the driven object, however that can be somewhat bad if there are connections that interupt that path cause the script to either 1. fail or 2. find the wrong driven object.

I was hoping someone has a better script or maybe another command instead of just looping listConnection command to go downstream on the graph.

See what I mean?

But thanks anyways,
Scott

ashishdantu
06-20-2006, 04:54 AM
hi scott,

uumm.. yes its a two step process.. and i'm too interested in knowing if this can be done in single step.. lemme know if u find a way ..

and i just remembered , i saw an article in 3d world magazine about "The Potter" - nice work man !! very inspiring !! best of luck with that.....

-rgds,

scottiedoo
06-20-2006, 03:05 PM
thanks for the compliment... good luck with your work as well..


anyone else have an idea here?

CGTalk Moderation
06-20-2006, 03:05 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.