I'm new to python language and I'm trying to understand the self
concept.
I have defined the following two methods, and I am wondering what changes will have to be made in the code to include them in a class and where self
would be used.
import maya.cmds as cmds
# This function returns the animCurves connected to particular node
def animCurveNode():
animCurveName = []
mySel = cmds.ls(sl = True)
filePath = "D:\sdk.txt"
attrName = "l_eyeBrow_Sliders.eyeBrow_start_updn"
for each in mySel:
list = cmds.listConnections(each, d = False,s = True)
animCurveName.extend(list)
return animCurveName
# This function return the animCurves and the name of the atribute to connect as the first memebr in the list
def attrAnimCurve():
attrName = "l_eyeBrow_Sliders.eyeBrow_start_updn"
animCurveNames = animCurveNode()
animCurveNames.insert(0,attrName)
return animCurveNames