Hi,
This line is the culprit:
def createConnections(self):
...
self.connect(self.exportFuncBtn, SIGNAL('clicked()'), self.exportFunc)
You are connecting your exportFunc to the clicked signal, which emits no
arguments, yet your method requires 2.
- Justin
On Tue Nov 11 2014 at 17:54:15 likage <[email protected]> wrote:
> 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
> <https://groups.google.com/d/msgid/python_inside_maya/7a2762bf-c827-4a33-bf6e-10b9aa5b5dc1%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>
--
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/CAPGFgA1TwQXFqG35BUbQ4Y4y9EXopzGG7VYJ0oTrSoY%3D9t%2BsOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.