I am trying to do a short simple exporting ui in which as user will select 
the exporting directory, then an option from the combobox (else it will 
only be showing Option 01 in the combobox), lastly clicking onto the Export 
Button

However, I am getting this error *# TypeError: exportFunc() takes exactly 3 
arguments (1 given)* even though I did fulfill the number of required 
arguments 

It is working well before I modify this current code of mine

def initUI(self):
    ...
    self.exportCombo = QComboBox()
    self.exportCombo.addItem('Option 01')
    self.exportCombo.addItem('Option 02')

def createConnections(self):
    ...
    self.connect(self.exportFuncBtn, SIGNAL('clicked()'), self.exportFunc)
    self.connect(self.exportCombo, SIGNAL('currentIndexChanged(const 
QString &)'), self.comboSel )
    

def exportFunc(self, minTime, maxTime):
    # Function that denotes the exporting on the button
    ...
    
def comboSel(self, current):
    selection = cmds.ls(sl=True)
    
    if str(current) == 'Option 01':
        minTime = cmds.playbackOptions(query=True, minTime=True)
        maxTime = cmds.playbackOptions(query=True, maxTime=True)

    else:
        minTime = cmds.findKeyframe(selection, which='first')
        maxTime = cmds.findKeyframe(selection, which='last')
        
    self.exportFunc(minTime, maxTime)


-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/7a2762bf-c827-4a33-bf6e-10b9aa5b5dc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to