Soviut
04-22-2009, 05:34 PM
I posted this question on StackOverflow.com today, but figured I'd increase my attack surface by reposting here as well. Feel free to answer on StackOverflow and get some additional reputation points if you're a member.
http://stackoverflow.com/questions/778083/how-to-query-any-constraints-target-list-without-knowing-the-constraint-type
In Maya, I have a list of constraints gathered by the following code. I want to iterate the constraints and query the targets for each of them:
cons = ls(type='constraint')
for con in cons:
targets = constraint(query=True, targetList=True)
The problem, there is no general constraint command for manipulating all constraints. Instead, each constraint has its own unique MEL command associated with it.
Is there any way to query the targets on a constraint without having to type check each constraint and tediously run its respective MEL command?
http://stackoverflow.com/questions/778083/how-to-query-any-constraints-target-list-without-knowing-the-constraint-type
In Maya, I have a list of constraints gathered by the following code. I want to iterate the constraints and query the targets for each of them:
cons = ls(type='constraint')
for con in cons:
targets = constraint(query=True, targetList=True)
The problem, there is no general constraint command for manipulating all constraints. Instead, each constraint has its own unique MEL command associated with it.
Is there any way to query the targets on a constraint without having to type check each constraint and tediously run its respective MEL command?
