title: function only using one return for argument
body: <p>My combine function appears to only be using one return out of the three I want to use as arguments. I receive the following error message</p>
  
  <h1>Error: combine_lists() takes exactly 3 arguments (1 given)</h1>
  
  <p>how can I resolve this?</p>
  
  <p>Removing references to ikw and ikpv keeps me from getting the error. It thought I could use multiple returns from different functions in this manner but maybe not?</p>
  
  <p>code for my button:</p>
  
  <pre><code>cmds.button(label='IK 2 FK',  command = combine_lists, width=100)
  
  </code></pre>
  
  <pre><code>def select_joints_afk():
      Fks = []
      del Fks[:] 
      if cmds.ls(selection = True,type=("transform",'nurbsCurve')):
          sel = cmds.ls(sl=True)
          fkCtrls = cmds.listRelatives(sel, allDescendents=True, type=("transform",'nurbsCurve'))
          Fks = [nurbsCurve for nurbsCurve in fkCtrls if nurbsCurve.startswith('FK') &amp; nurbsCurve.endswith('Ctrl')]
          cmds.textFieldButtonGrp(gtF0, edit = True, tx ='' .join(sel),buttonLabel='IK OK',backgroundColor = (.5,.8,.2))
          del Fks[1]
          del Fks[2]
          Fks.extend(sel)
  
          print Fks[0]
          print Fks[1]
          print Fks[2]
          return Fks 
      else:
          text = cmds.confirmDialog( title='Error', message='Must select joint', button=['OK'], defaultButton='Ok', dismissString='No' )
  
  
  def select_joints_aikw():
      ikw = []
      del ikw[:]
      if cmds.ls(selection = True,type=("transform",'nurbsCurve')):
          ikwrist=cmds.ls(selection = True)
          ikw = [nurbsCurve for nurbsCurve in ikwrist if nurbsCurve.startswith('IK') &amp; nurbsCurve.endswith('Ctrl')]
          cmds.textFieldButtonGrp(gtF1, edit = True, tx ='' .join(ikwrist),buttonLabel='IK OK',backgroundColor = (.5,.8,.2))
          print ikw
          return ikw
      else:
          text = cmds.confirmDialog( title='Error', message='Must select joint', button=['OK'], defaultButton='Ok', dismissString='No' )
  
  def select_joints_ikpv():
      ikpv = []
      del ikpv[:]
      if cmds.ls(selection = True,type=("transform",'nurbsCurve')):
          ikPvsel = cmds.ls(selection = True)
          ikpv = [nurbsCurve for nurbsCurve in ikPvsel if nurbsCurve.startswith('IK') &amp; nurbsCurve.endswith('Ctrl')]
          cmds.textFieldButtonGrp(gtF2, edit = True, tx ='' .join(ikPvsel),buttonLabel='IK OK',backgroundColor = (.5,.8,.2))        
          print ikpv
          return ikpv
      else:
          text = cmds.confirmDialog( title='Error', message='Must select joint', button=['OK'], defaultButton='Ok', dismissString='No' )
  
  def combine_lists(Fks,ikw,ikpv):
  
  
      Fks =  select_joints_afk()
  
      ikw = select_joints_aikw()
  
      ikpv = select_joints_ikpv()
  
  
      print Fks+ikw+ikpv
  </code></pre>