Code: Alles auswählen
def run ():
driver = cmds.textField('cat_driver_tf', q=1, tx=1 )
driven = cmds.textField('cat_driven_tf', q=1, tx=1 )
toExec = ( "['{}']".format(driven) )
toExec = toExec.replace( ", ", "', '" )
print( toExec)
exec( 'drivens= {}'.format(toExec) )
for i in drivens:
print (i)
#cmds.connectAttr (driver, i)
Code: Alles auswählen
toExec = ['pSphere1.rz', 'pSphere2.rz', 'pSphere4.rz']
Code: Alles auswählen
exec( 'drivens= {}'.format(toExec) )
Code: Alles auswählen
for i in drivens:
print (i)
The tutorial i am following had no issue whatsoever with this. What am I doing wrong? Any help would be appreciated. Thanks.