Created
September 16, 2019 13:33
-
-
Save Onefabis/d2e9d4b641fe77fba35347b621d4576b to your computer and use it in GitHub Desktop.
untitled
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import maya.cmds as mc | |
selDrivers = mc.textScrollList( "driverObjects", q=1, si=1 ) | |
if not selDrivers: | |
selDrivers = mc.ls( sl=1 ) | |
outPlug = mc.listConnections( selDrivers, c=1, d=1, s=0 ) | |
if outPlug: | |
animCurves = outPlug[1::2] | |
animCurvesU = [ a for a in animCurves if 'animCurveU' in mc.ls( a, st=1)[-1] ] | |
if animCurvesU: | |
drivens = mc.listConnections( animCurvesU, c=1, d=1, s=0 ) | |
if drivens: | |
mc.select( list(set( drivens[1::2] ) ), r=1 ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment