connectAttr of one selection to another python maya

Posted by:

This takes the 1st selected attribute of an object and connects it to the second object’s attribute:

# HIKConnections
import maya.cmds as cmds

selectionList = selection=True ) #create a list of object from your current selection

”’connects the first attribute in the function to the second. Note the format of the array then the plus sign then the single quotes and the attribute, interestingly this contains a string as the variable”’
cmds.connectAttr(selectionList[0] + ‘.customVisibility’, selectionList[1] + ‘.visibility’)



About the Author:

I RUN this joint! And I am a digital artist. BFA from the University of Colorado with an emphasis in 3D Animation. I worked in medical animation for some time. I then narrowly escaped with an only partially crushed spirit. Since then I have been expanding my skill set, reaching out into custom coding, game and app development.
  Related Posts
  • No related posts found.

Add a Comment